<commit_before>import React, { Component } from 'react';
import {Button,FormControl, FormGroup,
       ControlLabel} from 'react-bootstrap';
import logo from './logo.svg';
import './App.css';
import request from 'request';
import url from  'url';

var requestParser = (function() {
    var href = document.location.href;
    var urlObj = url.parse(href, true);

    return {
	href,
	urlObj,
	getQueryStringValue: (key) => {
	    let value = ((urlObj && urlObj.query) && urlObj.query[key]) || null;
	    return value;
	},
	uriMinusPath: urlObj.protocol + '//' + urlObj.hostname + ':' + urlObj.port
    };
})();

class App extends Component {
    constructor(props) {
	super(props);
	this.handleFormSubmit = this.handleFormSubmit.bind(this);
	this.state = {
	    description: '',
	    result: ''}
    }
    handleFormSubmit(e) {
	console.log("hello!!!");
	e.preventDefault();
	var me = this;
	request.post(
	    requestParser.uriMinusPath + '/cycle',
	    { json: {data : this.state.description },
	      function (error, response, body) {
		  if (!error && response.statusCode == 200) {
		      me.setState({result: body});
		  }
	      }
	    }
	);
    }
    handleTextAreaChange(e) {
	this.setState({description: e.target.value});
    }
    render() {
	return (
		<div className="App">
		<div className="App-header">
		<h2>Welcome to the cycle detector</h2>
		</div>
		<form onSubmit={this.handleFormSubmit}>
		<FormGroup controlId="formControlsTextarea">
		<ControlLabel>Textarea</ControlLabel>
		<FormControl componentClass="textarea" placeholder="textarea" />
	        </FormGroup>
		<Button type="submit">Calculate</Button>
		</form>
		<p className="App-intro">
		{this.state.result}
		</p>
		</div>
    );
  }
}<commit_msg>return data from web app<commit_after>import React, { Component } from 'react';
import {Button,FormControl, FormGroup,
       ControlLabel} from 'react-bootstrap';
import logo from './logo.svg';
import './App.css';
import request from 'request';
import url from  'url';

var requestParser = (function() {
    var href = document.location.href;
    var urlObj = url.parse(href, true);

    return {
	href,
	urlObj,
	getQueryStringValue: (key) => {
	    let value = ((urlObj && urlObj.query) && urlObj.query[key]) || null;
	    return value;
	},
	uriMinusPath: urlObj.protocol + '//' + urlObj.hostname + ':' + urlObj.port
    };
})();

class App extends Component {
    constructor(props) {
	super(props);
	this.handleFormSubmit = this.handleFormSubmit.bind(this);
	this.handleTextAreaChange = this.handleTextAreaChange.bind(this);
	this.state = {
	    description: '',
	    result: ''}
    }
    handleFormSubmit(e) {
	console.log("hello!!!");
	e.preventDefault();
	var me = this;
	request.post(
	    requestParser.uriMinusPath + '/cycle',
	    { json: {data : this.state.description } },
	      function (error, response, body) {
		  console.log('body:', body);
		  if (!error && response.statusCode == 200) {
		      me.setState({result: body});
		  }
	      }
	);
    }
    handleTextAreaChange(e) {
	console.log("hello!!!");
	this.setState({description: e.target.value});
    }
    render() {
	return (
		<div className="App">
		<div className="App-header">
		<h2>Welcome to the cycle detector</h2>
		</div>
		<form onSubmit={this.handleFormSubmit}>
		<FormGroup controlId="formControlsTextarea">
		<ControlLabel>Textarea</ControlLabel>
		<FormControl componentClass="textarea"
	    placeholder="textarea"
	    value={this.state.description}
	    onChange={this.handleTextAreaChange} />
	        </FormGroup>
		<Button type="submit">Calculate</Button>
		</form>
		<p className="App-intro">
		{this.state.result}
		</p>
		</div>
    );
  }
}
{'fraction_non_alphanumeric': 0.16312636165577343, 'fraction_numerical': 0.0027233115468409588, 'mean_word_length': 3.452121212121212, 'pattern_counts': {'":': 0, '<': 37, '<?xml version=': 0, '>': 39, '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': '2327561', 'n_tokens_mistral': 1264, 'n_tokens_neox': 1189, 'n_words': 245}