<commit_before>import React from 'react';

class Login extends React.Component {
  constructor() {
    super();
    this.handleSubmit = this.handleSubmit.bind(this);
  }

  handleSubmit(event) {
    event.preventDefault();
    const { logIn } = this.props;
    const { identifier, password } = this;

    logIn(identifier.value, password.value);
  }

  render() {
    const { appName, signUpPath, error } = this.props;

    return (
      <div className="login">
        <h2>Login</h2>
        {error ? <p>{error}</p> : null}
        <form onSubmit={this.handleSubmit}>
          <label htmlFor="identifier">
            <span>Username or email</span>
            <input
              ref={(node) => { this.identifier = node; }}
              id="identifier"
              type="text"
              required
            />
          </label>
          <label htmlFor="password">
            <span>Password</span>
            <input
              ref={(node) => { this.password = node; }}
              id="password"
              type="password"
              required
            />
          </label>
          <button type="submit">Log in</button>
        </form>
        <div>
          <p>New to {appName}? <a href={signUpPath}>Create an account</a>.</p>
        </div>
      </div>
    );
  }
}

Login.propTypes = {
  logIn: React.PropTypes.func,
  appName: React.PropTypes.string,
  signUpPath: React.PropTypes.string,
  error: React.PropTypes.string,
};

export default Login;<commit_msg>Accounts: fix typo on login component<commit_after>import React from 'react';

class Login extends React.Component {
  constructor() {
    super();
    this.handleSubmit = this.handleSubmit.bind(this);
  }

  handleSubmit(event) {
    event.preventDefault();
    const { logIn } = this.props;
    const { identifier, password } = this;

    logIn(identifier.value, password.value);
  }

  render() {
    const { appName, signUpPath, error } = this.props;

    return (
      <div className="login">
        <h2>Login</h2>
        {error ? <p>{error}</p> : null}
        <form onSubmit={this.handleSubmit}>
          <label htmlFor="identifier">
            <span>Username or email</span>
            <input
              ref={(node) => { this.identifier = node; }}
              id="identifier"
              type="text"
              required
            />
          </label>
          <label htmlFor="password">
            <span>Password</span>
            <input
              ref={(node) => { this.password = node; }}
              id="password"
              type="password"
              required
            />
          </label>
          <button type="submit">Log in</button>
        </form>
        <div>
          <p>New on {appName}? <a href={signUpPath}>Create an account</a>.</p>
        </div>
      </div>
    );
  }
}

Login.propTypes = {
  logIn: React.PropTypes.func,
  appName: React.PropTypes.string,
  signUpPath: React.PropTypes.string,
  error: React.PropTypes.string,
};

export default Login;
{'fraction_non_alphanumeric': 0.14224137931034483, 'fraction_numerical': 0.001326259946949602, 'mean_word_length': 1.8570075757575757, 'pattern_counts': {'":': 0, '<': 55, '<?xml version=': 0, '>': 59, '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': '3096732', 'n_tokens_mistral': 887, 'n_tokens_neox': 877, 'n_words': 180}