<commit_before>import { Component, PropTypes } from 'react';
import SearchFilter from '../SearchFilter';

export default class NavBar extends Component {
	constructor(props){
    super(props);
    this.state = {
      currentFilter: ''
    };
  }

  static propTypes = {
		components: PropTypes.array.isRequired
	}

  onChange = (filter) => {
    this.setState({
      currentFilter: filter
    });
  }

	renderLinks() {
		let { components } = this.props;

		return components.filter((component) => {
      if(this.state.currentFilter != ''){
        return component.name.toLowerCase().includes(this.state.currentFilter.toLowerCase();
      }
      else{
        return true;
      }
    }).map((component) => {
			return (
				<div>
          <a href={this._buildLink(component)}>{component.name}</a>
        </div>
			);
		});
	}

  _buildLink(component) {
    return "#"+component.name;
  }

	render() {
		return (
      <div>
        <SearchFilter components={this.props.components} filter={this.state.currentFilter} onChange={this.onChange}/>
  			<div>
  				{this.renderLinks()}
  			</div>
      </div>
		);
	}
}
<commit_msg>Fixing typo.<commit_after>import { Component, PropTypes } from 'react';
import SearchFilter from '../SearchFilter';

export default class NavBar extends Component {
	constructor(props){
    super(props);
    this.state = {
      currentFilter: ''
    };
  }

  static propTypes = {
		components: PropTypes.array.isRequired
	}

  onChange = (filter) => {
    this.setState({
      currentFilter: filter
    });
  }

	renderLinks() {
		let { components } = this.props;

		return components.filter((component) => {
      if(this.state.currentFilter != ''){
        return component.name.toLowerCase().includes(this.state.currentFilter.toLowerCase());
      }
      else{
        return true;
      }
    }).map((component) => {
			return (
				<div>
          <a href={this._buildLink(component)}>{component.name}</a>
        </div>
			);
		});
	}

  _buildLink(component) {
    return "#"+component.name;
  }

	render() {
		return (
      <div>
        <SearchFilter components={this.props.components} filter={this.state.currentFilter} onChange={this.onChange}/>
  			<div>
  				{this.renderLinks()}
  			</div>
      </div>
		);
	}
}

{'fraction_non_alphanumeric': 0.15608465608465608, 'fraction_numerical': 0.0, 'mean_word_length': 2.6188197767145134, 'pattern_counts': {'":': 0, '<': 21, '<?xml version=': 0, '>': 27, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5301770', 'n_tokens_mistral': 742, 'n_tokens_neox': 715, 'n_words': 121}