<commit_before>var Travis = {
  // Namespace initialization
  Controllers: {}, Collections: {}, Helpers: {}, Models: {}, Views: { Base: {}, ServiceHooks: {}, Build: { History: {}, Matrix: {} }, Jobs: {}, Repositories: {}, Repository: {}, Workers: {} },
  start: function() {
    Travis.templates = Utils.loadTemplates();
    Backbone.history = new Backbone.History;
    Travis.app = new Travis.Controllers.Application();
    Travis.app.run();
  },
  trigger: function(event, data) {
    // console.log(data);
    data = _.clone(data)
    if(data.build.parent_id) {
      data.build = { id: data.build.parent_id, matrix: [_.clone(data.build)] };
    }
    var repository = _.extend(data.repository, { build: _.clone(data.build) });
    _.each(['id', 'number', 'status', 'started_at', 'finished_at'], function(key) {
      if(_.key(data.build, key)) repository['last_build_' + key] = data.build[key];
    });
    // console.log(event, _.clone(repository));
    Travis.app.trigger(event, repository);
  }
};

$(document).ready(function() {
  if(!window.__TESTING__ && $('#application').length == 1) {
    Travis.start();
    Backbone.history.start();

    var channels = ['repositories', 'jobs'];
    _.each(channels, function(channel) { pusher.subscribe(channel).bind_all(Travis.receive); })<commit_msg>Since main page got moved from application controller to home, we should rename it also here<commit_after>var Travis = {
  // Namespace initialization
  Controllers: {}, Collections: {}, Helpers: {}, Models: {}, Views: { Base: {}, ServiceHooks: {}, Build: { History: {}, Matrix: {} }, Jobs: {}, Repositories: {}, Repository: {}, Workers: {} },
  start: function() {
    Travis.templates = Utils.loadTemplates();
    Backbone.history = new Backbone.History;
    Travis.app = new Travis.Controllers.Application();
    Travis.app.run();
  },
  trigger: function(event, data) {
    // console.log(data);
    data = _.clone(data)
    if(data.build.parent_id) {
      data.build = { id: data.build.parent_id, matrix: [_.clone(data.build)] };
    }
    var repository = _.extend(data.repository, { build: _.clone(data.build) });
    _.each(['id', 'number', 'status', 'started_at', 'finished_at'], function(key) {
      if(_.key(data.build, key)) repository['last_build_' + key] = data.build[key];
    });
    // console.log(event, _.clone(repository));
    Travis.app.trigger(event, repository);
  }
};

$(document).ready(function() {
  if(!window.__TESTING__ && $('#home').length == 1) {

    Travis.start();
    Backbone.history.start();

    var channels = ['repositories', 'jobs'];
    _.each(channels, function(channel) { pusher.subscribe(channel).bind_all(Travis.receive); })
{'fraction_non_alphanumeric': 0.19401869158878504, 'fraction_numerical': 0.0007476635514018691, 'mean_word_length': 3.910091743119266, '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': '1190820', 'n_tokens_mistral': 855, 'n_tokens_neox': 844, 'n_words': 163}