<commit_before>import React from 'react';

class LoginForm extends React.Component {
  constructor(props) {
    super(props);
    this.handleChange = this.handleChange.bind(this);
    this.handleSubmit = this.handleSubmit.bind(this);
  }
  handleChange(event) {
    event.preventDefault();
    this.props.onChange(
      {key: event.target.id, value: event.target.value});
  }
  handleSubmit(event) {
    event.preventDefault();
    let username = this.refs.username.value;
    let password = this.refs.password.value;
    this.props.onSubmit({username, password});
  }
  render() {
    return (
      <form className='login-form' onSubmit={this.handleSubmit}>
        <input 
          className='login-form__input'
          value={this.props.username}
          id='username'
          ref='username' 
          type='text'
          required={true}
          onChange={this.handleChange} />
        <input
          className='login-form__input'
          value={this.props.password}
          id='password'
          ref='password' 
          type='password'
          required={true}
          onChange={this.handleChange} />
        <button 
          className='login-form__input login-form__submit'
          type='submit'>Login</button>
      </form><commit_msg>adds labels to login form<commit_after>import React from 'react';

class LoginForm extends React.Component {
  constructor(props) {
    super(props);
    this.handleChange = this.handleChange.bind(this);
    this.handleSubmit = this.handleSubmit.bind(this);
  }
  handleChange(event) {
    event.preventDefault();
    this.props.onChange(
      {key: event.target.id, value: event.target.value});
  }
  handleSubmit(event) {
    event.preventDefault();
    let username = this.refs.username.value;
    let password = this.refs.password.value;
    this.props.onSubmit({username, password});
  }
  render() {
    return (
      <form className='login-form' onSubmit={this.handleSubmit}>
        <label
          className="login-form__label"
          htmlFor="username">Email or username</label>
        <input 
          className='login-form__input'
          value={this.props.username}
          id='username'
          ref='username' 
          type='text'
          required={true}
          onChange={this.handleChange} />
        <label
          className="login-form__label"
          htmlFor="password">Passphrase</label>
        <input
          className='login-form__input'
          value={this.props.password}
          id='password'
          ref='password' 
          type='password'
          required={true}
          onChange={this.handleChange} />
        <button 
          className='login-form__input login-form__submit'
          type='submit'>Login</button>
      </form>
{'fraction_non_alphanumeric': 0.12639942217407008, 'fraction_numerical': 0.0, 'mean_word_length': 2.3987730061349692, 'pattern_counts': {'":': 0, '<': 19, '<?xml version=': 0, '>': 19, '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': '3487781', 'n_tokens_mistral': 770, 'n_tokens_neox': 765, 'n_words': 125}