<commit_before>$(document).ready(function($) {
  function addAutocompleteBehavior() {
    var filters = $('#filters');
    var contains = $.contains // jQuery 1.4+
      || function(container, contained)
    {
      while (contained !== null) {
        if (container === contained)
          return true;
        contained = contained.parentNode;
      }
      return false;
    };
    var listener = function(event) {
      var target = event.target || event.srcElement;
      filters.each(function() {
        if (contains(this, target)) {
          var input = $(this).find('input:text').filter(function() {
            return target === this;
          });
          if (input.attr('autocomplete') !== 'off' &&
              /^(?:[0-9]+_)?(?:owner|reporter|cc)$/.test(input.attr('name')))
          {
            input.autocomplete('subjects', {formatItem: formatItem});
            input.focus(); // XXX Workaround for Trac 0.12.2 and jQuery 1.4.2
          }
        }
      });
    };
    if ($.fn.delegate) {
      // delegate method is available in jQuery 1.4+
      filters.delegate('input:text', 'focus', listener);
    }
    else if (window.addEventListener) {
      // use capture=true cause focus event doesn't bubble in the default<commit_msg>Uses `jQuery.on` method to call `$.autocomplete` if available and uses `multiple` option for the CC fields on the custom query<commit_after>$(document).ready(function($) {
  function addAutocompleteBehavior() {
    var filters = $('#filters');
    var contains = $.contains // jQuery 1.4+
      || function(container, contained)
    {
      while (contained !== null) {
        if (container === contained)
          return true;
        contained = contained.parentNode;
      }
      return false;
    };
    var listener = function(event) {
      var target = event.target || event.srcElement;
      filters.each(function() {
        if (contains(this, target)) {
          var input = $(this).find('input:text').filter(function() {
            return target === this;
          });
          var name = input.attr('name');
          if (input.attr('autocomplete') !== 'off' &&
              /^(?:[0-9]+_)?(?:owner|reporter|cc)$/.test(name))
          {
            input.autocomplete('subjects', {formatItem: formatItem,
                                            multiple: /cc$/.test(name)});
            input.focus(); // XXX Workaround for Trac 0.12.2 and jQuery 1.4.2
          }
        }
      });
    };
    if ($.fn.on) {
      // delegate method is available in jQuery 1.7+
      filters.on('focusin', 'input:text', listener);
    }
    else if ($.fn.delegate) {
      // delegate method is available in jQuery 1.4.2+
      filters.delegate('input:text', 'focus', listener);
    }
    else if (window.addEventListener) {
      // use capture=true cause focus event doesn't bubble in the default
{'fraction_non_alphanumeric': 0.15212840195394278, 'fraction_numerical': 0.010118632240055827, 'mean_word_length': 2.143640350877193, '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': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3011486', 'n_tokens_mistral': 802, 'n_tokens_neox': 781, 'n_words': 202}