<commit_before>var child = {};
var path  = require("path");

process.on("message", function(msg){
  switch(msg.type){
    case "require":
      for (var key in msg.dependencies){
        if (msg.dependencies.hasOwnProperty(key)){
          var dir = path.resolve( process.cwd() + "/" + msg.dependencies[key] );
          child[key] = require(dir);
        }
      }
    break;
    case "registerTasks":
      child.tasks = msg.tasks;
    break;
    case "execute":
      var ret_val = msg.datum;
      for (var i = 0; i < child.tasks.length; i++){
        ret_val = child[child.tasks[i].namespace][child.tasks[i].function](ret_val);
      }
      var ret_msg = { "key" : msg.key, "value" : ret_val};
      process.send(ret_msg);
    break;
  }
});<commit_msg>pass index<commit_after>var child = {};
var path  = require("path");

process.on("message", function(msg){
  switch(msg.type){
    case "require":
      for (var key in msg.dependencies){
        if (msg.dependencies.hasOwnProperty(key)){
          var dir = path.resolve( process.cwd() + "/" + msg.dependencies[key] );
          child[key] = require(dir);
        }
      }
    break;
    case "registerTasks":
      child.tasks = msg.tasks;
    break;
    case "execute":
      var ret_val = msg.datum;
      for (var i = 0; i < child.tasks.length; i++){
        ret_val = child[child.tasks[i].namespace][child.tasks[i].function](ret_val, msg.key);
      }
      var ret_msg = { "key" : msg.key, "value" : ret_val};
      process.send(ret_msg);
    break;
  }
});
{'fraction_non_alphanumeric': 0.1679790026246719, 'fraction_numerical': 0.0013123359580052493, 'mean_word_length': 2.4977064220183487, 'pattern_counts': {'":': 6, '<': 5, '<?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': '992241', 'n_tokens_mistral': 512, 'n_tokens_neox': 505, 'n_words': 106}