<commit_before>var EventEmitter = require('events');

function warnIfLegacy(eventName) {
  const legacyEvents = [];
  if (legacyEvents.indexOf(eventName) >= 0) {
    console.info(__("this event is deprecated and will be removed in future versions %s", eventName));
  }
}

function log(eventType, eventName) {
  if (['end', 'prefinish', 'error', 'new', 'demo', 'block', 'version'].indexOf(eventName) >= 0) {
    return;
  }
  //console.log(eventType, eventName);
}

EventEmitter.prototype._maxListeners = 200;
const _on         = EventEmitter.prototype.on;
const _setHandler = EventEmitter.prototype.setHandler;

EventEmitter.prototype.on = function(requestName, cb) {
  log("listening to event: ", requestName);
  warnIfLegacy(requestName);
  return _on.call(this, requestName, cb);
};

EventEmitter.prototype.setHandler = function(requestName, cb) {<commit_msg>patch weird event max listeners bug<commit_after>var EventEmitter = require('events');

function warnIfLegacy(eventName) {
  const legacyEvents = [];
  if (legacyEvents.indexOf(eventName) >= 0) {
    console.info(__("this event is deprecated and will be removed in future versions %s", eventName));
  }
}

function log(eventType, eventName) {
  if (['end', 'prefinish', 'error', 'new', 'demo', 'block', 'version'].indexOf(eventName) >= 0) {
    return;
  }
  //console.log(eventType, eventName);
}

EventEmitter.prototype._maxListeners = 300;
const _on         = EventEmitter.prototype.on;
const _setHandler = EventEmitter.prototype.setHandler;

EventEmitter.prototype.on = function(requestName, cb) {
  log("listening to event: ", requestName);
  warnIfLegacy(requestName);
  return _on.call(this, requestName, cb);
};

EventEmitter.prototype.setHandler = function(requestName, cb) {
{'fraction_non_alphanumeric': 0.1420389461626575, 'fraction_numerical': 0.0057273768613974796, 'mean_word_length': 5.195035460992908, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, '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': '6373004', 'n_tokens_mistral': 548, 'n_tokens_neox': 549, 'n_words': 127}