<commit_before>import React, {PropTypes} from "react";
import Header from "./Header.jsx";
import Sidebar from "./Sidebar.jsx";
import History from "./History.jsx";
import Controls from "./Controls.jsx";

import Fluxxor, { StoreWatchMixin } from "fluxxor";
const FluxMixin = Fluxxor.FluxMixin(React);

const Main = React.createClass({
    mixins: [FluxMixin, StoreWatchMixin("history", "search")],

    getStateFromFlux() {
        const flux = this.getFlux();
        return {
            history: flux.store("history").getState(),
            search: flux.store("search").getState()
        };
    },

    render() {
        let results = (
            <div>
            <Controls
                loading={this.state.history.loading}
                paginate={this.state.search.paginate}
                total={this.state.history.items.length} />
            <History
                items={this.state.history.items}
                date={this.state.search.date}
                query={this.state.search.query}
                paginate={this.state.search.paginate} />
            <Controls
                loading={this.state.history.loading}
                paginate={this.state.search.paginate}
                total={this.state.history.items.length} />
            </div>
        );
        if (this.state.history.items.length === 0) {
            results = (
                <div className="alert alert-warning" role="alert">
                    <strong>No results found.</strong>
                    {this.state.search.query !== "" ? " You searched for: \"" + this.state.search.query + "\"" : null}
                </div>
            );
        }
        return (
            <div>
                <Header
                    date={this.state.search.date}
                    query={this.state.search.query} />
                <div className="container-fluid">
                    <div className="row">
                        <Sidebar
                            date={this.state.search.date}
                            query={this.state.search.query}
                            paginate={this.state.search.paginate} />
                        <div className="content col-md-10 col-md-offset-2">
                            {results}
                        </div>
                    </div>
                </div>
            </div>
        );
    }
});

export default Main;<commit_msg>Update imports, and component name to reflect change from Controls to Paginator<commit_after>import React, {PropTypes} from "react";
import Header from "./Header.jsx";
import Sidebar from "./Sidebar.jsx";
import History from "./History.jsx";
import Paginator from "./Paginator.jsx";

import Fluxxor, { StoreWatchMixin } from "fluxxor";
const FluxMixin = Fluxxor.FluxMixin(React);

const Main = React.createClass({
    mixins: [FluxMixin, StoreWatchMixin("history", "search")],

    getStateFromFlux() {
        const flux = this.getFlux();
        return {
            history: flux.store("history").getState(),
            search: flux.store("search").getState()
        };
    },

    render() {
        let results = (
            <div>
            <Paginator
                loading={this.state.history.loading}
                paginate={this.state.search.paginate}
                total={this.state.history.items.length} />
            <History
                items={this.state.history.items}
                date={this.state.search.date}
                query={this.state.search.query}
                paginate={this.state.search.paginate} />
            <Paginator
                loading={this.state.history.loading}
                paginate={this.state.search.paginate}
                total={this.state.history.items.length} />
            </div>
        );
        if (this.state.history.items.length === 0) {
            results = (
                <div className="alert alert-warning" role="alert">
                    <strong>No results found.</strong>
                    {this.state.search.query !== "" ? " You searched for: \"" + this.state.search.query + "\"" : null}
                </div>
            );
        }
        return (
            <div>
                <Header
                    date={this.state.search.date}
                    query={this.state.search.query} />
                <div className="container-fluid">
                    <div className="row">
                        <Sidebar
                            date={this.state.search.date}
                            query={this.state.search.query}
                            paginate={this.state.search.paginate} />
                        <div className="content col-md-10 col-md-offset-2">
                            {results}
                        </div>
                    </div>
                </div>
            </div>
        );
    }
});

export default Main;
{'fraction_non_alphanumeric': 0.12972861842105263, 'fraction_numerical': 0.001644736842105263, 'mean_word_length': 1.387144259077527, 'pattern_counts': {'":': 0, '<': 41, '<?xml version=': 0, '>': 41, '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': '1272381', 'n_tokens_mistral': 1308, 'n_tokens_neox': 1241, 'n_words': 222}