<commit_before>import React, {Component} from 'react'
import Teacup from './Teacup'

class HotWaterQueue extends Component {
    constructor(props) {
        super(props)
        this.state = {
          cupOwners: [
            'Tony',
            'James'
          ]
        }
    }

    addCup() {
      if(this.refs.newCupOwner.value) {
        var newCupOwners = this.state.cupOwners
        newCupOwners.push(this.refs.newCupOwner.value)

        this.setState({
          cupOwners: newCupOwners
        })
      }
    }

    removeCup(cupToRemove) {
      var oldCupOwners = this.state.cupOwners.filter(function(cupOwner) {
        return cupOwner !== cupToRemove
      })

      this.setState({
        cupOwners: oldCupOwners
      })
    }

    render() {
        return(
            <div>
                <h1>Hot Water Queue</h1>
                <div>
                  <input ref="newCupOwner" type="text" placeholder="Enter your name"/>
                  <button onClick={this.addCup.bind(this)}>Order Tea</button>
                </div>
                {this.state.cupOwners.map(function(owner, i) {
                  return <Teacup name={owner} key={i} callback={this.removeCup.bind(this)}/>
                }.bind(this))}
            </div>
        )
    }
}



export default HotWaterQueue



<commit_msg>updates<commit_after>import React, {Component} from 'react'
import Teacup from './Teacup'

class HotWaterQueue extends Component {
    constructor(props) {
        super(props)
        this.state = {
          cupOwners: [
            'Tony',
            'James'
          ]
        }
    }

    addCup() {
      if(this.refs.newCupOwner.value) {
        var newCupOwners = this.state.cupOwners
        newCupOwners.push(this.refs.newCupOwner.value)

        this.setState({
          cupOwners: newCupOwners
        })
      }
    }

    removeCup(cupToRemove) {
      var oldCupOwners = this.state.cupOwners.filter(function(cupOwner) {
        return cupOwner !== cupToRemove
      })

      this.setState({
        cupOwners: oldCupOwners
      })
    }

    render() {
        return(
            <div className="hotwater-wrapper">
                <div className="hotwater-title">Hot Water Queue</div>
                <div className="hotwater-inputs">
                  <input className="hotwater-input" ref="newCupOwner" type="text" placeholder="Enter your name"/>
                  <button className="hotwater-button" onClick={this.addCup.bind(this)}>Order Tea</button>
                </div>
                <div className="hotwater-wrapper2">
                  <div className="teacups-wrapper">
                    {this.state.cupOwners.map(function(owner, i) {
                      return <Teacup name={owner} key={i} callback={this.removeCup.bind(this)}/>
                    }.bind(this))}
                  </div>
                  </div>
            </div>
        )
    }
}



export default HotWaterQueue




{'fraction_non_alphanumeric': 0.11944350186630472, 'fraction_numerical': 0.0010179843909060061, 'mean_word_length': 1.6534653465346534, 'pattern_counts': {'":': 0, '<': 27, '<?xml version=': 0, '>': 27, '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': '5740296', 'n_tokens_mistral': 916, 'n_tokens_neox': 868, 'n_words': 145}