<commit_before>/*
 * Copyright 2013 The Toolkitchen Authors. All rights reserved.
 * Use of this source code is governed by a BSD-style
 * license that can be found in the LICENSE file.
 */

(function(scope) {
  scope = scope || {};
  // Function bind is required for dispatcher
  if (!Function.prototype.bind) {
    Function.prototype.bind = function(inScope/*, ...arguments*/) {
      var args = scope.toArray(arguments, 1);
      var self = this;
      return function() {
        var newArgs = scope.toArray(arguments, 0);
        return self.apply(inScope, args.concat(newArgs));
      };
    };
  }
  // not bound because scope.toArray is used in scope.bind
  scope.toArray = function(inArgs, inStart) {
    return Array.prototype.slice.call(inArgs, inStart || 0);
  };
  scope.utils = {
    LCA: {
      find: function(a, b) {
        if (a === b) {
          return a;
        }
        // fast case, a is a direct descendant of b or vice versa
        if (a.compareDocumentPosition) {
          var posmap = a.compareDocumentPosition(b);
          // b contains a
          if (posmap & Node.DOCUMENT_POSITION_CONTAINS) {
            return b;
          }
          // b is contained by a
          if (posmap & Node.DOCUMENT_POSITION_CONTAINED_BY) {
            return a;
          }
        }
        var adepth = this.depth(a);
        var bdepth = this.depth(b);
        var d = adepth - bdepth;
        if (d > 0) {
          a = this.walk(a, d);
        } else {
          b = this.walk(b, -d);
        }
        while(a && b && a !== b) {<commit_msg>no longer a need to polyfill function bind<commit_after>/*
 * Copyright 2013 The Toolkitchen Authors. All rights reserved.
 * Use of this source code is governed by a BSD-style
 * license that can be found in the LICENSE file.
 */

(function(scope) {
  scope = scope || {};
  scope.utils = {
    LCA: {
      find: function(a, b) {
        if (a === b) {
          return a;
        }
        // fast case, a is a direct descendant of b or vice versa
        if (a.compareDocumentPosition) {
          var posmap = a.compareDocumentPosition(b);
          // b contains a
          if (posmap & Node.DOCUMENT_POSITION_CONTAINS) {
            return b;
          }
          // b is contained by a
          if (posmap & Node.DOCUMENT_POSITION_CONTAINED_BY) {
            return a;
          }
        }
        var adepth = this.depth(a);
        var bdepth = this.depth(b);
        var d = adepth - bdepth;
        if (d > 0) {
          a = this.walk(a, d);
        } else {
          b = this.walk(b, -d);
        }
        while(a && b && a !== b) {
{'fraction_non_alphanumeric': 0.11650114591291062, 'fraction_numerical': 0.004965622612681436, 'mean_word_length': 1.7309697601668406, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, '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': '5786201', 'n_tokens_mistral': 820, 'n_tokens_neox': 802, 'n_words': 249}