<commit_before>;(function(Agent){

  var patchViewChanges = _.debounce(function(view, prop, action, difference, oldValue) {
    Agent.lazyWorker.push({
      context: Agent,
      args: [view],
      callback: function(view) {
        Agent.sendAppComponentReport('view:change', {
          cid: view.cid,
          data: Agent.serializeView(view)
        });
      }
    });
  }, 200);

  // @private
  Agent.patchBackboneView = function(BackboneView) {
    debug.log('Backbone.View detected');

    Agent.patchBackboneComponent(BackboneView, function(view) { // on new instance
      Agent.lazyWorker.push({
        context: Agent,
        args: [view],
        callback: function(view) {
          // registra il nuovo componente dell'app
          var data = Agent.serializeView(view)
          Agent.registerAppComponent('View', view, data);
          Agent.sendAppComponentReport('view:change', {
            data: data,
            cid: view.cid
          });
        }
      });

      // set class name if we can
      if (view._requirePath) {
        view._className = _.last(view._requirePath.split('/'));
      }

      // Patcha i metodi del componente dell'app
      Agent.patchAppComponentTrigger(view, 'view');

      Agent.onDefined(view, 'ui', function() {
        Agent.onChange(view.ui, _.partial(patchViewChanges, view));
        patchViewChanges(view);
      });

      Agent.onDefined(view, '_events', function() {
        Agent.onChange(view._events, _.partial(patchViewChanges, view));
        patchViewChanges(view);
      });

      Agent.onDefined(view, '_listeningTo', function() {
        Agent.onChange(view._events, _.partial(patchViewChanges, view));
        patchViewChanges(view);
      });
    });
  };

}(Agent));
<commit_msg>Fix watching view _listeningTo property<commit_after>;(function(Agent){

  var patchViewChanges = _.debounce(function(view, prop, action, difference, oldValue) {
    Agent.lazyWorker.push({
      context: Agent,
      args: [view],
      callback: function(view) {
        Agent.sendAppComponentReport('view:change', {
          cid: view.cid,
          data: Agent.serializeView(view)
        });
      }
    });
  }, 200);

  // @private
  Agent.patchBackboneView = function(BackboneView) {
    debug.log('Backbone.View detected');

    Agent.patchBackboneComponent(BackboneView, function(view) { // on new instance
      Agent.lazyWorker.push({
        context: Agent,
        args: [view],
        callback: function(view) {
          // registra il nuovo componente dell'app
          var data = Agent.serializeView(view)
          Agent.registerAppComponent('View', view, data);
          Agent.sendAppComponentReport('view:change', {
            data: data,
            cid: view.cid
          });
        }
      });

      // set class name if we can
      if (view._requirePath) {
        view._className = _.last(view._requirePath.split('/'));
      }

      // Patcha i metodi del componente dell'app
      Agent.patchAppComponentTrigger(view, 'view');

      Agent.onDefined(view, 'ui', function() {
        Agent.onChange(view.ui, _.partial(patchViewChanges, view));
        patchViewChanges(view);
      });

      Agent.onDefined(view, '_events', function() {
        Agent.onChange(view._events, _.partial(patchViewChanges, view));
        patchViewChanges(view);
      });

      Agent.onDefined(view, '_listeningTo', function() {
        Agent.onChange(view._listeningTo, _.partial(patchViewChanges, view));
        patchViewChanges(view);
      });
    });
  };

}(Agent));

{'fraction_non_alphanumeric': 0.1360697216755693, 'fraction_numerical': 0.0016868147315153219, 'mean_word_length': 2.4644595910418694, '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': '926711', 'n_tokens_mistral': 1044, 'n_tokens_neox': 1019, 'n_words': 192}