<commit_before>(function() {
  'use strict';

  var L20n = {
    getContext: function L20n_getContext(id) {
      return new Context(id);
    },
  };

  function Source(url, text) {
    this.text = text;
    this.ast = null;
    this.url = url;
  }

  function Resource(id, parser) {
    var self = this;

    this.id = id;
    this.resources = [];
    this.source = null;
    this.isReady = false;
    this.ast = {
      type: 'LOL',
      body: [],
    };

    this.fetch = fetch;
    this.build = build;
    this.addResource = addResource;
    this.linkResource = linkResource;
    this.parse = parse;

    // what is that?
    var _resources_parsed = [];
    // what is that?
    var _imports_positions = [];

    function inlineResource(res, pos) {
      // is this the Context's _resource?
      if (self.source === null) {
        self.ast.body = self.ast.body.concat(res.source.ast.body);
      } else {
        Array.prototype.splice.apply(self.ast.body,
                                     [pos, 1].concat(res.source.ast.body));
      }
    }

    function fetch() {
      var deferreds = [];
      var self = this;
      for (var i in this.resources) {
        deferreds.push(this.resources[i].fetch());
      }
      if (this.id) {
        var deferred = when.defer();
        deferreds.push(deferred.promise);
        loadSourceAsync(this.id).then(<commit_msg>remove resources_parsed since we don't use it anymore<commit_after>(function() {
  'use strict';

  var L20n = {
    getContext: function L20n_getContext(id) {
      return new Context(id);
    },
  };

  function Source(url, text) {
    this.text = text;
    this.ast = null;
    this.url = url;
  }

  function Resource(id, parser) {
    var self = this;

    this.id = id;
    this.resources = [];
    this.source = null;
    this.isReady = false;
    this.ast = {
      type: 'LOL',
      body: [],
    };

    this.fetch = fetch;
    this.build = build;
    this.addResource = addResource;
    this.linkResource = linkResource;
    this.parse = parse;

    // what is that?
    var _imports_positions = [];

    function inlineResource(res, pos) {
      // is this the Context's _resource?
      if (self.source === null) {
        self.ast.body = self.ast.body.concat(res.source.ast.body);
      } else {
        Array.prototype.splice.apply(self.ast.body,
                                     [pos, 1].concat(res.source.ast.body));
      }
    }

    function fetch() {
      var deferreds = [];
      var self = this;
      for (var i in this.resources) {
        deferreds.push(this.resources[i].fetch());
      }
      if (this.id) {
        var deferred = when.defer();
        deferreds.push(deferred.promise);
        loadSourceAsync(this.id).then(
{'fraction_non_alphanumeric': 0.13747714808043876, 'fraction_numerical': 0.003656307129798903, 'mean_word_length': 1.9868995633187774, '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': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5157084', 'n_tokens_mistral': 904, 'n_tokens_neox': 873, 'n_words': 189}