<commit_before>/** @jsx React.DOM */

var React = require("react/addons");

var BackboneMixin = require("../mixins/BackboneMixin.js");
var User = require("../models/User");

var SignIn = React.createClass({

  displayName: "SignIn",

  propTypes: {
    className: React.PropTypes.string,
    model: React.PropTypes.instanceOf(User).isRequired
  },

  mixins: [BackboneMixin],

  handleEmailChange: function (event) {
    this.props.model.set({email: event.target.value});
  },

  handlePasswordChange: function (event) {
    this.props.model.set({password: event.target.value});
  },

  handleSignIn: function (event) {
    event.preventDefault();
    this.props.model.login({
      success: function (response) {
        if (response.email != null) {
          // go to home
          window.location.hash = "";
        }
      }
    });
  },

  render: function() {
    var model = this.props.model;

    /* jshint trailing:false, quotmark:false, newcap:false */
    return (
      <form className={this.props.className} role="form">
        <div className="form-group">
          <label>Email address</label>
          <input
              className="form-control"
              onChange={this.handleEmailChange}
              placeholder="Enter email"
              type="email"
              value={model.get("email")} />
        </div>
        <div className="form-group">
          <label>Password</label>
          <input
              className="form-control"
              placeholder="Password"
              onChange={this.handlePasswordChange}
              type="password"
              value={model.get("password")} />
        </div>
        <ul className="list-inline">
          <li>
            <button
                className="btn btn-default"
                onClick={this.handleSignIn}>
              Sign in
            </button>
          </li>
          <li>
            <a href="/">Cancel</a>
          </li>
        </ul>
      </form>
    );
  }
});

module.exports = SignIn;
<commit_msg>Printing out route<commit_after>/** @jsx React.DOM */

var React = require("react/addons");

var BackboneMixin = require("../mixins/BackboneMixin.js");
var User = require("../models/User");

var SignIn = React.createClass({

  displayName: "SignIn",

  propTypes: {
    className: React.PropTypes.string,
    model: React.PropTypes.instanceOf(User).isRequired,
    route: React.PropTypes.string.isRequired
  },

  mixins: [BackboneMixin],

  handleEmailChange: function (event) {
    this.props.model.set({email: event.target.value});
  },

  handlePasswordChange: function (event) {
    this.props.model.set({password: event.target.value});
  },

  handleSignIn: function (event) {
    event.preventDefault();
    this.props.model.login({
      success: function (response) {
        if (response.email != null) {
          // go to home
          window.location.hash = "";
        }
      }
    });
  },

  render: function() {
    console.log("Rendered: " + this.props.route);

    var model = this.props.model;

    /* jshint trailing:false, quotmark:false, newcap:false */
    return (
      <form className={this.props.className} role="form">
        <div className="form-group">
          <label>Email address</label>
          <input
              className="form-control"
              onChange={this.handleEmailChange}
              placeholder="Enter email"
              type="email"
              value={model.get("email")} />
        </div>
        <div className="form-group">
          <label>Password</label>
          <input
              className="form-control"
              placeholder="Password"
              onChange={this.handlePasswordChange}
              type="password"
              value={model.get("password")} />
        </div>
        <ul className="list-inline">
          <li>
            <button
                className="btn btn-default"
                onClick={this.handleSignIn}>
              Sign in
            </button>
          </li>
          <li>
            <a href="/">Cancel</a>
          </li>
        </ul>
      </form>
    );
  }
});

module.exports = SignIn;

{'fraction_non_alphanumeric': 0.14627659574468085, 'fraction_numerical': 0.0, 'mean_word_length': 1.9257425742574257, 'pattern_counts': {'":': 0, '<': 47, '<?xml version=': 0, '>': 47, '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': '4594059', 'n_tokens_mistral': 1188, 'n_tokens_neox': 1174, 'n_words': 212}