<commit_before>'use strict';

var _classCallCheck = function (instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } };

exports.__esModule = true;
/*!
 * router
 * Copyright(c) 2015 <NAME>
 * MIT Licensed
 */

const METHODS = ['CONNECT', 'DELETE', 'GET', 'HEAD', 'OPTIONS', 'PATCH', 'POST', 'PUT', 'TRACE'];

const SNODE = 0; // static route
const PNODE = 1; // param route
const ANODE = 2; // all star route

let Node = (function () {
  function Node(prefix, has, handler, edges) {
    _classCallCheck(this, Node);

    this.label = prefix[0];
    this.prefix = prefix;
    this.has = has;
    this.handler = handler;
    this.edges = edges;
    if (!edges) this.edges = [];
  }

  Node.prototype.findEdge = function findEdge(c) {
    let i = 0;
    let l = this.edges.length;
    let e = void 0;

    for (; i < l; i++) {
      e = this.edges[i];
      if (e.label.charCodeAt() === c.charCodeAt()) return e;
    }
    return null;
  };

  return Node;
})();

let Router = (function () {
  function Router() {
    var _this = this;

    _classCallCheck(this, Router);

    this.trees = Object.create(null);
    METHODS.forEach(function (m) {
      _this.trees[m.toUpperCase()] = new Node('', null, null, []);
    });
  }

  Router.prototype.add = function add(method, path, handler) {
    var i = 0,
        l = path.length;
    for (; i < l; i++) {
      // `:`
      if (path.charCodeAt(i) === 58) {
        this.insert(method, path.substring(0, i), null, PNODE);
        // `/`
        for (; i < l && path.charCodeAt(i) !== 47; i++) {}
        if (i === l) {
          this.insert(method, path.substring(0, i), handler, SNODE);
          return;
        }
        this.insert(method, path.substring(0, i), null, SNODE);
        // `*`
      } else if (path.charCodeAt(i) === 42) {
        this.insert(method, path.substring(0, i), handler, ANODE);
      }
    }
    this.insert(method, path, handler, SNODE);
  };

  Router.prototype.insert = function insert(method, path, handler, has) {
    let cn = this.trees[method]; // Current node as root
    let search = path;

    while (true) {
      let sl = search.length;<commit_msg>lib: recompile<commit_after>'use strict';

var _classCallCheck = function (instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } };

exports.__esModule = true;
/*!
 * router
 * Copyright(c) 2015 <NAME>
 * MIT Licensed
 */

const METHODS = ['CONNECT', 'DELETE', 'GET', 'HEAD', 'OPTIONS', 'PATCH', 'POST', 'PUT', 'TRACE'];

const SNODE = 0; // Static node
const PNODE = 1; // Param node
const ANODE = 2; // Catch-all node

let Node = (function () {
  function Node(prefix, has, handler, edges) {
    _classCallCheck(this, Node);

    this.label = prefix[0];
    this.prefix = prefix;
    this.has = has;
    this.handler = handler;
    this.edges = edges;
    if (!edges) this.edges = [];
  }

  Node.prototype.findEdge = function findEdge(c) {
    let i = 0;
    let l = this.edges.length;
    let e = void 0;

    for (; i < l; i++) {
      e = this.edges[i];
      if (e.label.charCodeAt() === c.charCodeAt()) return e;
    }
    return null;
  };

  return Node;
})();

let Router = (function () {
  function Router() {
    var _this = this;

    _classCallCheck(this, Router);

    this.trees = Object.create(null);
    METHODS.forEach(function (m) {
      _this.trees[m.toUpperCase()] = new Node('', null, null, []);
    });
  }

  Router.prototype.add = function add(method, path, handler) {
    for (let i = 0, l = path.length; i < l; i++) {
      // `:`
      if (path.charCodeAt(i) === 58) {
        this.insert(method, path.substring(0, i), null, PNODE);
        // `/`
        for (; i < l && path.charCodeAt(i) !== 47; i++) {}
        if (i === l) {
          this.insert(method, path.substring(0, i), handler, SNODE);
          return;
        }
        this.insert(method, path.substring(0, i), null, SNODE);
        // `*`
      } else if (path.charCodeAt(i) === 42) {
        this.insert(method, path.substring(0, i), handler, ANODE);
      }
    }
    this.insert(method, path, handler, SNODE);
  };

  Router.prototype.insert = function insert(method, path, handler, has) {
    let cn = this.trees[method]; // Current node as root
    let search = path;

    while (true) {
      let sl = search.length;
{'fraction_non_alphanumeric': 0.17200636219041127, 'fraction_numerical': 0.00954328561690525, 'mean_word_length': 2.5528652138821633, 'pattern_counts': {'":': 0, '<': 11, '<?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': '5343989', 'n_tokens_mistral': 1546, 'n_tokens_neox': 1479, 'n_words': 401}