<commit_before>/** @jsx React.DOM */
'use strict';
var React = require('react');
var request = require('superagent');

var get = function (url, cb) {
  request.get(url)
  .set('Content-Type', 'application/json')
  .end(cb);
}

module.exports = React.createClass({
  getInitialState: function () {
    return { count : this.props.initialCount || 0 };
  },
  componentWillMount: function () {
    get('/value', function (res) {
      this.setState({count: res.body.count});
    }.bind(this));
  },
  onClickInc: function (event) {
    get('/inc', function (res) {
      this.setState({count: res.body.count});
    }.bind(this));
  },
  onClickDec: function (event) {
    get('/dec', function (res) {
      this.setState({count: res.body.count});
    }.bind(this));
  },<commit_msg>fixed a bug where counter inc/dec were changing the url<commit_after>/** @jsx React.DOM */
'use strict';
var React = require('react');
var request = require('superagent');

var get = function (url, cb) {
  request.get(url)
  .set('Content-Type', 'application/json')
  .end(cb);
}

module.exports = React.createClass({
  getInitialState: function () {
    return { count : this.props.initialCount || 0 };
  },
  componentWillMount: function () {
    get('/value', function (res) {
      this.setState({count: res.body.count});
    }.bind(this));
  },
  onClickInc: function (event) {
    event.preventDefault();
    get('/inc', function (res) {
      this.setState({count: res.body.count});
    }.bind(this));
  },
  onClickDec: function (event) {
    event.preventDefault();
    get('/dec', function (res) {
      this.setState({count: res.body.count});
    }.bind(this));
  },
{'fraction_non_alphanumeric': 0.19142512077294685, 'fraction_numerical': 0.0012077294685990338, 'mean_word_length': 3.466307277628032, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '1344729', 'n_tokens_mistral': 540, 'n_tokens_neox': 541, 'n_words': 119}