<commit_before>var utils = {
    getMode: function (language) {
        return this._getFor(language, 1);
    },
    
    getSample: function (language) {
        return this._getFor(language, 2);
    },
    
    _getFor: function (language, key) {
        for (var i = 0; i < this._samples.length; i++) { 
            if (this._samples[i][0] === language) {
                return this._samples[i][key];
            }
        }
        return '';
    },
  
    _samples: [
        // Code - Mode - Sample
        ['ruby', 'ruby', 'puts "Hello world"'],
        ['golang', 'golang', 'package main\r\n\r\nimport "fmt"\r\n\r\nfunc main() {\r\n\tfmt.Println("Hello world")\r\n}'],
        ['python2', 'python', 'print "Hello World"'],
        ['python3', 'python', 'print("Hello World")'],
        ['c', 'c_cpp', '#include <stdio.h>\r\n\r\nint main()\r\n{\r\n\tprintf("Hello World\\n");\r\n\treturn 0;\r\n}'],
        ['cpp', 'c_cpp', '#include <iostream>\r\n\r\nint main()\r\n{\r\n\tstd::cout << "Hello World\\n";\r\n\treturn 0;\r\n}'],
        ['csharp', 'csharp', 'using System;\r\n\r\nclass Program\r\n{\r\n\tstatic void Main(string[] args)\r\n\t{\r\n\t\tConsole.WriteLine("Hello world");\r\n\t}\r\n}']
    ]
};
<commit_msg>javascript: switch dirty for to a forEach loop<commit_after>var utils = {
    getMode: function(language) {
        return this._getFor(language, 1);
    },
    
    getSample: function(language) {
        return this._getFor(language, 2);
    },
    
    _getFor: function(language, key) {
        var value = '';
        this._samples.forEach(function(sample) { 
            if (sample[0] == language) value = sample[key]; 
        });
        return value;
    },
  
    _samples: [
        // Code - Mode - Sample
        ['ruby', 'ruby', 'puts "Hello world"'],
        ['golang', 'golang', 'package main\r\n\r\nimport "fmt"\r\n\r\nfunc main() {\r\n\tfmt.Println("Hello world")\r\n}'],
        ['python2', 'python', 'print "Hello World"'],
        ['python3', 'python', 'print("Hello World")'],
        ['c', 'c_cpp', '#include <stdio.h>\r\n\r\nint main()\r\n{\r\n\tprintf("Hello World\\n");\r\n\treturn 0;\r\n}'],
        ['cpp', 'c_cpp', '#include <iostream>\r\n\r\nint main()\r\n{\r\n\tstd::cout << "Hello World\\n";\r\n\treturn 0;\r\n}'],
        ['csharp', 'csharp', 'using System;\r\n\r\nclass Program\r\n{\r\n\tstatic void Main(string[] args)\r\n\t{\r\n\t\tConsole.WriteLine("Hello world");\r\n\t}\r\n}']
    ]
};

{'fraction_non_alphanumeric': 0.22612244897959183, 'fraction_numerical': 0.006122448979591836, 'mean_word_length': 2.380689655172414, 'pattern_counts': {'":': 0, '<': 12, '<?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': '7304960', 'n_tokens_mistral': 934, 'n_tokens_neox': 904, 'n_words': 163}