<commit_before>import React from 'react'
import classNames from 'classnames'

class App extends React.Component {
    constructor() {
        super();

        this.todos = [
            {
                id: 1,
                description: 'talk to John',
                completed: false
            },
            { 
                id: 2,
                description: 'buy some fruits',
                completed: true
            }
        ]
    }

    render() {
        return (
            <ul className="todo-list">
                {this.renderTodos()}
            </ul>
        );
    }

    renderTodos() {
        return this.todos.map(todo =>
            <li key={todo.id} className={classNames({ completed: todo.completed })}>
                <input
                    className="toggle"
                    type="checkbox"
                    checked={todo.completed}
                    onChange={(e) => this.completeTodo(todo.id, e)}
                />
                <label>{todo.description}</label>
            </li>
        );
    }

    completeTodo(todoId, e) {
        console.log(todoId, e.target.checked);
    }
}

export {
    App
}<commit_msg>trying to update data n component<commit_after>import React from 'react'
import classNames from 'classnames'

class App extends React.Component {
    constructor() {
        super();

        this.todos = [
            {
                id: 1,
                description: 'talk to John',
                completed: false
            },
            { 
                id: 2,
                description: 'buy some fruits',
                completed: true
            }
        ]
    }

    render() {
        return (
            <ul className="todo-list">
                {this.renderTodos()}
            </ul>
        );
    }

    renderTodos() {
        return this.todos.map(todo =>
            <li key={todo.id} className={classNames({ completed: todo.completed })}>
                <input
                    className="toggle"
                    type="checkbox"
                    checked={todo.completed}
                    onChange={(e) => this.completeTodo(todo.id, e)}
                />
                <label>{todo.description}</label>
            </li>
        );
    }

    completeTodo(todoId, e) {
        let todos = this.todos;
        const completed = e.target.checked;

        const todoToModify = todos.find(todo => todo.id === todoId);
        todoToModify.completed = completed;

        console.log(todos);
    }
}

export {
    App
}
{'fraction_non_alphanumeric': 0.11505122143420016, 'fraction_numerical': 0.0015760441292356187, 'mean_word_length': 1.1963667820069204, 'pattern_counts': {'":': 0, '<': 17, '<?xml version=': 0, '>': 22, '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': '326425', 'n_tokens_mistral': 727, 'n_tokens_neox': 679, 'n_words': 137}