<commit_before>'use strict';

function init({
    generatorConfig,
    globalConfig,
    initialPipelineData,
    processors,
    callOrder,
    basePath,
}) {
  return function registerProcessor(type, name, initFn) {
    const processorsConfig = generatorConfig[type];
    const processorConfig = processorsConfig && generatorConfig[type][name];
    const processorGlobalConfig = processorsConfig && generatorConfig[type].global;
    const activeProcessors = processorsConfig && processorsConfig.active;

    // Only add processors which are explicitly marked as active
    if (activeProcessors && activeProcessors.indexOf(name) !== -1) {
      const configs = {
        processorConfig,
        processorGlobalConfig,
        globalConfig,
      };
      const processor = initFn(configs);
      initialPipelineData[name] = `${basePath}/${processorsConfig.path}/${name}`;

      // If it already exists, don't add again<commit_msg>refactor<commit_after>'use strict';

function init({
    generatorConfig,
    globalConfig,
    initialPipelineData,
    processors,
    callOrder,
    basePath,
}) {
  return function registerProcessor(type, name, initFn) {
    const processorsConfig = generatorConfig[type];
    const processorConfig = processorsConfig && processorsConfig[name];
    const processorGlobalConfig = processorsConfig && processorsConfig.global;
    const activeProcessors = processorsConfig && processorsConfig.active;

    // Only add processors which are explicitly marked as active
    if (activeProcessors && activeProcessors.indexOf(name) !== -1) {
      const configs = {
        processorConfig,
        processorGlobalConfig,
        globalConfig,
      };
      const processor = initFn(configs);
      initialPipelineData[name] = `${basePath}/${processorsConfig.path}/${name}`;

      // If it already exists, don't add again
{'fraction_non_alphanumeric': 0.09832522960561858, 'fraction_numerical': 0.0010804970286331713, 'mean_word_length': 3.688607594936709, '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': '5710361', 'n_tokens_mistral': 478, 'n_tokens_neox': 461, 'n_words': 119}