<commit_before>var formatError = function (error) {
  var stack = error.stack
  var message = error.message

  if (stack) {
    if (message && stack.indexOf(message) === -1) {
      stack = message + '\n' + stack
    }

    // remove mocha stack entries
    return stack.replace(/\n.+\/mocha\/mocha.js\?\w*\:.+(?=(\n|$))/g, '')
  }

  return message
}

// non-compliant version of Array::reduce.call (requires memo argument)
var arrayReduce = function (array, reducer, memo) {
  for (var i = 0, len = array.length; i < len; i++) {
    memo = reducer(memo, array[i])
  }
  return memo
}<commit_msg>refactor: remove redundand escape<commit_after>var formatError = function (error) {
  var stack = error.stack
  var message = error.message

  if (stack) {
    if (message && stack.indexOf(message) === -1) {
      stack = message + '\n' + stack
    }

    // remove mocha stack entries
    return stack.replace(/\n.+\/mocha\/mocha.js\?\w*:.+(?=(\n|$))/g, '')
  }

  return message
}

// non-compliant version of Array::reduce.call (requires memo argument)
var arrayReduce = function (array, reducer, memo) {
  for (var i = 0, len = array.length; i < len; i++) {
    memo = reducer(memo, array[i])
  }
  return memo
}
{'fraction_non_alphanumeric': 0.17147568013190437, 'fraction_numerical': 0.0032976092333058533, 'mean_word_length': 2.928802588996764, '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': '1493922', 'n_tokens_mistral': 435, 'n_tokens_neox': 411, 'n_words': 113}