<commit_before>var utils = {
  // probably doesn't handle some cases correctly, but it works fine for what
  // we have now
  deepCopy: function(original) {
    var result;
    if (typeof original == 'object') {
      if (original === null) {
        result = null;
      } else {
        result = original.constructor === Array ? [] : {};
        for (var i in original)
          if (original.hasOwnProperty(i))
            result[i] = this.deepCopy(original[i]);
      }
    } else {
      result = original;
    }

    return result;
  },

  /*
   * Extends 'original' with 'ext'. If a function in 'ext' also exists in
   * 'original', let the 'original' function be accessible in the new object
   * via a  ._super(functionName as String) method. _Cannot_ be used on its
   * result to achieve 'two-level' inheritance.
   */
  extendWithSuper: function(original, ext) {
    var result = this.deepCopy(original);
    var tmpSuper = result._super;
    result._superFunctions = {};
    result._super = function(fname) { return this._superFunctions[fname].bind(this); }
    for (var i in ext)
      if (ext.hasOwnProperty(i)) {
        if (typeof ext[i] == 'function' && typeof original[i] == 'function')
          result._superFunctions[i] = this.deepCopy(original[i]);
        result[i] = this.deepCopy(ext[i]);
      }
    return result;
  },

  /*
   * Takes a dot-notation object string and call the function
   * that it points to with the correct value for 'this'.
   */
  invokeCommandString: function(str, argArray) {
    var components = str.split('.');
    var obj = window;
    for (var i = 0; i < components.length - 1; i++)
      obj = obj[components[i]];
    var func = obj[components.pop()];
    return func.apply(obj, argArray);
  },
};
<commit_msg>Remove util functions that the refactor has rendered unnecessary<commit_after>var utils = {
  /*
   * Takes a dot-notation object string and call the function
   * that it points to with the correct value for 'this'.
   */
  invokeCommandString: function(str, argArray) {
    var components = str.split('.');
    var obj = window;
    for (var i = 0; i < components.length - 1; i++)
      obj = obj[components[i]];
    var func = obj[components.pop()];
    return func.apply(obj, argArray);
  },
};

{'fraction_non_alphanumeric': 0.13018534863195058, 'fraction_numerical': 0.00176522506619594, 'mean_word_length': 2.7286184210526314, 'pattern_counts': {'":': 0, '<': 5, '<?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': '5469456', 'n_tokens_mistral': 682, 'n_tokens_neox': 675, 'n_words': 220}