<commit_before>/**
 * The Sea.js plugin for collecting HTTP requests and sending all at once
 */
(function(seajs) {

  var Module = seajs.Module
  var load = Module.prototype.load

  var data = seajs.data
  var stack = data.flushStack = []


  Module.prototype.load = function() {
    var mod = this

    // DO NOT delay preload modules
    isPreload(mod) ? load.call(mod) : stack.push(mod)
  }

  seajs.use = function(ids, callback) {
    Module.use(ids, callback, data.cwd + "_use_" + data.cid())
    return seajs
  }

  seajs.flush = function() {
    var currentStack = stack.splice(0)

    var len = currentStack.length
    if (len === 0) {
      return
    }

    var deps = []

    // Collect dependencies
    for (var i = 0; i < len; i++) {
      deps = deps.concat(currentStack[i].resolve())
    }

    // Create an anonymous module for flushing
    var mod = Module.get(
        data.cwd + "_flush_" + data.cid(),
        deps
    )

    mod.load = load

    mod.callback = function() {
      for (var i = 0; i < len; i++) {
        currentStack[i].onload()
      }
    }

    // Load it
    Module.preload(function() {
      mod.load()
    })
  }


  // Flush to load dependencies
  seajs.on("requested", function() {<commit_msg>Fix splice second argument bug in IE6-8<commit_after>/**
 * The Sea.js plugin for collecting HTTP requests and sending all at once
 */
(function(seajs) {

  var Module = seajs.Module
  var load = Module.prototype.load

  var data = seajs.data
  var stack = data.flushStack = []


  Module.prototype.load = function() {
    var mod = this

    // DO NOT delay preload modules
    isPreload(mod) ? load.call(mod) : stack.push(mod)
  }

  seajs.use = function(ids, callback) {
    Module.use(ids, callback, data.cwd + "_use_" + data.cid())
    return seajs
  }

  seajs.flush = function() {
    var len = stack.length
    if (len === 0) {
      return
    }

    var currentStack = stack.splice(0, len)
    var deps = []

    // Collect dependencies
    for (var i = 0; i < len; i++) {
      deps = deps.concat(currentStack[i].resolve())
    }

    // Create an anonymous module for flushing
    var mod = Module.get(
        data.cwd + "_flush_" + data.cid(),
        deps
    )

    mod.load = load

    mod.callback = function() {
      for (var i = 0; i < len; i++) {
        currentStack[i].onload()
      }
    }

    // Load it
    Module.preload(function() {
      mod.load()
    })
  }


  // Flush to load dependencies
  seajs.on("requested", function() {
{'fraction_non_alphanumeric': 0.13594562175129948, 'fraction_numerical': 0.003998400639744102, 'mean_word_length': 2.1994884910485935, 'pattern_counts': {'":': 0, '<': 7, '<?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': '188800', 'n_tokens_mistral': 871, 'n_tokens_neox': 832, 'n_words': 225}