<commit_before>function Context(options, config, plugins) {
  this._package = options.package;
  this._platform = options.platform;
  this._plugins = plugins;
  this.mode = options.mode;
  this.module = options.module;
  this.fileConfig = options.fileConfig;
  this.config = config;
}
Context.prototype = {
  clone: function() {
    var ret = new Context(this, this.config);
    ret.parent = this;
    var prototype = Object.keys(Context.prototype);
    for (var name in this) {
      if (this.hasOwnProperty(name) && prototype.indexOf(name) === -1) {
        ret[name] = this[name];
      }
    }
    return ret;
  },

  fileNamesForModule: function(mode, moduleName) {
    var context = this.clone();
    context.mode = mode;
    context.module = moduleName && this.config.module(moduleName);
    var configs = this._plugins.generatedFiles(context);
    configs.forEach(function(config) {
      context.fileConfig = config;
      config.fileName = context._plugins.fileName(context);
    });
    return configs;
  },

  get package() { return this._package; },
  get platform() { return this._platform; },
  get platformPath() {
    return this.platform ? this.platform + '/' : '';
  },

  get combined() {
    return this.config.combineModules(this.package);
  },

  get resources() {
    if (this.parent) {
      return this.parent.resources;
    } else {
      return this._resources;
    }
  },
  set resources(value) {
    if (this.parent) {
      this.parent.resources = value;
    } else {
      this._resources = value;
    }
  }
};

module.exports = Context;
<commit_msg>Server parent context relationship on resource set<commit_after>function Context(options, config, plugins) {
  this._package = options.package;
  this._platform = options.platform;
  this._plugins = plugins;
  this.mode = options.mode;
  this.module = options.module;
  this.fileConfig = options.fileConfig;
  this.config = config;
}
Context.prototype = {
  clone: function() {
    var ret = new Context(this, this.config);
    ret.parent = this;
    var prototype = Object.keys(Context.prototype);
    for (var name in this) {
      if (this.hasOwnProperty(name) && prototype.indexOf(name) === -1) {
        ret[name] = this[name];
      }
    }
    return ret;
  },

  fileNamesForModule: function(mode, moduleName) {
    var context = this.clone();
    context.mode = mode;
    context.module = moduleName && this.config.module(moduleName);
    var configs = this._plugins.generatedFiles(context);
    configs.forEach(function(config) {
      context.fileConfig = config;
      config.fileName = context._plugins.fileName(context);
    });
    return configs;
  },

  get package() { return this._package; },
  get platform() { return this._platform; },
  get platformPath() {
    return this.platform ? this.platform + '/' : '';
  },

  get combined() {
    return this.config.combineModules(this.package);
  },

  get resources() {
    if (this.parent) {
      return this.parent.resources;
    } else {
      return this._resources;
    }
  },
  set resources(value) {
    if (this.parent) {
      delete this.parent;
    }
    this._resources = value;
  }
};

module.exports = Context;

{'fraction_non_alphanumeric': 0.13480314960629922, 'fraction_numerical': 0.0006299212598425197, 'mean_word_length': 2.979949874686717, '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': '2679367', 'n_tokens_mistral': 963, 'n_tokens_neox': 962, 'n_words': 209}