<commit_before>import React from 'react';

class UserData extends React.Component {
  constructor(props) {
    super(props);
  }
  render() {
    return (
      <div>
        <p>Username</p>
        <input name="username" defaultValue="Enter User"></input>
        <p>Password</p>
        <input name="password" defaultValue="Enter Password"></input>
        <p>Preferences</p>
        <input name="preferences" defaultValue="Italian"></input>
        <p>Zip</p>
        <input name="location" defaultValue="94016"></input>
      </div>
    );
  }
}

export default UserData;<commit_msg>"reactive state working in userdata"<commit_after>import React from 'react';

class UserData extends React.Component {
  constructor(props) {
    super(props);
    this.state = {username: 'Enter User', password: '<PASSWORD>', preferences: 'Italian', location: '94016'};
  }

  updateVal(name, event) {
    var updater = {};
    updater[name] = event.target.value;
    this.setState(updater);
  }

  render() {
    return (
      <div>
        <p>Username</p>
        <input name="username" value={this.state.username} onChange={this.updateVal.bind(this, 'username')}></input>
        <p>Password</p>
        <input name="password" value={this.state.password} onChange={this.updateVal.bind(this, 'password')}></input>
        <p>Preferences</p>
        <input name="preferences" value={this.state.preferences} onChange={this.updateVal.bind(this, 'preferences')}></input>
        <p>Zip</p>
        <input name="location" value={this.state.location} onChange={this.updateVal.bind(this, 'location')}></input>
      </div>
    );
  }
}

export default UserData;
{'fraction_non_alphanumeric': 0.16849148418491483, 'fraction_numerical': 0.006082725060827251, 'mean_word_length': 3.375, 'pattern_counts': {'":': 0, '<': 40, '<?xml version=': 0, '>': 40, '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': '345378', 'n_tokens_mistral': 520, 'n_tokens_neox': 510, 'n_words': 96}