<commit_before>import React, { PropTypes } from 'react';
import Recipe from './Recipe';
import { Link } from 'react-router'
// Simple example of a React "dumb" component
export default class RecipeList extends React.Component {

    constructor(props, context) {
        super(props, context);
        this.state = {
            recipes: this.props.recipes,
            filterText: ''
        };
    }
    onChangeSearch(evt) {
        this.setState({filterText: evt.target.value});
    }

    render() {
        var recipeNodes = [];
        this.state.recipes.forEach((recipe, idx)  => {
            if (this.state.filterText != '' && recipe.name.toLowerCase().indexOf(this.state.filterText) === -1) {
                return;
            }
            var link = this.props.baseUrl + 'redux/recipe/' + recipe.slug;
            recipeNodes.push(
                <div key={idx}>
                    <Link to={link}>
                        <Recipe key={idx} recipe={recipe} id={idx}/>
                    </Link>
                </div>
            );
        });
        return (
            <div className="container">
                <div id="search-box" className="pull-right">
                    <div className="input-group">
                        <input type="text" className="form-control" value={this.state.filterText} placeholder="Search for..." onChange={this.onChangeSearch.bind(this)}/>
                        <span className="input-group-btn">
                            <button className="btn btn-default" type="button">Go!</button>
                        </span>
                    </div>
                </div>
                <h2>List of recipes</h2>
                {recipeNodes}
            </div>
        );
    }
}<commit_msg>Removed useless button<commit_after>import React, { PropTypes } from 'react';
import Recipe from './Recipe';
import { Link } from 'react-router'
// Simple example of a React "dumb" component
export default class RecipeList extends React.Component {

    constructor(props, context) {
        super(props, context);
        this.state = {
            recipes: this.props.recipes,
            filterText: ''
        };
    }
    onChangeSearch(evt) {
        this.setState({filterText: evt.target.value});
    }

    render() {
        var recipeNodes = [];
        this.state.recipes.forEach((recipe, idx)  => {
            if (this.state.filterText != '' && recipe.name.toLowerCase().indexOf(this.state.filterText) === -1) {
                return;
            }
            var link = this.props.baseUrl + 'redux/recipe/' + recipe.slug;
            recipeNodes.push(
                <div key={idx}>
                    <Link to={link}>
                        <Recipe key={idx} recipe={recipe} id={idx}/>
                    </Link>
                </div>
            );
        });
        return (
            <div className="container">
                <div id="search-box" className="pull-right">
                    <div className="input-group">
                        <input type="text" className="form-control" value={this.state.filterText} placeholder="Search for..." onChange={this.onChangeSearch.bind(this)}/>
                    </div>
                </div>
                <h2>List of recipes</h2>
                {recipeNodes}
            </div>
        );
    }
}
{'fraction_non_alphanumeric': 0.13771377137713772, 'fraction_numerical': 0.0018001800180018, 'mean_word_length': 1.5315110098709188, 'pattern_counts': {'":': 0, '<': 35, '<?xml version=': 0, '>': 37, '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': '2760705', 'n_tokens_mistral': 894, 'n_tokens_neox': 882, 'n_words': 179}