<commit_before>class ModelBuilder {
  constructor(route, Model, ModelInstance, modelDataRetriever) {
    this.route = route;
    this.Model = Model;
    this.ModelInstance = ModelInstance;
    this._modelDataRetriever = modelDataRetriever;
  }

  model(Model) {
    this.Model = Model;
    return this;
  }

  modelInstance(ModelInstance) {
    this.ModelInstance = ModelInstance;
    return this;
  }

  modelDataRetriever(modelDataRetriever) {
    this.modelDataRetriever = modelDataRetriever;
    return this;
  }

  done() {
    return new this.Model(this.route, this.ModelInstance, this.modelDataRetriever);
  }
}

function ModelFactory(SMModel, SMModelInstance, smModelDataRetriever) {
  return function(route) {
    return new ModelBuilder(route, SMModel, SMModelInstance, smModelDataRetriever);
  };
}

ModelFactory.$inject = ['SMModel', 'SMModelInstance', 'smModelDataRetriever'];

angular.module('sm.models').factory('smModelFactory', ModelFactory);
<commit_msg>fix(model-factory): correctly configure the model data retriever<commit_after>class ModelBuilder {
  constructor(route, Model, ModelInstance, modelDataRetriever) {
    this.route = route;
    this.Model = Model;
    this.ModelInstance = ModelInstance;
    this._modelDataRetriever = modelDataRetriever;
  }

  model(Model) {
    this.Model = Model;
    return this;
  }

  modelInstance(ModelInstance) {
    this.ModelInstance = ModelInstance;
    return this;
  }

  modelDataRetriever(modelDataRetriever) {
    this._modelDataRetriever = modelDataRetriever;
    return this;
  }

  done() {
    return new this.Model(this.route, this.ModelInstance, this._modelDataRetriever);
  }
}

function ModelFactory(SMModel, SMModelInstance, smModelDataRetriever) {
  return function(route) {
    return new ModelBuilder(route, SMModel, SMModelInstance, smModelDataRetriever);
  };
}

ModelFactory.$inject = ['SMModel', 'SMModelInstance', 'smModelDataRetriever'];

angular.module('sm.models').factory('smModelFactory', ModelFactory);

{'fraction_non_alphanumeric': 0.1071607411116675, 'fraction_numerical': 0.0, 'mean_word_length': 4.708571428571428, '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': '7109588', 'n_tokens_mistral': 622, 'n_tokens_neox': 613, 'n_words': 112}