<commit_before>var React = require('react');
var ClassBuilder = require('../utils/ClassBuilder');

var ClassMixin = {
    propTypes: {
        type: React.PropTypes.string,
        color: React.PropTypes.string,
        is: React.PropTypes.oneOfType([
            React.PropTypes.string,
            React.PropTypes.array
        ]),
        modifier: React.PropTypes.oneOfType([
            React.PropTypes.string,
            React.PropTypes.array
        ])
    },
    ClassMixin_getClass: function(className){
        return ClassMixin.createClassName(className);
    },
    createClassName: function (className) {
        var classBuilder = new ClassBuilder(className);

        classBuilder = this.ClassMixin_applyModifiers(classBuilder);
        classBuilder = this.ClassMixin_applyIs(classBuilder);

        if (this.props.className) {
            classBuilder.add(this.props.className);
        }

        return classBuilder;
    },
    ClassMixin_applyModifiers: function (classBuilder) {
        if (!this.props) {
            var _err = new Error('bd-stampy:ClassMixin_applyModifiers::Props do no exist, skipping.');
            console.log(_err.stack);
            return classBuilder;
        }

        if (this.props.modifier) {
            // Apply the modifiers
            this.props.modifier.split(' ').forEach(function(e) {
                classBuilder.modifier(e);
            });
        }
        return classBuilder;
    },
    ClassMixin_applyIs: function (classBuilder) {
        if (this.props.is) {

            if(typeof this.props.is === 'string'){
                this.props.is = [this.props.is];
            }

            this.props.is.forEach(function(e) {
                classBuilder.is(e);
            });

        }
        return classBuilder;
    }
};

module.exports = ClassMixin;
<commit_msg>context fix<commit_after>var React = require('react');
var ClassBuilder = require('../utils/ClassBuilder');

var ClassMixin = {
    propTypes: {
        type: React.PropTypes.string,
        color: React.PropTypes.string,
        is: React.PropTypes.oneOfType([
            React.PropTypes.string,
            React.PropTypes.array
        ]),
        modifier: React.PropTypes.oneOfType([
            React.PropTypes.string,
            React.PropTypes.array
        ])
    },
    ClassMixin_getClass: function(className){
        return this.createClassName(className);
    },
    createClassName: function (className) {
        var classBuilder = new ClassBuilder(className);

        classBuilder = this.ClassMixin_applyModifiers(classBuilder);
        classBuilder = this.ClassMixin_applyIs(classBuilder);

        if (this.props.className) {
            classBuilder.add(this.props.className);
        }

        return classBuilder;
    },
    ClassMixin_applyModifiers: function (classBuilder) {
        if (!this.props) {
            var _err = new Error('bd-stampy:ClassMixin_applyModifiers::Props do no exist, skipping.');
            console.log(_err.stack);
            return classBuilder;
        }

        if (this.props.modifier) {
            // Apply the modifiers
            this.props.modifier.split(' ').forEach(function(e) {
                classBuilder.modifier(e);
            });
        }
        return classBuilder;
    },
    ClassMixin_applyIs: function (classBuilder) {
        if (this.props.is) {

            if(typeof this.props.is === 'string'){
                this.props.is = [this.props.is];
            }

            this.props.is.forEach(function(e) {
                classBuilder.is(e);
            });

        }
        return classBuilder;
    }
};

module.exports = ClassMixin;

{'fraction_non_alphanumeric': 0.11408296943231441, 'fraction_numerical': 0.0, 'mean_word_length': 1.9508856682769726, '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': '3355095', 'n_tokens_mistral': 1030, 'n_tokens_neox': 1017, 'n_words': 167}