<commit_before>define(['underscore', 'jquery'], function(_, $) {
  return function(app) {
    app.components.before('initialize', function() {
      "use strict";
      if (this.require && this.require.paths) {
        var dfd = $.Deferred();
        var requireConfig = this.require;
        var localRequire = require.config(_.extend(requireConfig, {
          context: 'context-' + this.ref,
          baseUrl: this.options.require.packages[0].location
        }));
        localRequire(_.keys(this.require.paths), function(deps) {
          dfd.resolve();
        }, function (err) {
          dfd.reject(err);
        });
        this.require = localRequire;
        return dfd;
      }
    });
  };
});
<commit_msg>Returns the promise instead of the deferred<commit_after>define(['underscore', 'jquery'], function(_, $) {
  return function(app) {
    app.components.before('initialize', function() {
      "use strict";
      if (this.require && this.require.paths) {
        var dfd = $.Deferred();
        var requireConfig = this.require;
        var localRequire = require.config(_.extend(requireConfig, {
          context: 'context-' + this.ref,
          baseUrl: this.options.require.packages[0].location
        }));
        localRequire(_.keys(this.require.paths), function(deps) {
          dfd.resolve();
        }, function (err) {
          dfd.reject(err);
        });
        this.require = localRequire;
        return dfd.promise();
      }
    });
  };
});

{'fraction_non_alphanumeric': 0.1545209176788124, 'fraction_numerical': 0.001349527665317139, 'mean_word_length': 2.310267857142857, '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': '653497', 'n_tokens_mistral': 427, 'n_tokens_neox': 423, 'n_words': 78}