<commit_before>angular.module('one4all').filter('truncate', function () {
    return function (text, length, end, open) {
        if (!open) {
            if (text) {
                if (text.length >= length) {
                    return text.substring(0, length - end.length) + end;
                }
                return text;
            } else {
                return '';<commit_msg>fix(truncate-filter): error when end not set<commit_after>angular.module('one4all').filter('truncate', function () {
    return function (text, length, end, open) {
        if (!open) {
            if (text) {
                if(end === undefined)
                    end = '';
                if (text.length >= length) {
                    return text.substring(0, length - end.length) + end;
                }
                return text;
            } else {
                return '';
{'fraction_non_alphanumeric': 0.1282633371169126, 'fraction_numerical': 0.004540295119182747, 'mean_word_length': 1.3646112600536193, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, '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': '6067681', 'n_tokens_mistral': 236, 'n_tokens_neox': 220, 'n_words': 56}