<commit_before>import React from 'react';
import ReactDOM from 'react-dom';

import BarChart from 'rc-d3/bar-chart';


let mouseOverHandler = function (e) {
    console.log(e);
}



class BarChartContainer extends React.Component {
    constructor(props) {
        super(props);
        this.data = this.generateData();
    }

    generateData() {
        let data = [],
            keys = ['<KEY>'];

        keys.map((key, i) => {
            data.push({key: key, value: this.getRandomArbitrary(0.1, 0)});
        })
        return data;
    }



    turnOnSetTimeout() {
        setInterval( this.updateData.bind(this), 100);
    }


    generateDataSingle() {
        this.data[0].value = this.getRandomArbitrary(0.08, 0);
        return this.data;
    }

    getRandomArbitrary(min, max) {
        return Math.random() * (max - min) + min;
    }

    updateData (e) {
        this.data = this.generateData();
        this.forceUpdate();
    }

    render() {
        return <div>
            <input type='button' value='reset the data' onClick={this.updateData.bind(this)}></input>
            <input type='button' value='Turn On setTimeOut' onClick={this.turnOnSetTimeout.bind(this)}></input>
            <BarChart
            mouseOverHandler={mouseOverHandler}
            data={this.data}/>
            <BarChart
                mouseOverHandler={mouseOverHandler}
                width={100}
                height={60}
                data={this.data}/>
        </div>
    }
}

<commit_msg>Single bar chart in the testing framework<commit_after>import React from 'react';
import ReactDOM from 'react-dom';

import BarChart from 'rc-d3/bar-chart';


let mouseOverHandler = function (e) {
    console.log(e);
}



class BarChartContainer extends React.Component {
    constructor(props) {
        super(props);
        this.data = this.generateData();
    }

    generateData() {
        let data = [],
            keys = ['<KEY>'];

        keys.map((key, i) => {
            data.push({key: key, value: this.getRandomArbitrary(0.1, 0)});
        })
        return data;
    }



    turnOnSetTimeout() {
        setInterval( this.updateData.bind(this), 500);
    }


    generateDataSingle() {
        this.data[0].value = this.getRandomArbitrary(0.08, 0);
        return this.data;
    }

    getRandomArbitrary(min, max) {
        return Math.random() * (max - min) + min;
    }

    updateData (e) {
        this.data = this.generateData();
        this.forceUpdate();
    }

    render() {
        return <div>
            <input type='button' value='reset the data' onClick={this.updateData.bind(this)}></input>
            <input type='button' value='Turn On setTimeOut' onClick={this.turnOnSetTimeout.bind(this)}></input>
            <BarChart
            mouseOverHandler={mouseOverHandler}
            data={this.data}/>
        </div>
    }
}


{'fraction_non_alphanumeric': 0.14101221640488656, 'fraction_numerical': 0.01012216404886562, 'mean_word_length': 2.101731601731602, 'pattern_counts': {'":': 0, '<': 20, '<?xml version=': 0, '>': 22, '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': '3483081', 'n_tokens_mistral': 902, 'n_tokens_neox': 855, 'n_words': 171}