<commit_before>import React from 'react'
import { Link } from 'react-router'
import { browserHistory } from 'react-router'

export default React.createClass({
  getInitialState: function() {
    return { url: '' };
  },
  handleURLChange: function(e) {
    this.setState({ url: e.target.value });
  },
  contextTypes: {
    router: React.PropTypes.object
  },
  handleSubmit: function(e) {
    e.preventDefault();
    var url = this.state.url.trim();
    if (!url) {
      return;
    }
    this.setState({ url: '' });
    browserHistory.push({
        pathname: '/search/',
        search: '?host='+this.refs.q.value
      });
    //window.location.href=window.location.href;
  },
  render() {
    return (
      <form className="navbar-form" role="search" onSubmit={this.handleSubmit}>
        <div className="input-group">
            <input
              type="text"
              className="form-control"
              placeholder="Search"
              ref="q"
              value={this.state.url}
              onChange={this.handleURLChange}
              />
            <div className="input-group-btn">
                <button className="btn btn-default" type="submit"><i className="glyphicon glyphicon-search"></i></button>
            </div> {/*input-group-btn*/}
        </div> {/*input-group*/}
      </form>
    )
  }
});<commit_msg>delete out of date comments.<commit_after>import React from 'react'
import { Link } from 'react-router'
import { browserHistory } from 'react-router'

export default React.createClass({
  getInitialState: function() {
    return { url: '' };
  },
  handleURLChange: function(e) {
    this.setState({ url: e.target.value });
  },
  contextTypes: {
    router: React.PropTypes.object
  },
  handleSubmit: function(e) {
    e.preventDefault();
    var url = this.state.url.trim();
    if (!url) {
      return;
    }
    this.setState({ url: '' });
    browserHistory.push({
        pathname: '/search/',
        search: '?host='+this.refs.q.value
      });
  },
  render() {
    return (
      <form className="navbar-form" role="search" onSubmit={this.handleSubmit}>
        <div className="input-group">
            <input
              type="text"
              className="form-control"
              placeholder="Search"
              ref="q"
              value={this.state.url}
              onChange={this.handleURLChange}
              />
            <div className="input-group-btn">
                <button className="btn btn-default" type="submit"><i className="glyphicon glyphicon-search"></i></button>
            </div> {/*input-group-btn*/}
        </div> {/*input-group*/}
      </form>
    )
  }
});
{'fraction_non_alphanumeric': 0.16115702479338842, 'fraction_numerical': 0.0, 'mean_word_length': 2.1664684898929845, 'pattern_counts': {'":': 0, '<': 25, '<?xml version=': 0, '>': 25, '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': '940004', 'n_tokens_mistral': 786, 'n_tokens_neox': 783, 'n_words': 147}