<commit_before>define(['react', 'q', './mixins', './table-heading', './table-body', './pager'],
    function (React, Q, mixins, TableHeading, TableBody, Pager) {

  'use strict';

  var ContentTable = React.createClass({

    displayName: 'ContentTable',

    getInitialState: function () {
      return {
        offset: 0,
        size: 25,
        items: [],
        allItems: [],
        query: {select: []}
      };
    },

    mixins: [mixins.BuildsQuery, mixins.SetStateProperty, mixins.ComputableState],

    computeState: function (props) {

      var that = this
        , state = this.state
        , type = props.list.type;

      var modelP = props.service.fetchModel();
      var summaryFieldsP = props.service.fetchSummaryFields();

      state.offset = 0;
      state.items = state.allItems.filter(this.rowMatchesFilter(props.filterTerm));
      this.setState(state);

      Q.spread([modelP, summaryFieldsP], this.buildQuery.bind(this, props));

    },
    
    render: function () {
      return React.DOM.div(
          null,
          Pager({
            offset: this.state.offset,
            size: this.state.size,
            length: this.state.items.length,
            back: this._goBack,
            next: this._goNext
          }),
          React.DOM.table(
            {className: 'table table-striped'},
            TableHeading({
              service: this.props.service,
              view: this.state.query.select,
            }),
            TableBody({
              offset: this.state.offset,
              size: this.state.size,
              rows:       this.state.items,
              filterTerm: this.props.filterTerm,
              allSelected: this.state.allSelected,
              onCount:    this.setStateProperty.bind(this, 'total')
            })));
    },

    _goBack: function () {
      this.setStateProperty('offset', Math.max(0, this.state.offset - this.state.size));
    },

    _goNext: function () {<commit_msg>Provide the view to the table body.<commit_after>define(['react', 'q', './mixins', './table-heading', './table-body', './pager'],
    function (React, Q, mixins, TableHeading, TableBody, Pager) {

  'use strict';

  var ContentTable = React.createClass({

    displayName: 'ContentTable',

    getInitialState: function () {
      return {
        offset: 0,
        size: 25,
        items: [],
        allItems: [],
        query: {select: []}
      };
    },

    mixins: [mixins.BuildsQuery, mixins.SetStateProperty, mixins.ComputableState],

    computeState: function (props) {

      var that = this
        , state = this.state
        , type = props.list.type;

      var modelP = props.service.fetchModel();
      var summaryFieldsP = props.service.fetchSummaryFields();

      state.offset = 0;
      state.items = state.allItems.filter(this.rowMatchesFilter(props.filterTerm));
      this.setState(state);

      Q.spread([modelP, summaryFieldsP], this.buildQuery.bind(this, props));

    },
    
    render: function () {
      return React.DOM.div(
          null,
          Pager({
            offset: this.state.offset,
            size: this.state.size,
            length: this.state.items.length,
            back: this._goBack,
            next: this._goNext
          }),
          React.DOM.table(
            {className: 'table table-striped'},
            TableHeading({
              service: this.props.service,
              view: this.state.query.select,
            }),
            TableBody({
              offset: this.state.offset,
              size: this.state.size,
              rows:       this.state.items,
              view: this.state.query.select,
              filterTerm: this.props.filterTerm,
              allSelected: this.state.allSelected,
              onCount:    this.setStateProperty.bind(this, 'total')
            })));
    },

    _goBack: function () {
      this.setStateProperty('offset', Math.max(0, this.state.offset - this.state.size));
    },

    _goNext: function () {
{'fraction_non_alphanumeric': 0.13396650837290677, 'fraction_numerical': 0.0024993751562109472, 'mean_word_length': 1.881209503239741, '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': '5068292', 'n_tokens_mistral': 1162, 'n_tokens_neox': 1135, 'n_words': 222}