<commit_before>import React from 'react';

class Authentication extends React.Component {
  render() {
    return (
      <section className="c-authentication c-authentication--vertical">
        <section className="c-authentication__inner">
          <article className="c-authentication__front">
            <form>
              <div className="c-authentication__fields">
                <label>
                  {/* <span className="c-authentication__feedback"><i className="icon-alert-outline"></i>Woops! Your email address is invalid.</span> */}
                  <input type="email" name="email" placeholder="email" required/>
                </label>

                <label>
                  {/* <span className="c-authentication__feedback">Incorrect email or password. Let's try again.</span> */}
                  <input type="password" name="password" placeholder="password" required/>
                </label>
              </div>
              <div className="c-authentication__submit">
                <button>Connect</button>
              </div>
            </form>
          </article>

          <article className="c-authentication__back">
            <form>
              <div className="c-authentication__fields">
                <label>
                  {/* <span className="c-authentication__feedback">Woops! Your email address is invalid.</span> */}
                  <input type="email" name="email" placeholder="email" required/>
                </label>

                <label>
                  {/* <span className="c-authentication__feedback">Your password is too short. Let's not make it too easy.</span> */}
                  <input type="password" name="password" placeholder="password" required/>
                </label>
              </div>
              <div className="c-authentication__submit">
                <button>
                  <span className="js-register-close">
                    <i className="icon-arrow-back"></i>
                  </span>
                  Register
                </button>
              </div>
            </form>
          </article>
        </section>
      </section>
    );
  }

  // functions.
}

export default Authentication;<commit_msg>scafold states authentication scope<commit_after>import React from 'react';

class Authentication extends React.Component {
  constructor(props) {
    super(props);

    this.state = {
      connecting: false
    };
  }

  render() {
    let authenticationClass = 'c-authentication c-authentication--vertical';
    let connectClass;

    if (this.props.showRegister) {
      authenticationClass += ' state-register';
    }

    if (this.state.connecting) {
      connectClass = 'state-loading';
    }

    return (
      <section className={authenticationClass}>
        <section className="c-authentication__inner">
          <article className="c-authentication__front">
            <form>
              <div className="c-authentication__fields">
                <label>
                  {/* <span className="c-authentication__feedback"><i className="icon-alert-outline"></i>Woops! Your email address is invalid.</span> */}
                  <input type="email" name="email" placeholder="email" required/>
                </label>

                <label>
                  {/* <span className="c-authentication__feedback">Incorrect email or password. Let's try again.</span> */}
                  <input type="password" name="password" placeholder="password" required/>
                </label>
              </div>
              <div className="c-authentication__submit">
                <button className={connectClass} onClick={this.connect.bind(this)}>Connect</button>
              </div>
            </form>
          </article>

          <article className="c-authentication__back">
            <form>
              <div className="c-authentication__fields">
                <label>
                  {/* <span className="c-authentication__feedback">Woops! Your email address is invalid.</span> */}
                  <input type="email" name="email" placeholder="email" required/>
                </label>

                <label>
                  {/* <span className="c-authentication__feedback">Your password is too short. Let's not make it too easy.</span> */}
                  <input type="password" name="password" placeholder="password" required/>
                </label>
              </div>
              <div className="c-authentication__submit">
                <span onClick={this.props.hideRegister}>
                  <i className="icon-arrow-back"></i>
                </span>

                <button>Register</button>
              </div>
            </form>
          </article>
        </section>
      </section>
    );
  }

  connect() {
    this.setState({
      connecting: true
    });
  }
}

Authentication.propTypes = {
  showRegister: React.PropTypes.bool,
  hideRegister: React.PropTypes.func
};

export default Authentication;
{'fraction_non_alphanumeric': 0.12760416666666666, 'fraction_numerical': 0.0, 'mean_word_length': 1.8066329398538505, 'pattern_counts': {'":': 0, '<': 103, '<?xml version=': 0, '>': 103, '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': '7468958', 'n_tokens_mistral': 1274, 'n_tokens_neox': 1206, 'n_words': 258}