<commit_before>import * as React from 'react';

export interface inputTodoItemProps {
    createNewTask: Function;
}

export interface inputTodoItemState {
}

export class InputTodoItem extends React.Component<inputTodoItemProps, inputTodoItemState> {

    public refs: {
        [string: string]: any;
        newTodoItem: HTMLInputElement;
    }

    constructor(props) {
        super(props);

        this.bindMethods();
    }

    public render() {
        return (
            <form onSubmit={this.onSubmitClick}>
                <input type="text" placeholder="What do I need to do..."
                    ref="newTodoItem" />
                <button className="todo-create-btn">Create</button>
            </form>
        );
    };

    private bindMethods() {
        this.onSubmitClick = this.onSubmitClick.bind(this);
    }

    private onSubmitClick(event) {
        event.preventDefault();

        var newTask = this.refs.newTodoItem.value;
        if (newTask) {
            this.props.createNewTask(newTask);
        }
    }
}<commit_msg>cleaned input form after submit<commit_after>import * as React from 'react';

export interface inputTodoItemProps {
    createNewTask: Function;
}

export interface inputTodoItemState {
}

export class InputTodoItem extends React.Component<inputTodoItemProps, inputTodoItemState> {

    public refs: {
        [string: string]: any;
        newTodoItem: HTMLInputElement;
    }

    constructor(props) {
        super(props);

        this.bindMethods();
    }

    public render() {
        return (
            <form onSubmit={this.onSubmitClick}>
                <input type="text" placeholder="What do I need to do..."
                    ref="newTodoItem" />
                <button className="todo-create-btn">Create</button>
            </form>
        );
    };

    private bindMethods() {
        this.onSubmitClick = this.onSubmitClick.bind(this);
    }

    private onSubmitClick(event) {
        event.preventDefault();

        var newTask = this.refs.newTodoItem.value;
        if (newTask) {
            this.props.createNewTask(newTask);
            this.refs.newTodoItem.value = "";
        }
    }
}
{'fraction_non_alphanumeric': 0.10911602209944751, 'fraction_numerical': 0.0, 'mean_word_length': 2.163027656477438, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 15, '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': '2341932', 'n_tokens_mistral': 633, 'n_tokens_neox': 610, 'n_words': 123}