<commit_before>var LoginForm = React.createClass({
    getInitialState: function() {
    return {password: '<PASSWORD>',
            username: 'Введіть Логін'};
    },

    handlePasswordChange: function(e) {
        console.log(e.target.value);
        this.setState({password: e.target.value});
    },
    handleUsernameChange: function(e) {
        console.log(e.target.value);
        this.setState({username: e.target.value});
        console.log('Is Email', this.validateField(this.state.username, validator.isEmail));
    },

    validateField: function(data, validatorClass){
        return validatorClass(data);
    },

    handleSubmit: function(e){
        e.preventDefault();
        $.ajax({
          url: this.props.url,
          dataType: 'json',
          type: 'POST',
          data: {'username': this.state.username,
                 'password': <PASSWORD>},
          success: function(data) {
            //this.setState({data: data});
              console.log(data);
          }.bind(this),
          error: function(xhr, status, err) {
            //this.setState({data: quotes});
            console.error(this.props.url, status, err.toString());
          }.bind(this)
        });
    },


   render: function(){
       return (
        <div className="wrapper">
        <form className="form-signin" method="post" role="form" onSubmit={this.handleSubmit}>
          <h2 className="form-signin-heading text-center">Please login</h2>
          <input type="text" className="form-control" onChange={this.handleUsernameChange} name="username" id="login" value={this.state.username} required=""/>
          <input type="password" className="form-control" onChange={this.handlePasswordChange} id="password" name="password" value={this.state.password} required=""/>
          <label className="checkbox">

          </label>
          <button className="btn btn-lg btn-primary btn-block" id="submit" type="submit">Login</button>
          <button className="btn btn-lg btn-primary btn-block" id="signin" type="button">Sign In</button>
        </form>
        </div>
       )
   }
});


ReactDOM.render(
  <LoginForm url='login'/>,
  document.getElementById('login-wrapper')
);


<commit_msg>removed signin button<commit_after>var LoginForm = React.createClass({
    getInitialState: function() {
    return {password: '<PASSWORD>',
            username: '<NAME>'};
    },

    handlePasswordChange: function(e) {
        console.log(e.target.value);
        this.setState({password: e.target.value});
    },
    handleUsernameChange: function(e) {
        console.log(e.target.value);
        this.setState({username: e.target.value});
        console.log('Is Email', this.validateField(this.state.username, validator.isEmail));
    },

    validateField: function(data, validatorClass){
        return validatorClass(data);
    },

    handleSubmit: function(e){
        e.preventDefault();
        $.ajax({
          url: this.props.url,
          dataType: 'json',
          type: 'POST',
          data: {'username': this.state.username,
                 'password': <PASSWORD>},
          success: function(data) {
            //this.setState({data: data});
              console.log(data);
          }.bind(this),
          error: function(xhr, status, err) {
            //this.setState({data: quotes});
            console.error(this.props.url, status, err.toString());
          }.bind(this)
        });
    },


   render: function(){
       return (
        <div className="wrapper">
        <form className="form-signin" method="post" role="form" onSubmit={this.handleSubmit}>
          <h2 className="form-signin-heading text-center">Please login</h2>
          <input type="text" className="form-control" onChange={this.handleUsernameChange} name="username" id="login" value={this.state.username} required=""/>
          <input type="password" className="form-control" onChange={this.handlePasswordChange} id="password" name="password" value={this.state.password} required=""/>
          <label className="checkbox">

          </label>
          <button className="btn btn-lg btn-primary btn-block" id="submit" type="submit">Login</button>
        </form>
        </div>
       )
   }
});


ReactDOM.render(
  <LoginForm url='login'/>,
  document.getElementById('login-wrapper')
);



{'fraction_non_alphanumeric': 0.15852811849109003, 'fraction_numerical': 0.0009257116408238834, 'mean_word_length': 2.59567387687188, 'pattern_counts': {'":': 0, '<': 36, '<?xml version=': 0, '>': 36, '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': '2837142', 'n_tokens_mistral': 1219, 'n_tokens_neox': 1219, 'n_words': 223}