<commit_before>
const React = require('react');

/** A row component which holds a number of cells. {{{2 */
const GameRow = React.createClass({

    propTypes: {
        rowClasses: React.PropTypes.array,
        rowChars: React.PropTypes.array,
        onCellClick: React.PropTypes.func,
        y: React.PropTypes.number,
        startX: React.PropTypes.number,
        rowClass: React.PropTypes.string
    },

    shouldComponentUpdate: function(nextProps) {
        if (this.props.rowClasses.length === nextProps.rowClasses.length) {
            if (this.props.rowChars.length === nextProps.rowChars.length) {

                const classesLen = this.props.rowClasses.length;
                for (let i = 0; i < classesLen; i++) {
                    if (this.props.rowClasses[i] !== nextProps.rowClasses[i]) {
                        return true;
                    }
                }

                const charsLen = this.props.rowChars.length;
                for (let j = 0; j < charsLen; j++) {
                    if (this.props.rowChars[j] !== nextProps.rowChars[j]) {
                        return true;
                    }
                }

            }
            return false;
        }
        return true;
    },

    onCellClick: function(x, y) {
        this.props.onCellClick(x, y);
    },

    render: function() {<commit_msg>Renders now always if row class changes.<commit_after>
const React = require('react');

/** A row component which holds a number of cells. {{{2 */
const GameRow = React.createClass({

    propTypes: {
        rowClasses: React.PropTypes.array,
        rowChars: React.PropTypes.array,
        onCellClick: React.PropTypes.func,
        y: React.PropTypes.number,
        startX: React.PropTypes.number,
        rowClass: React.PropTypes.string
    },

    shouldComponentUpdate: function(nextProps) {
        if (this.props.rowClass !== nextProps.rowClass) {
            return true;
        }

        if (this.props.rowClasses.length === nextProps.rowClasses.length) {
            if (this.props.rowChars.length === nextProps.rowChars.length) {

                const classesLen = this.props.rowClasses.length;
                for (let i = 0; i < classesLen; i++) {
                    if (this.props.rowClasses[i] !== nextProps.rowClasses[i]) {
                        return true;
                    }
                }

                const charsLen = this.props.rowChars.length;
                for (let j = 0; j < charsLen; j++) {
                    if (this.props.rowChars[j] !== nextProps.rowChars[j]) {
                        return true;
                    }
                }

            }
            return false;
        }
        return true;
    },

    onCellClick: function(x, y) {
        this.props.onCellClick(x, y);
    },

    render: function() {
{'fraction_non_alphanumeric': 0.11577832686198376, 'fraction_numerical': 0.002117896223085069, 'mean_word_length': 1.571687840290381, 'pattern_counts': {'":': 0, '<': 7, '<?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': '3358533', 'n_tokens_mistral': 827, 'n_tokens_neox': 767, 'n_words': 169}