<commit_before>import React, { Component } from 'react';

export default class Tile extends Component {
  constructor (props) {
    super(props);

    this.state = {
      completed: false
    };
  }

  handleChange(e) {
    this.setState({completed: true});
  }

  render () {
    return (
      <td onClick={this.handleChange.bind(this)} className={this.state.completed ? "complete" : '' }>{this.props.title}</td>
    );
  }
}
<commit_msg>add undo functionality<commit_after>import React, { Component } from 'react';

export default class Tile extends Component {
  constructor (props) {
    super(props);

    this.state = {
      completed: false
    };
  }

  handleChange(e) {
    this.setState({completed: true});

    if (this.state.completed) {
      this.setState({completed: false});
    }
  }

  render () {
    return (
      <td onClick={this.handleChange.bind(this)} className={this.state.completed ? "complete" : '' }>{this.props.title}</td>
    );
  }
}

{'fraction_non_alphanumeric': 0.15550978372811536, 'fraction_numerical': 0.0, 'mean_word_length': 3.033195020746888, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, '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': '4902072', 'n_tokens_mistral': 313, 'n_tokens_neox': 301, 'n_words': 60}