<commit_before>'use strict';

/** Load Node.js modules. */
var vm = require('vm');

/** Load other modules. */
var _ = require('lodash-compat'),
    build = require('../bin/lodash'),
    minify = require('../lib/minify.js'),
    util = require('../lib/util.js');

/** Module references. */
var fs = util.fs,
    path = util.path;

/** The unit testing framework. */
var QUnit = (
  global.QUnit = require('qunitjs'),
  require('qunit-extras').runInContext(global),
  global.QUnit
);

/** Used to avoid `noglobal` false positives caused by `errno` leaked in Node.js. */
global.errno = true;

/** The current working directory. */
var cwd = process.cwd();

/** Used to indicate if running in Windows. */
var isWindows = process.platform == 'win32';

/** Used to prefix relative paths from the current directory. */
var relativePrefix = '.' + path.sep;

/** Used to match the copyright header in builds. */
var reHeader = /^\/\*[\s\S]+?\*\/\n/;

/** Shortcut used to push arrays of values to an array. */
var push = Array.prototype.push;

/** The time limit for the tests to run (milliseconds). */
var timeLimit = _.reduce(process.argv, function(result, value, index) {
  if (/--time-limit/.test(value)) {
    return parseInt(process.argv[index + 1].replace(/(\d+h)?(\d+m)?(\d+s)?/, function(match, h, m, s) {
      return ((parseInt(h) || 0) * 3600000) +
             ((parseInt(m) || 0) * 60000) +
             ((parseInt(s) || 0) * 1000);
    })) || result;
  }
  return result;
}, 0);

/** Used to map aliases to their real names. */
var aliasToRealMap = createMap({
  'all': 'every',
  'any': 'some',
  'backflow': 'flowRight',
  'collect': 'map',
  'compose': 'flowRight',
  'contains': 'includes',
  'detect': 'find',
  'each': 'forEach',
  'eachRight': 'forEachRight',
  'extend': 'assign',
  'foldl': 'reduce',
  'foldr': 'reduceRight',
  'head': 'first',
  'include': 'includes',
  'inject': 'reduce',
  'iteratee': 'callback',
  'methods': 'functions',
  'object': 'zipObject',
  'reverse': 'wrapperReverse',
  'select': 'filter',
  'tail': 'rest',
  'toJSON': 'wrapperValue',
  'unique': 'uniq',
  'valueOf': 'wrapperValue',
  'value': 'wrapperValue'
});

/** Used to map real names to their aliases. */
var realToAliasMap = createMap({
  'assign': ['extend'],
  'callback': ['iteratee'],
  'every': ['all'],
  'filter': ['select'],
  'find': ['detect'],
  'first': ['head'],
  'flowRight': ['backflow', 'compose'],
  'forEach': ['each'],
  'forEachRight': ['eachRight'],
  'functions': ['methods'],
  'includes': ['contains', 'include'],
  'map': ['collect'],
  'reduce': ['foldl', 'inject'],
  'reduceRight': ['foldr'],
  'rest': ['tail'],
  'some': ['any'],
  'uniq': ['unique'],
  'wrapperReverse': ['reverse'],
  'wrapperValue': ['toJSON', 'value', 'valueOf'],
  'zipObject': ['object']
});

/** Used to track the category of identifiers. */
var categoryMap = createMap({
  'Array': [
    'chunk',
    'compact',
    'difference',
    'drop',
    'dropRight',
    'dropRightWhile',
    'dropWhile',
    'findIndex',
    'findLastIndex',
    'first',
    'flatten',
    'flattenDeep',
    'indexOf',
    'initial',
    'intersection',
    'last',
    'lastIndexOf',<commit_msg>Update alias map in tests.<commit_after>'use strict';

/** Load Node.js modules. */
var vm = require('vm');

/** Load other modules. */
var _ = require('lodash-compat'),
    build = require('../bin/lodash'),
    minify = require('../lib/minify.js'),
    util = require('../lib/util.js');

/** Module references. */
var fs = util.fs,
    path = util.path;

/** The unit testing framework. */
var QUnit = (
  global.QUnit = require('qunitjs'),
  require('qunit-extras').runInContext(global),
  global.QUnit
);

/** Used to avoid `noglobal` false positives caused by `errno` leaked in Node.js. */
global.errno = true;

/** The current working directory. */
var cwd = process.cwd();

/** Used to indicate if running in Windows. */
var isWindows = process.platform == 'win32';

/** Used to prefix relative paths from the current directory. */
var relativePrefix = '.' + path.sep;

/** Used to match the copyright header in builds. */
var reHeader = /^\/\*[\s\S]+?\*\/\n/;

/** Shortcut used to push arrays of values to an array. */
var push = Array.prototype.push;

/** The time limit for the tests to run (milliseconds). */
var timeLimit = _.reduce(process.argv, function(result, value, index) {
  if (/--time-limit/.test(value)) {
    return parseInt(process.argv[index + 1].replace(/(\d+h)?(\d+m)?(\d+s)?/, function(match, h, m, s) {
      return ((parseInt(h) || 0) * 3600000) +
             ((parseInt(m) || 0) * 60000) +
             ((parseInt(s) || 0) * 1000);
    })) || result;
  }
  return result;
}, 0);

/** Used to map aliases to their real names. */
var aliasToRealMap = createMap({
  'all': 'every',
  'any': 'some',
  'backflow': 'flowRight',
  'collect': 'map',
  'compose': 'flowRight',
  'contains': 'includes',
  'detect': 'find',
  'each': 'forEach',
  'eachRight': 'forEachRight',
  'extend': 'assign',
  'foldl': 'reduce',
  'foldr': 'reduceRight',
  'head': 'first',
  'include': 'includes',
  'inject': 'reduce',
  'iteratee': 'callback',
  'methods': 'functions',
  'object': 'zipObject',
  'reverse': 'wrapperReverse',
  'select': 'filter',
  'tail': 'rest',
  'toJSON': 'wrapperValue',
  'toString': 'wrapperToString',
  'unique': 'uniq',
  'valueOf': 'wrapperValue',
  'value': 'wrapperValue'
});

/** Used to map real names to their aliases. */
var realToAliasMap = createMap({
  'assign': ['extend'],
  'callback': ['iteratee'],
  'every': ['all'],
  'filter': ['select'],
  'find': ['detect'],
  'first': ['head'],
  'flowRight': ['backflow', 'compose'],
  'forEach': ['each'],
  'forEachRight': ['eachRight'],
  'functions': ['methods'],
  'includes': ['contains', 'include'],
  'map': ['collect'],
  'reduce': ['foldl', 'inject'],
  'reduceRight': ['foldr'],
  'rest': ['tail'],
  'some': ['any'],
  'uniq': ['unique'],
  'wrapperReverse': ['reverse'],
  'wrapperToString': ['toString'],
  'wrapperValue': ['toJSON', 'value', 'valueOf'],
  'zipObject': ['object']
});

/** Used to track the category of identifiers. */
var categoryMap = createMap({
  'Array': [
    'chunk',
    'compact',
    'difference',
    'drop',
    'dropRight',
    'dropRightWhile',
    'dropWhile',
    'findIndex',
    'findLastIndex',
    'first',
    'flatten',
    'flattenDeep',
    'indexOf',
    'initial',
    'intersection',
    'last',
    'lastIndexOf',
{'fraction_non_alphanumeric': 0.2199349945828819, 'fraction_numerical': 0.007119640922457824, 'mean_word_length': 3.5829787234042554, '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': '1591299', 'n_tokens_mistral': 2217, 'n_tokens_neox': 2165, 'n_words': 581}