<commit_before>'use strict';

var AppModule = function (options) {
  this.options = options;
  this.initialize(options);
};

AppModule.prototype = {
  // Initialize is an empty function by default. Override it with your own
  // initialization logic which can be used to register
  // application routes
  initialize: function () {},

  // start module
  start: function (callback) {
    if (this.app) {
      // return current app if it has already been started
      return this.app;
    }

    this.app = this._startApp();

    if (callback) {
      callback();
    }
    return this.app;
  },

  // stop is an empty function by default.
  // to handle all the logic to close the module
  stop: function () {},

  // _startApp is an empty function by default.
  // a private method to start the application
  _startApp: function () {}
};

// copy Backbone extend to ease module setup
AppModule.extend = Backbone.Model.extend;<commit_msg>fix(start): add guard condition on callback<commit_after>'use strict';

var AppModule = function (options) {
  this.options = options;
  this.initialize(options);
};

AppModule.prototype = {
  // Initialize is an empty function by default. Override it with your own
  // initialization logic which can be used to register
  // application routes
  initialize: function () {},

  // start module
  start: function (callback) {
    if (this.app) {
      // return current app if it has already been started
      return this.app;
    }

    this.app = this._startApp();

    if (callback && 'function' === typeof(callback)) {
      callback();
    }
    return this.app;
  },

  // stop is an empty function by default.
  // to handle all the logic to close the module
  stop: function () {},

  // _startApp is an empty function by default.
  // a private method to start the application
  _startApp: function () {}
};

// copy Backbone extend to ease module setup
AppModule.extend = Backbone.Model.extend;
{'fraction_non_alphanumeric': 0.10591259640102828, 'fraction_numerical': 0.0, 'mean_word_length': 2.8764940239043826, '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': '781813', 'n_tokens_mistral': 539, 'n_tokens_neox': 527, 'n_words': 210}