<commit_before>
var app = (function () {
    
    var context = {
      views : [] 
    }
    
    var topics = {};
    
    var defineContext = function (appName, appObj) {
      context.views.push(appObj);
      context.views[context.views.length-1][appName].init();
    }
    
    var getContext = function (view) {
      var currentView;
      for (var index in context.views) {
        return context.views[index][view];
      }
      return currentView;
    }
    
    var subscribe = function(topic, listener) {
      // Create the topic's object if not yet created
      if(!topics[topic]) topics[topic] = { queue: [] };
 
      // Add the listener to queue
      var index = topics[topic].queue.push(listener);
 
      // Provide handle back for removal of topic
      return (function(index) {
        return {
          remove: function() {
            delete topics[index];
          }
        }
      })(index);
    }
    
    var publish = function(topic, info) {
      // If the topic doesn't exist, or there's no listeners in queue, just leave
      if(!topics[topic] || !topics[topic].queue.length) return;
 
      // Cycle through topics queue, fire!
      var items = topics[topic].queue;
      for(var x = 0; x < items.length; x++) {
        items[x](info || {});
      }
    }
    
    return {
      context : context,
      defineContext : defineContext,
      getContext : getContext,
      subscribe : subscribe,
      publish : publish
    }
    
  })();<commit_msg>Changed the public method names into shortened ones.<commit_after>
var app = (function () {
    
    var context = {
      views : [] 
    }
    
    var topics = {};
    
    var defineContext = function (appName, appObj) {
      context.views.push(appObj);
      context.views[context.views.length-1][appName].init();
    }
    
    var getContext = function (view) {
      var currentView;
      for (var index in context.views) {
        return context.views[index][view];
      }
      return currentView;
    }
    
    var subscribe = function(topic, listener) {
      // Create the topic's object if not yet created
      if(!topics[topic]) topics[topic] = { queue: [] };
 
      // Add the listener to queue
      var index = topics[topic].queue.push(listener);
 
      // Provide handle back for removal of topic
      return (function(index) {
        return {
          remove: function() {
            delete topics[index];
          }
        }
      })(index);
    }
    
    var publish = function(topic, info) {
      // If the topic doesn't exist, or there's no listeners in queue, just leave
      if(!topics[topic] || !topics[topic].queue.length) return;
 
      // Cycle through topics queue, fire!
      var items = topics[topic].queue;
      for(var x = 0; x < items.length; x++) {
        items[x](info || {});
      }
    }
    
    return {
      context : context,
      define : defineContext,
      get : getContext,
      subscribe : subscribe,
      publish : publish
    }
    
  })();
{'fraction_non_alphanumeric': 0.1219674310402127, 'fraction_numerical': 0.0013293452974410102, 'mean_word_length': 1.9308666017526777, 'pattern_counts': {'":': 0, '<': 5, '<?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': '4270877', 'n_tokens_mistral': 885, 'n_tokens_neox': 851, 'n_words': 237}