<commit_before>/**
 * Simply.js
 * @namespace simply
 */
var simply = (function() {

var noop = typeof util2 !== 'undefined' ? util2.noop : function() {};

var simply = {};

simply.state = {};
simply.packages = {};
simply.listeners = {};

simply.settingsUrl = 'http://meiguro.com/simplyjs/settings.html';

simply.init = function() {
  if (!simply.inited) {
    simply.inited = true;
    ajax.onHandler = function(type, handler) {
      return simply.wrapHandler(handler, 2);
    };
  }

  simply.loadMainScript();
};

simply.wrapHandler = function() {
  return simply.impl.wrapHandler.apply(this, arguments);
};

simply.begin = function() {
};

simply.end = function() {
  simply.state.run = false;
};

simply.reset = function() {
  simply.state = {};
  simply.packages = {};
  simply.off();
  simply.state.run = true;
  simply.state.numPackages = 0;
  simply.accelInit();
};

/**
 * Simply.js event handler callback.
 * @callback simply.eventHandler
 * @param {simply.event} event - The event object with event specific information.
 */

simply.onAddHandler = function() {
  simply.accelAutoSubscribe();
};

simply.onRemoveHandler = function() {
  simply.accelAutoSubscribe();
};

simply.countHandlers = function(type, subtype) {
  if (!subtype) {
    subtype = 'all';
  }
  var typeMap = simply.listeners;
  var subtypeMap = typeMap[type];
  if (!subtypeMap) {
    return 0;
  }<commit_msg>Turn off all handlers before resetting state<commit_after>/**
 * Simply.js
 * @namespace simply
 */
var simply = (function() {

var noop = typeof util2 !== 'undefined' ? util2.noop : function() {};

var simply = {};

simply.state = {};
simply.packages = {};
simply.listeners = {};

simply.settingsUrl = 'http://meiguro.com/simplyjs/settings.html';

simply.init = function() {
  if (!simply.inited) {
    simply.inited = true;
    ajax.onHandler = function(type, handler) {
      return simply.wrapHandler(handler, 2);
    };
  }

  simply.loadMainScript();
};

simply.wrapHandler = function() {
  return simply.impl.wrapHandler.apply(this, arguments);
};

simply.begin = function() {
};

simply.end = function() {
  simply.state.run = false;
};

simply.reset = function() {
  simply.off();
  simply.packages = {};
  simply.state = {};
  simply.state.run = true;
  simply.state.numPackages = 0;
  simply.accelInit();
};

/**
 * Simply.js event handler callback.
 * @callback simply.eventHandler
 * @param {simply.event} event - The event object with event specific information.
 */

simply.onAddHandler = function() {
  simply.accelAutoSubscribe();
};

simply.onRemoveHandler = function() {
  simply.accelAutoSubscribe();
};

simply.countHandlers = function(type, subtype) {
  if (!subtype) {
    subtype = 'all';
  }
  var typeMap = simply.listeners;
  var subtypeMap = typeMap[type];
  if (!subtypeMap) {
    return 0;
  }
{'fraction_non_alphanumeric': 0.16198934280639432, 'fraction_numerical': 0.003552397868561279, 'mean_word_length': 3.6855241264559067, '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': '6153341', 'n_tokens_mistral': 957, 'n_tokens_neox': 956, 'n_words': 194}