<commit_before>import React, { Component, PropTypes } from 'react'
import RaisedButton from 'material-ui/lib/raised-button'

class Counter extends Component {
  render() {
    const { increment, incrementIfOdd, incrementAsync, decrement, counter } = this.props
    return (
      <div>
        Clicked: {counter} times
        {' '}
        <RaisedButton label="+" secondary onTouchTap={increment}/>
        {' '}
        <button onClick={decrement}>-</button>
        {' '}
        <button onClick={incrementIfOdd}>Increment if odd</button>
        {' '}
        <button onClick={() => incrementAsync()}>Increment async</button>
      </div>
    )
  }
}

Counter.propTypes = {
  increment: PropTypes.func.isRequired,
  incrementIfOdd: PropTypes.func.isRequired,
  incrementAsync: PropTypes.func.isRequired,
  decrement: PropTypes.func.isRequired,<commit_msg>Refactored Counter to a stateless component<commit_after>import React, { PropTypes } from 'react'
import RaisedButton from 'material-ui/lib/raised-button'

const Counter =  (props) => {
  const { increment, incrementIfOdd, incrementAsync, decrement, counter } = props
  return (
    <div>
      Clicked: {counter} times
      {' '}
      <RaisedButton label="+" secondary onTouchTap={increment}/>
      {' '}
      <button onClick={decrement}>-</button>
      {' '}
      <button onClick={incrementIfOdd}>Increment if odd</button>
      {' '}
      <button onClick={() => incrementAsync()}>Increment async</button>
    </div>
  )
}

Counter.propTypes = {
  increment: PropTypes.func.isRequired,
  incrementIfOdd: PropTypes.func.isRequired,
  incrementAsync: PropTypes.func.isRequired,
  decrement: PropTypes.func.isRequired,
{'fraction_non_alphanumeric': 0.13606654783125371, 'fraction_numerical': 0.0, 'mean_word_length': 3.490666666666667, 'pattern_counts': {'":': 0, '<': 21, '<?xml version=': 0, '>': 24, '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': '6244272', 'n_tokens_mistral': 506, 'n_tokens_neox': 514, 'n_words': 103}