<commit_before><!doctype html>

<html>

<head>
  <meta charset="utf-8">
  <title>basis.js test suite</title>
</head>

<body>
  <script src="../src/basis.js"></script>
  <script>
    if (this.top === this)
      location.href = 'runner/reporter.html?page=../index.html';

    window.loadTests = (function(){
      var originalJsWrapper = basis.resource.extensions['.js'];
      var loadTestsToRunner;

      function addLoc(cursor, filename, content, fileMap){
        if (Array.isArray(cursor))
          return cursor.forEach(function(item){
            addLoc(item, filename, content, fileMap);
          });


        if (cursor && !cursor.filename_)
        {
          var test = cursor.test;

          if (typeof test != 'function')
            return addLoc(test, filename, content, fileMap);

          var testSource = test.toString()
            .replace(/^function[^\(]*\(/, '(')    // browsers may add/remove spaces between function, function name and parameters
            .replace(/\{\n"use strict";\n/, '{'); // Firefox adds implicit "use strict" in every function
          var startPos = content.indexOf(testSource, fileMap[testSource] || 0);

          fileMap[testSource] = startPos + 1;

          if (startPos != -1)
            cursor.loc = filename +
              ':' + content.substr(0, startPos).split('\n').length +<commit_msg>better function matching on test load (safari issue)<commit_after><!doctype html>

<html>

<head>
  <meta charset="utf-8">
  <title>basis.js test suite</title>
</head>

<body>
  <script src="../src/basis.js"></script>
  <script>
    if (this.top === this)
      location.href = 'runner/reporter.html?page=../index.html';

    window.loadTests = (function(){
      var originalJsWrapper = basis.resource.extensions['.js'];
      var loadTestsToRunner;

      function addLoc(cursor, filename, content, fileMap){
        if (Array.isArray(cursor))
          return cursor.forEach(function(item){
            addLoc(item, filename, content, fileMap);
          });


        if (cursor && !cursor.filename_)
        {
          var test = cursor.test;

          if (typeof test != 'function')
            return addLoc(test, filename, content, fileMap);

          var testSource = test.toString()
            .replace(/^([^{]|\s)+/, '')    // browsers may add/remove spaces between function, function name and parameters
            .replace(/\{\n"use strict";\n/, '{'); // Firefox adds implicit "use strict" in every function
          var startPos = content.indexOf(testSource, fileMap[testSource] || 0);

          fileMap[testSource] = startPos + 1;

          if (startPos != -1)
            cursor.loc = filename +
              ':' + content.substr(0, startPos).split('\n').length +
{'fraction_non_alphanumeric': 0.15379008746355685, 'fraction_numerical': 0.0036443148688046646, 'mean_word_length': 2.4184308841843087, 'pattern_counts': {'":': 0, '<': 25, '<?xml version=': 0, '>': 25, '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': '3255551', 'n_tokens_mistral': 810, 'n_tokens_neox': 776, 'n_words': 193}