<commit_before>var hardCodes = require('./stat-codes.json'),
  tinyCodes = require('./tiny-status-codes.json'),
  drMime = require('dr-mime');

var httpUtils = function () {};

module.exports = exports = function ( type ) {
  var codes = null;

  if (type)
  {
    if (type === 'tiny')
    {
      codes = tinyCodes;
    }
    else if (type === 'hard')
    {
      codes = hardCodes;
    }
    else
    {
      throw new Error('');
    }
  }
  else
  {
    codes = hardCodes;
  }

  httpUtils.prototype.statCode = function statCode ( name ) {
    return codes[name];
  };
    
  httpUtils.prototype.statName = function statName ( code ) {
    for (var key in codes)
    {
      if (codes[key] === code)
      {
        return key;
      }
    }
    return false;
  };<commit_msg>Error defined.<commit_after>var hardCodes = require('./stat-codes.json'),
  tinyCodes = require('./tiny-status-codes.json'),
  drMime = require('dr-mime');

var httpUtils = function () {};

module.exports = exports = function ( type ) {
  var codes = null;

  if (type)
  {
    if (type === 'tiny')
    {
      codes = tinyCodes;
    }
    else if (type === 'hard')
    {
      codes = hardCodes;
    }
    else
    {
      throw new Error('type [' + type + '] doesn\'t exist');
    }
  }
  else
  {
    codes = hardCodes;
  }

  httpUtils.prototype.statCode = function statCode ( name ) {
    return codes[name];
  };
    
  httpUtils.prototype.statName = function statName ( code ) {
    for (var key in codes)
    {
      if (codes[key] === code)
      {
        return key;
      }
    }
    return false;
  };
{'fraction_non_alphanumeric': 0.15128688010043942, 'fraction_numerical': 0.0, 'mean_word_length': 2.071290944123314, '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': '1900127', 'n_tokens_mistral': 531, 'n_tokens_neox': 534, 'n_words': 122}