<commit_before>import React from 'react';

class Search extends React.Component {
  static propTypes = {
    className: React.PropTypes.string,
    placeholder: React.PropTypes.string,
    style: React.PropTypes.object,
    onSearch: React.PropTypes.func
  };

  render() {
    return (
      <input
        ref={(input) => this.input = input}
        type="text"
        className={this.props.className}
        placeholder={this.props.placeholder}
        style={this.props.style}
        onKeyUp={this.handleKeyUp}
      />
    );
  }

  handleKeyUp = () => {
    if (this._timeout) {
      clearTimeout(this._timeout);
    }

    this._timeout = setTimeout(this.handleEntryTimeout, 500);
  };

  handleEntryTimeout = () => {
    if (this._value != this.input.value && this.props.onSearch) {
      this._value = this.input.value;
      this.props.onSearch(this.input.value);
    }
  };
}

export default Search;<commit_msg>Appease the gods of lint<commit_after>import React from 'react';

class Search extends React.Component {
  static propTypes = {
    className: React.PropTypes.string,
    placeholder: React.PropTypes.string,
    style: React.PropTypes.object,
    onSearch: React.PropTypes.func
  };

  render() {
    return (
      <input
        ref={(input) => this.input = input}
        type="text"
        className={this.props.className}
        placeholder={this.props.placeholder}
        style={this.props.style}
        onKeyUp={this.handleKeyUp}
      />
    );
  }

  handleKeyUp = () => {
    if (this._timeout) {
      clearTimeout(this._timeout);
    }

    this._timeout = setTimeout(this.handleEntryTimeout, 500);
  };

  handleEntryTimeout = () => {
    if (this._value !== this.input.value && this.props.onSearch) {
      this._value = this.input.value;
      this.props.onSearch(this.input.value);
    }
  };
}

export default Search;
{'fraction_non_alphanumeric': 0.13680257510729613, 'fraction_numerical': 0.003218884120171674, 'mean_word_length': 2.6354775828460038, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 11, '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': '6327327', 'n_tokens_mistral': 585, 'n_tokens_neox': 571, 'n_words': 97}