<commit_before>/*!
 * JSON 3
 * http://github.com/kitcambridge/json3
 *
 * Copyright 2012, <NAME>.
 *
 * Released under the MIT License.
*/

;(function (root, Module) {
  if (typeof define == "function" && define.amd) {
    // Export JSON 3 for asynchronous module loaders.
    define("json", ["exports"], Module);
  } else {
    // Export for CommonJS environments, web browsers, and JavaScript engines.
    Module(typeof exports == "object" && exports || this.JSON3 || (this.JSON3 = {}));
  }
})(this, function (JSON3) {
  "use strict";

  // Convenience aliases.
  var getClass = {}.toString, hasOwnProperty = {}.hasOwnProperty, forEach, stringifySupported, parseSupported;

  // The current version. The `JSON.Version` property is non-standard, and thus
  // provided for informational purposes only. You should not rely on it in
  // production code.
  JSON3.Version = "3.0.0-0.8.5";

  // Feature tests to determine whether the native `JSON.stringify` and `parse`
  // implementations are spec-compliant. Based on work by <NAME>.
  stringifySupported = typeof JSON3.stringify == "function";
  parseSupported = typeof JSON3.parse == "function";
  (function () {
    var serialized = '{"result":[1,true,false,null,"\\u0000\\b\\n\\f\\r\\t"]}', toJSON, original, value;
    // Test `JSON.stringify`.
    if (stringifySupported) {
      try {
        // An object with a custom `toJSON` method.
        toJSON = function toJSON() {
          return 1;
        };
        toJSON.toJSON = toJSON;
        switch (false) {
          // Firefox 3.1b1 and 2 serialize string, number, and boolean
          // primitives as object literals.
          case JSON3.stringify(0) === "0":
          // FF 3.1b1, b2, and JSON 2 serialize wrapped primitives as object
          // literals.
          case JSON3.stringify(new (0).constructor()) === "0":
          case JSON3.stringify(new "".constructor()) == '""':
          // FF 3.1b1, 2 will throw an error if the value is `null`,
          // `undefined`, or does not define a canonical JSON representation
          // (this applies to objects with `toJSON` properties as well, *unless*
          // they are nested within an object or array).
          case JSON3.stringify(getClass) === void 0:
          // IE 8 serializes `undefined` as `"undefined"`.
          case JSON3.stringify(void 0) === void 0:
          // Safari 5.1.2 will throw an error if the `value` argument is
          // omitted, but correctly returns `undefined` for the above test.
          case JSON3.stringify() === void 0:
          // FF 3.1b1, 2 will throw an error if the value does not define a
          // canonical JSON representation. This applies to objects with
          // `toJSON` properties, unless they are nested inside object or array
          // literals. YUI 3.0.0b1 ignores custom `toJSON` methods.
          case JSON3.stringify(toJSON) === "1":
          case JSON3.stringify([toJSON]) == "[1]":
          // Prototype <= 1.6.1 serializes `[undefined]` as `"[]"` instead of
          // `"[null]"`.
          case JSON3.stringify([void 0]) == "[null]":
          // YUI 3.0.0b1 fails to serialize `null` literals.
          case JSON3.stringify(null) == "null":
          // FF 3.1b1, 2 will halt serialization if an array contains a function.
          // `[1, true, getClass, 1]` serializes as "[1,true,],". These versions
          // of Firefox also allow trailing commas in JSON objects and arrays.
          case JSON3.stringify([void 0, getClass, null]) == "[null,null,null]":
          // Simple serialization test. FF 3.1b1 uses Unicode escape sequences
          // where character escape codes are required (e.g., `\b` => `\u0008`).
          case JSON3.stringify({ "result": [toJSON, true, false, null, "\0\b\n\f\r\t"] }) == serialized:
          // FF 3.1b1, b2, and Prototype <= 1.7 ignore the `filter` and `width`
          // arguments.
          case JSON3.stringify(null, toJSON) === "1":
          case JSON3.stringify([1, 2], null, 1) == "[\n 1,\n 2\n]":
          // JSON 2, Prototype <= 1.7, and older WebKit builds incorrectly
          // serialize extended years.
          case JSON3.stringify(new Date(-8.64e15)) == '"-271821-04-20T00:00:00.000Z"':
          // The milliseconds are optional in ES 5, but required in 5.1.
          case JSON3.stringify(new Date(8.64e15)) == '"+275760-09-13T00:00:00.000Z"':
            stringifySupported = false;
        }
      } catch (exception) {
        stringifySupported = false;
      }
    }
    // Test `JSON.parse`.
    if (parseSupported) {
      try {
        // FF 3.1b1, 2 will throw an exception if a bare literal is provided.
        // Conforming implementations should also coerce the initial argument to
        // a string prior to parsing.
        if (JSON3.parse("0") === 0 && !JSON3.parse(false)) {
          // Simple parsing test.
          value = JSON3.parse(serialized);
          if (value.result.length != 5 || value.result[0] != 1) {
            parseSupported = false;
          }
          try {
            // Safari <= 5.1.2 and FF 3.1b1 allow unescaped tabs in strings.
            parseSupported = !JSON3.parse('"\t"');
          } catch (exception) {}
        }
      } catch (exception) {
        parseSupported = false;
      }
    }
  })();

  // **hasOwnProperty** determines if a property is a direct property of the given
  // object. Delegates to the native *hasOwnProperty* method, if available.
  if (typeof hasOwnProperty != "function") {
    hasOwnProperty = (function () {
      // Capture a reference to the top-level `Object` constructor.
      var hasOwnProperty, members = {}, constructor = members.constructor;
      if ((members.__proto__ = null, members.__proto__ = {
        // The internal *proto* property cannot be set multiple times in recent
        // versions of Mozilla Firefox and SeaMonkey.
        "toString": 1
      }, members).toString != getClass) {
        // Safari versions 2.0.3 and earlier don't implement *hasOwnProperty*,
        // but support the mutable *proto* property.
        hasOwnProperty = function hasOwnProperty(property) {
          // Capture and break the object's prototype chain. The parenthesized
          // expression prevents an unsafe transformation by the Closure
          // Compiler.
          var original = this.__proto__, result = property in (this.__proto__ = null, this);
          // Restore the original prototype chain.
          this.__proto__ = original;
          return result;
        };
      } else {
        // Use the *constructor* property to simulate *hasOwnProperty* in other
        // environments.
        hasOwnProperty = function hasOwnProperty(property) {
          var parent = (this.constructor || constructor).prototype;
          return property in this && !(property in parent && this[property] === parent[property]);
        };
      }
      return hasOwnProperty;
    })();
  }

  // **forEach** normalizes the `for...in` iteration algorithm across
  // environments. Each enumerated key is yielded to a `callback` function.
  forEach = (function () {
    var members, property, forEach, size = 0;

    // Tests for bugs in the current environment's `for...in` algorithm. The
    // `valueOf` property inherits the non-enumerable flag from
    // `Object.prototype` in JScript.
    function Properties() {
      this.valueOf = 0;
    }
    // Safari 2 enumerates shadowed properties twice.
    Properties.prototype.valueOf = 0;

    // Iterate over a new instance of the `Properties` class.
    members = new Properties();
    for (property in members) {
      // Ignore all other properties inherited from `Object.prototype`.
      if (hasOwnProperty.call(members, property)) {
        size += 1;
      }
    }
    members = null;

    // Normalize the iteration algorithm.
    if (!size) {
      // A list of non-enumerable properties inherited from `Object.prototype`.
      members = ["constructor", "hasOwnProperty", "isPrototypeOf", "propertyIsEnumerable", "toLocaleString", "toString", "valueOf"];
      // IE <= 8, Mozilla 1.0, and Netscape 6.2 ignore shadowed non-enumerable
      // properties.
      forEach = function forEach(object, callback) {
        var isFunction = getClass.call(object) == "[object Function]", property, length;
        for (property in object) {
          if (!(isFunction && property == "prototype") && hasOwnProperty.call(object, property)) {
            callback(property);
          }
        }
        // Manually invoke the callback for each non-enumerable property.
        for (length = members.length; length--;) {
          property = members[length];
          if (hasOwnProperty.call(object, property)) {
            callback(property);
          }
        }
      };
    } else if (size == 2) {
      // Safari 2 enumerates shadowed properties twice.
      forEach = function forEach(object, callback) {
        // Create a set of iterated properties.
        var members = {}, isFunction = getClass.call(object) == "[object Function]", property;
        for (property in object) {
          // Store each property name to prevent double enumeration. The
          // `prototype` property of functions is not enumerated due to cross-
          // environment inconsistencies.<commit_msg>The extended year serialization feature tests should not run under Safari < 2.0.2 if JSON 3 is loaded twice.<commit_after>/*!
 * JSON 3
 * http://github.com/kitcambridge/json3
 *
 * Copyright 2012, <NAME>.
 *
 * Released under the MIT License.
*/

;(function (root, Module) {
  if (typeof define == "function" && define.amd) {
    // Export JSON 3 for asynchronous module loaders.
    define("json", ["exports"], Module);
  } else {
    // Export for CommonJS environments, web browsers, and JavaScript engines.
    Module(typeof exports == "object" && exports || this.JSON3 || (this.JSON3 = {}));
  }
})(this, function (JSON3) {
  "use strict";

  // Convenience aliases.
  var getClass = {}.toString, hasOwnProperty = {}.hasOwnProperty, forEach, stringifySupported, parseSupported;

  // The current version. The `JSON.Version` property is non-standard, and thus
  // provided for informational purposes only. You should not rely on it in
  // production code.
  JSON3.Version = "3.0.0-0.8.5";

  // Feature tests to determine whether the native `JSON.stringify` and `parse`
  // implementations are spec-compliant. Based on work by <NAME>.
  stringifySupported = typeof JSON3.stringify == "function";
  parseSupported = typeof JSON3.parse == "function";
  (function () {
    var serialized = '{"result":[1,true,false,null,"\\u0000\\b\\n\\f\\r\\t"]}', toJSON, original, value;
    // Test `JSON.stringify`.
    if (stringifySupported) {
      // An object with a custom `toJSON` method.
      toJSON = function toJSON() {
        return 1;
      };
      toJSON.toJSON = toJSON;
      try {
        switch (false) {
          // Firefox 3.1b1 and 2 serialize string, number, and boolean
          // primitives as object literals.
          case JSON3.stringify(0) === "0":
          // FF 3.1b1, b2, and JSON 2 serialize wrapped primitives as object
          // literals.
          case JSON3.stringify(new (0).constructor()) === "0":
          case JSON3.stringify(new "".constructor()) == '""':
          // FF 3.1b1, 2 will throw an error if the value is `null`,
          // `undefined`, or does not define a canonical JSON representation
          // (this applies to objects with `toJSON` properties as well, *unless*
          // they are nested within an object or array).
          case JSON3.stringify(getClass) === void 0:
          // IE 8 serializes `undefined` as `"undefined"`.
          case JSON3.stringify(void 0) === void 0:
          // Safari 5.1.2 will throw an error if the `value` argument is
          // omitted, but correctly returns `undefined` for the above test.
          case JSON3.stringify() === void 0:
          // FF 3.1b1, 2 will throw an error if the value does not define a
          // canonical JSON representation. This applies to objects with
          // `toJSON` properties, unless they are nested inside object or array
          // literals. YUI 3.0.0b1 ignores custom `toJSON` methods.
          case JSON3.stringify(toJSON) === "1":
          case JSON3.stringify([toJSON]) == "[1]":
          // Prototype <= 1.6.1 serializes `[undefined]` as `"[]"` instead of
          // `"[null]"`.
          case JSON3.stringify([void 0]) == "[null]":
          // YUI 3.0.0b1 fails to serialize `null` literals.
          case JSON3.stringify(null) == "null":
          // FF 3.1b1, 2 will halt serialization if an array contains a function.
          // `[1, true, getClass, 1]` serializes as "[1,true,],". These versions
          // of Firefox also allow trailing commas in JSON objects and arrays.
          case JSON3.stringify([void 0, getClass, null]) == "[null,null,null]":
          // Simple serialization test. FF 3.1b1 uses Unicode escape sequences
          // where character escape codes are required (e.g., `\b` => `\u0008`).
          case JSON3.stringify({ "result": [toJSON, true, false, null, "\0\b\n\f\r\t"] }) == serialized:
          // FF 3.1b1, b2, and Prototype <= 1.7 ignore the `filter` and `width`
          // arguments.
          case JSON3.stringify(null, toJSON) === "1":
          case JSON3.stringify([1, 2], null, 1) == "[\n 1,\n 2\n]":
          // JSON 2, Prototype <= 1.7, and older WebKit builds incorrectly
          // serialize extended years. Safari < 2.0.2 restricts date time values
          // to the range `[(-2 ** 31), (2 ** 31) - 1]`, so the serialization
          // tests will fail in case JSON 3 is loaded twice.
          case (toJSON = new Date(-8.64e15)).getUTCFullYear() != -271821 || JSON3.stringify(toJSON) == '"-271821-04-20T00:00:00.000Z"':
          // The milliseconds are optional in ES 5, but required in 5.1.
          case (toJSON = new Date(8.64e15)).getUTCFullYear() != 275760 || JSON3.stringify(toJSON) == '"+275760-09-13T00:00:00.000Z"':
            stringifySupported = false;
        }
      } catch (exception) {
        stringifySupported = false;
      }
    }
    // Test `JSON.parse`.
    if (parseSupported) {
      try {
        // FF 3.1b1, 2 will throw an exception if a bare literal is provided.
        // Conforming implementations should also coerce the initial argument to
        // a string prior to parsing.
        if (JSON3.parse("0") === 0 && !JSON3.parse(false)) {
          // Simple parsing test.
          value = JSON3.parse(serialized);
          if (value.result.length != 5 || value.result[0] != 1) {
            parseSupported = false;
          }
          try {
            // Safari <= 5.1.2 and FF 3.1b1 allow unescaped tabs in strings.
            parseSupported = !JSON3.parse('"\t"');
          } catch (exception) {}
        }
      } catch (exception) {
        parseSupported = false;
      }
    }
  })();

  // **hasOwnProperty** determines if a property is a direct property of the given
  // object. Delegates to the native *hasOwnProperty* method, if available.
  if (typeof hasOwnProperty != "function") {
    hasOwnProperty = (function () {
      // Capture a reference to the top-level `Object` constructor.
      var hasOwnProperty, members = {}, constructor = members.constructor;
      if ((members.__proto__ = null, members.__proto__ = {
        // The internal *proto* property cannot be set multiple times in recent
        // versions of Mozilla Firefox and SeaMonkey.
        "toString": 1
      }, members).toString != getClass) {
        // Safari <= 2.0.3 doesn't implement *hasOwnProperty*, but supports the
        // mutable *proto* property.
        hasOwnProperty = function hasOwnProperty(property) {
          // Capture and break the object's prototype chain. The parenthesized
          // expression prevents an unsafe transformation by the Closure
          // Compiler.
          var original = this.__proto__, result = property in (this.__proto__ = null, this);
          // Restore the original prototype chain.
          this.__proto__ = original;
          return result;
        };
      } else {
        // Use the *constructor* property to simulate *hasOwnProperty* in other
        // environments.
        hasOwnProperty = function hasOwnProperty(property) {
          var parent = (this.constructor || constructor).prototype;
          return property in this && !(property in parent && this[property] === parent[property]);
        };
      }
      return hasOwnProperty;
    })();
  }

  // **forEach** normalizes the `for...in` iteration algorithm across
  // environments. Each enumerated key is yielded to a `callback` function.
  forEach = (function () {
    var members, property, forEach, size = 0;

    // Tests for bugs in the current environment's `for...in` algorithm. The
    // `valueOf` property inherits the non-enumerable flag from
    // `Object.prototype` in JScript <= 5.8 and Gecko <= 1.0.
    function Properties() {
      this.valueOf = 0;
    }
    Properties.prototype.valueOf = 0;

    // Iterate over a new instance of the `Properties` class.
    members = new Properties();
    for (property in members) {
      // Ignore all other properties inherited from `Object.prototype`.
      if (hasOwnProperty.call(members, property)) {
        size += 1;
      }
    }
    members = null;

    // Normalize the iteration algorithm.
    if (!size) {
      // A list of non-enumerable properties inherited from `Object.prototype`.
      members = ["constructor", "hasOwnProperty", "isPrototypeOf", "propertyIsEnumerable", "toLocaleString", "toString", "valueOf"];
      // IE <= 8, Mozilla 1.0, and Netscape 6.2 ignore shadowed non-enumerable
      // properties.
      forEach = function forEach(object, callback) {
        var isFunction = getClass.call(object) == "[object Function]", property, length;
        for (property in object) {
          // Gecko <= 1.0 enumerates the `prototype` property of functions under
          // certain conditions; IE does not.
          if (!(isFunction && property == "prototype") && hasOwnProperty.call(object, property)) {
            callback(property);
          }
        }
        // Manually invoke the callback for each non-enumerable property.
        for (length = members.length; length--;) {
          property = members[length];
          if (hasOwnProperty.call(object, property)) {
            callback(property);
          }
        }
      };
    } else if (size == 2) {
      // Safari <= 2.0.4 enumerates shadowed properties twice.
      forEach = function forEach(object, callback) {
        // Create a set of iterated properties.
        var members = {}, isFunction = getClass.call(object) == "[object Function]", property;
        for (property in object) {
          // Store each property name to prevent double enumeration. The
          // `prototype` property of functions is not enumerated due to cross-
          // environment inconsistencies.
{'fraction_non_alphanumeric': 0.12528916929547845, 'fraction_numerical': 0.02292323869610936, 'mean_word_length': 2.2891232924087843, 'pattern_counts': {'":': 24, '<': 24, '<?xml version=': 0, '>': 9, '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': '1244009', 'n_tokens_mistral': 5448, 'n_tokens_neox': 5144, 'n_words': 1806}