<commit_before>Polymer({
    is: 'editor-console-item',

    properties: {
        type: {
            type: String,
            value: 'log',
        },

        count: {
            type: Number,
            value: 0,
        },

        text: {
            type: String,
            value: '',
        },

        showCount: {
            type: Boolean,
            value: false,
        },

        folded: {
            type: Boolean,
            value: false,
            reflectToAttribute: true,
        },

        detail: {
            type: String,
            value: '',
        }
    },

    ready: function (){
        this.description = this.text.split("\n")[0];
        var firstLine = this.text.indexOf('\n');
        if (firstLine > 0) {
            this.detail = this.text.substring(firstLine + 1);
        }
    },

    _typeClass: function ( type ) {
        return 'item layout horizontal ' + type;
    },

    _iconClass: function (type) {
        switch (type) {
            case 'error':
                return 'fa fa-times-circle icon';
            break;
            case 'warn':
                return 'fa fa-warning icon';
            break;
            default:
                return '';
            break;
        }
    },

    _textClass: function (detail) {
        if (detail) {
            return 'text more';
        }
        else {
            return 'text';
        }
    },

    _showCount: function ( showCount, count ) {
        if ( showCount && count > 0 ) {
            return true;
        }

        return false;
    },

    _computedCount: function ( count ) {
        return count + 1;
    },

    _onFoldClick: function () {
        this.folded = !this.folded;
    },

    _foldClass: function ( detail, folded ) {
        if (!detail) {
            return;
        }
        return folded ? 'fa fold fa-caret-down' : 'fa fold fa-caret-right';
    },
});
<commit_msg>fix code<commit_after>Polymer({
    is: 'editor-console-item',

    properties: {
        type: {
            type: String,
            value: 'log',
        },

        count: {
            type: Number,
            value: 0,
        },

        text: {
            type: String,
            value: '',
        },

        showCount: {
            type: Boolean,
            value: false,
        },

        folded: {
            type: Boolean,
            value: false,
            reflectToAttribute: true,
        },

        detail: {
            type: String,
            value: '',
        }
    },

    ready: function (){
        this.description = this.text.split('\n')[0];
        var firstLine = this.text.indexOf('\n');
        if (firstLine > 0) {
            this.detail = this.text.substring(firstLine + 1);
        }
    },

    _typeClass: function ( type ) {
        return 'item layout horizontal ' + type;
    },

    _iconClass: function (type) {
        switch (type) {
            case 'error':
                return 'fa fa-times-circle icon';
            break;
            case 'warn':
                return 'fa fa-warning icon';
            break;
            default:
                return '';
            break;
        }
    },

    _textClass: function (detail) {
        if (detail) {
            return 'text more';
        }
        else {
            return 'text';
        }
    },

    _showCount: function ( showCount, count ) {
        if ( showCount && count > 0 ) {
            return true;
        }

        return false;
    },

    _computedCount: function ( count ) {
        return count + 1;
    },

    _onFoldClick: function () {
        this.folded = !this.folded;
    },

    _foldClass: function ( detail, folded ) {
        if (!detail) {
            return;
        }
        return folded ? 'fa fold fa-caret-down' : 'fa fold fa-caret-right';
    },
});

{'fraction_non_alphanumeric': 0.12105400469606052, 'fraction_numerical': 0.0031307070180015655, 'mean_word_length': 1.149103139013453, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, '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': '7607844', 'n_tokens_mistral': 1100, 'n_tokens_neox': 1058, 'n_words': 251}