<commit_before>'use strict';

var
  events    = require('events'),
  util      = require('util'),
  stringify = require('json-stringify-safe'),
  config    = require('../package.json')
;

function ChromeLogger() {
  events.EventEmitter.call(this);

  var
    logger = this,
    stackRegEx = /^ +at (.* \()?(.+):([0-9]+):([0-9]+)\)?$/,
    stackIndex = +process.version.replace(/v([0-9]+)\.([0-9]+).*/g, '$1$2') < 7 ? 4 : 3, // The stacktrace is different between Node.js <= 0.6 and >= 0.7
    dataRef = /("x-chromelogger-data":")[0-9a-z+\/=]+(")/ig
  ;

  logger._process = function(res, type) {
    // Retrieve the data from the arguments
    data = Array.prototype.constructor.apply(this, arguments).slice(2);
    // Get the constructor name for each of the logged objects
    data.forEach(function(d) {
      if (typeof d !== 'object') return;
      d.___class_name = d.constructor.name;
    });

    // Emulate Assert support
    if (type === 'assert') {
      if (data[0] === true) return [];
      else {<commit_msg>Fix global variable leak<commit_after>'use strict';

var
  events    = require('events'),
  util      = require('util'),
  stringify = require('json-stringify-safe'),
  config    = require('../package.json')
;

function ChromeLogger() {
  events.EventEmitter.call(this);

  var
    logger = this,
    stackRegEx = /^ +at (.* \()?(.+):([0-9]+):([0-9]+)\)?$/,
    stackIndex = +process.version.replace(/v([0-9]+)\.([0-9]+).*/g, '$1$2') < 7 ? 4 : 3, // The stacktrace is different between Node.js <= 0.6 and >= 0.7
    dataRef = /("x-chromelogger-data":")[0-9a-z+\/=]+(")/ig
  ;

  logger._process = function(res, type) {
    // Retrieve the data from the arguments
    var data = Array.prototype.constructor.apply(this, arguments).slice(2);
    // Get the constructor name for each of the logged objects
    data.forEach(function(d) {
      if (typeof d !== 'object') return;
      d.___class_name = d.constructor.name;
    });

    // Emulate Assert support
    if (type === 'assert') {
      if (data[0] === true) return [];
      else {
{'fraction_non_alphanumeric': 0.20398251578436133, 'fraction_numerical': 0.020398251578436135, 'mean_word_length': 2.8649155722326456, 'pattern_counts': {'":': 2, '<': 7, '<?xml version=': 0, '>': 5, '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': '5352996', 'n_tokens_mistral': 711, 'n_tokens_neox': 692, 'n_words': 160}