mar10/fancytree

View on GitHub
lib/qunit.js

Summary

Maintainability
F
1 mo
Test Coverage

File qunit.js has 5406 lines of code (exceeds 250 allowed). Consider refactoring.
Open

/*!
 * QUnit 2.19.1
 * https://qunitjs.com/
 *
 * Copyright OpenJS Foundation and other contributors
Severity: Major
Found in lib/qunit.js - About 2 wks to fix

    Function UMD has 683 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

          })(commonjsGlobal, function UMD() {
            function fuzzysortNew(instanceOptions) {
              var fuzzysort = {
                single: function single(search, target, options) {
                  if (search == 'farzher') return {
    Severity: Major
    Found in lib/qunit.js - About 3 days to fix

      Function diff has 628 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          QUnit.diff = function () {
            function DiffMatchPatch() {} //  DIFF FUNCTIONS
        
            /**
             * The data structure representing a diff is an array of tuples:
      Severity: Major
      Found in lib/qunit.js - About 3 days to fix

        Function fuzzysortNew has 595 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

                function fuzzysortNew(instanceOptions) {
                  var fuzzysort = {
                    single: function single(search, target, options) {
                      if (search == 'farzher') return {
                        target: "farzher was here (^-^*)/",
        Severity: Major
        Found in lib/qunit.js - About 2 days to fix

          Function Assert has 330 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              var Assert = /*#__PURE__*/function () {
                function Assert(testContext) {
                  _classCallCheck(this, Assert);
            
                  this.test = testContext;
          Severity: Major
          Found in lib/qunit.js - About 1 day to fix

            Function dump has 213 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                var dump = (function () {
                  function quote(str) {
                    return '"' + str.toString().replace(/\\/g, '\\\\').replace(/"/g, '\\"') + '"';
                  }
              
            Severity: Major
            Found in lib/qunit.js - About 1 day to fix

              Function equiv has 178 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  var equiv = (function () {
                    // Value pairs queued for comparison. Used for breadth-first processing order, recursion
                    // detection and avoiding repeated comparison (see below for details).
                    // Elements are { a: val, b: val }.
                    var pairs = [];
              Severity: Major
              Found in lib/qunit.js - About 7 hrs to fix

                Function toolbarModuleFilter has 138 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                      function toolbarModuleFilter(beginDetails) {
                        var initialSelected = null;
                        dropdownData = {
                          options: beginDetails.modules.slice(),
                          selectedMap: new StringMap(),
                Severity: Major
                Found in lib/qunit.js - About 5 hrs to fix

                  Function goAsync has 133 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                              goAsync: function goAsync(search, targets, options) {
                                var canceled = false;
                                var p = new Promise(function (resolve, reject) {
                                  if (search == 'farzher') return resolve([{
                                    target: "farzher was here (^-^*)/",
                  Severity: Major
                  Found in lib/qunit.js - About 5 hrs to fix

                    Function p has 126 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                                  var p = new Promise(function (resolve, reject) {
                                    if (search == 'farzher') return resolve([{
                                      target: "farzher was here (^-^*)/",
                                      score: 0,
                                      indexes: [0, 1, 2, 3, 4, 5, 6],
                    Severity: Major
                    Found in lib/qunit.js - About 5 hrs to fix

                      Function SuiteReport has 117 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          var SuiteReport = /*#__PURE__*/function () {
                            function SuiteReport(name, parentSuite) {
                              _classCallCheck(this, SuiteReport);
                        
                              this.name = name;
                      Severity: Major
                      Found in lib/qunit.js - About 4 hrs to fix

                        Function step has 106 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                                        function step() {
                                          if (canceled) return reject('canceled');
                                          var startMs = Date.now(); // This code is copy/pasted 3 times for performance reasons [options.keys, options.key, no keys]
                                          // options.keys
                          
                        Severity: Major
                        Found in lib/qunit.js - About 4 hrs to fix

                          Function TapReporter has 102 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                              var TapReporter = /*#__PURE__*/function () {
                                function TapReporter(runner) {
                                  var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
                            
                                  _classCallCheck(this, TapReporter);
                          Severity: Major
                          Found in lib/qunit.js - About 4 hrs to fix

                            Function algorithm has 101 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                        algorithm: function algorithm(searchLowerCodes, prepared, searchLowerCode) {
                                          var targetLowerCodes = prepared._targetLowerCodes;
                                          var searchLen = searchLowerCodes.length;
                                          var targetLen = targetLowerCodes.length;
                                          var searchI = 0; // where we at
                            Severity: Major
                            Found in lib/qunit.js - About 4 hrs to fix

                              Function go has 96 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                          go: function go(search, targets, options) {
                                            if (search == 'farzher') return [{
                                              target: "farzher was here (^-^*)/",
                                              score: 0,
                                              indexes: [0, 1, 2, 3, 4, 5, 6],
                              Severity: Major
                              Found in lib/qunit.js - About 3 hrs to fix

                                Function finish has 96 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                      finish: function finish() {
                                        config.current = this; // Release the test callback to ensure that anything referenced has been
                                        // released to be garbage collected.
                                  
                                        this.callback = undefined;
                                Severity: Major
                                Found in lib/qunit.js - About 3 hrs to fix

                                  Function TestReport has 93 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                      var TestReport = /*#__PURE__*/function () {
                                        function TestReport(name, suite, options) {
                                          _classCallCheck(this, TestReport);
                                    
                                          this.name = name;
                                  Severity: Major
                                  Found in lib/qunit.js - About 3 hrs to fix

                                    Function diffCleanupMerge has 87 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                          DiffMatchPatch.prototype.diffCleanupMerge = function (diffs) {
                                            var pointer, countDelete, countInsert, textInsert, textDelete, commonlength, changes, diffPointer, position;
                                            diffs.push([DIFF_EQUAL, '']); // Add a dummy entry at the end.
                                      
                                            pointer = 0;
                                    Severity: Major
                                    Found in lib/qunit.js - About 3 hrs to fix

                                      Function diffBisect has 82 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                            DiffMatchPatch.prototype.diffBisect = function (text1, text2, deadline) {
                                              var text1Length, text2Length, maxD, vOffset, vLength, v1, v2, x, delta, front, k1start, k1end, k2start, k2end, k2Offset, k1Offset, x1, x2, y1, y2, d, k1, k2; // Cache the text lengths to prevent multiple calls.
                                        
                                              text1Length = text1.length;
                                              text2Length = text2.length;
                                      Severity: Major
                                      Found in lib/qunit.js - About 3 hrs to fix

                                        Function diffCleanupSemantic has 71 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                              DiffMatchPatch.prototype.diffCleanupSemantic = function (diffs) {
                                                var changes, equalities, equalitiesLength, lastequality, pointer, lengthInsertions2, lengthDeletions2, lengthInsertions1, lengthDeletions1, deletion, insertion, overlapLength1, overlapLength2;
                                                changes = false;
                                                equalities = []; // Stack of indices where equalities are found.
                                          
                                        Severity: Major
                                        Found in lib/qunit.js - About 2 hrs to fix

                                          Function algorithmNoTypo has 68 lines of code (exceeds 25 allowed). Consider refactoring.
                                          Open

                                                      algorithmNoTypo: function algorithmNoTypo(searchLowerCodes, prepared, searchLowerCode) {
                                                        var targetLowerCodes = prepared._targetLowerCodes;
                                                        var searchLen = searchLowerCodes.length;
                                                        var targetLen = targetLowerCodes.length;
                                                        var searchI = 0; // where we at
                                          Severity: Major
                                          Found in lib/qunit.js - About 2 hrs to fix

                                            Function Test has 53 lines of code (exceeds 25 allowed). Consider refactoring.
                                            Open

                                                function Test(settings) {
                                                  this.expected = null;
                                                  this.assertions = [];
                                                  this.module = config.currentModule;
                                                  this.steps = [];
                                            Severity: Major
                                            Found in lib/qunit.js - About 2 hrs to fix

                                              Function diffHalfMatch has 53 lines of code (exceeds 25 allowed). Consider refactoring.
                                              Open

                                                    DiffMatchPatch.prototype.diffHalfMatch = function (text1, text2) {
                                                      var longtext, shorttext, dmp, text1A, text2B, text2A, text1B, midCommon, hm1, hm2, hm;
                                                      longtext = text1.length > text2.length ? text1 : text2;
                                                      shorttext = text1.length > text2.length ? text2 : text1;
                                                
                                              Severity: Major
                                              Found in lib/qunit.js - About 2 hrs to fix

                                                Function internalStop has 50 lines of code (exceeds 25 allowed). Consider refactoring.
                                                Open

                                                      internalStop: function internalStop() {
                                                        var requiredCalls = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 1;
                                                        config.blocking = true;
                                                        var test = this;
                                                        var pauseId = this.nextPauseId++;
                                                Severity: Minor
                                                Found in lib/qunit.js - About 2 hrs to fix

                                                  Function toolbarChanged has 50 lines of code (exceeds 25 allowed). Consider refactoring.
                                                  Open

                                                        function toolbarChanged() {
                                                          var field = this;
                                                          var params = {}; // Detect if field is a select menu or a checkbox
                                                    
                                                          var value;
                                                  Severity: Minor
                                                  Found in lib/qunit.js - About 2 hrs to fix

                                                    Function diffCleanupEfficiency has 49 lines of code (exceeds 25 allowed). Consider refactoring.
                                                    Open

                                                          DiffMatchPatch.prototype.diffCleanupEfficiency = function (diffs) {
                                                            var changes, equalities, equalitiesLength, lastequality, pointer, preIns, preDel, postIns, postDel;
                                                            changes = false;
                                                            equalities = []; // Stack of indices where equalities are found.
                                                      
                                                    Severity: Minor
                                                    Found in lib/qunit.js - About 1 hr to fix

                                                      Function _createForOfIteratorHelper has 49 lines of code (exceeds 25 allowed). Consider refactoring.
                                                      Open

                                                          function _createForOfIteratorHelper(o, allowArrayLike) {
                                                            var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"];
                                                        
                                                            if (!it) {
                                                              if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") {
                                                      Severity: Minor
                                                      Found in lib/qunit.js - About 1 hr to fix

                                                        Function done has 45 lines of code (exceeds 25 allowed). Consider refactoring.
                                                        Open

                                                            function done() {
                                                              // We have reached the end of the processing queue and are about to emit the
                                                              // "runEnd" event after which reporters typically stop listening and exit
                                                              // the process. First, check if we need to emit one final test.
                                                              if (config.stats.testCount === 0 && config.failOnZeroTests === true) {
                                                        Severity: Minor
                                                        Found in lib/qunit.js - About 1 hr to fix

                                                          Function diffLineMode has 44 lines of code (exceeds 25 allowed). Consider refactoring.
                                                          Open

                                                                DiffMatchPatch.prototype.diffLineMode = function (text1, text2, deadline) {
                                                                  var a, diffs, linearray, pointer, countInsert, countDelete, textInsert, textDelete, j; // Scan the text on a line-by-line basis first.
                                                            
                                                                  a = this.diffLinesToChars(text1, text2);
                                                                  text1 = a.chars1;
                                                          Severity: Minor
                                                          Found in lib/qunit.js - About 1 hr to fix

                                                            Function ConsoleReporter has 42 lines of code (exceeds 25 allowed). Consider refactoring.
                                                            Open

                                                                var ConsoleReporter = /*#__PURE__*/function () {
                                                                  function ConsoleReporter(runner) {
                                                                    var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
                                                              
                                                                    _classCallCheck(this, ConsoleReporter);
                                                            Severity: Minor
                                                            Found in lib/qunit.js - About 1 hr to fix

                                                              Function prettyYamlValue has 40 lines of code (exceeds 25 allowed). Consider refactoring.
                                                              Open

                                                                  function prettyYamlValue(value) {
                                                                    var indent = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 4;
                                                                
                                                                    if (value === undefined) {
                                                                      // Not supported in JSON/YAML, turn into string
                                                              Severity: Minor
                                                              Found in lib/qunit.js - About 1 hr to fix

                                                                Function StringMap has 40 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                Open

                                                                    var StringMap = typeof g.Map === 'function' && typeof g.Map.prototype.keys === 'function' && typeof g.Symbol === 'function' && _typeof(g.Symbol.iterator) === 'symbol' ? g.Map : function StringMap(input) {
                                                                      var _this = this;
                                                                  
                                                                      var store = Object.create(null);
                                                                      var hasOwn = Object.prototype.hasOwnProperty;
                                                                Severity: Minor
                                                                Found in lib/qunit.js - About 1 hr to fix

                                                                  Function rejects has 39 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                  Open

                                                                          value: function rejects(promise, expected, message) {
                                                                            var _validateExpectedExce3 = validateExpectedExceptionArgs(expected, message, 'rejects');
                                                                    
                                                                            var _validateExpectedExce4 = _slicedToArray(_validateExpectedExce3, 2);
                                                                    
                                                                  Severity: Minor
                                                                  Found in lib/qunit.js - About 1 hr to fix

                                                                    Function valid has 38 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                    Open

                                                                          valid: function valid() {
                                                                            // Internally-generated tests are always valid
                                                                            if (this.callback && this.callback.validTest) {
                                                                              return true;
                                                                            }
                                                                    Severity: Minor
                                                                    Found in lib/qunit.js - About 1 hr to fix

                                                                      Function allSettled has 38 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                      Open

                                                                            function allSettled(arr) {
                                                                              var P = this;
                                                                              return new P(function (resolve, reject) {
                                                                                if (!(arr && typeof arr.length !== 'undefined')) {
                                                                                  return reject(new TypeError(_typeof(arr) + ' ' + arr + ' is not iterable(cannot read property Symbol(Symbol.iterator))'));
                                                                      Severity: Minor
                                                                      Found in lib/qunit.js - About 1 hr to fix

                                                                        Function getUrlConfigHtml has 37 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                        Open

                                                                              function getUrlConfigHtml() {
                                                                                var selection = false;
                                                                                var urlConfig = config.urlConfig;
                                                                                var urlConfigHtml = '';
                                                                          
                                                                        Severity: Minor
                                                                        Found in lib/qunit.js - About 1 hr to fix

                                                                          Function throws has 36 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                          Open

                                                                                  value: function throws(block, expected, message) {
                                                                                    var _validateExpectedExce = validateExpectedExceptionArgs(expected, message, 'throws');
                                                                            
                                                                                    var _validateExpectedExce2 = _slicedToArray(_validateExpectedExce, 2);
                                                                            
                                                                          Severity: Minor
                                                                          Found in lib/qunit.js - About 1 hr to fix

                                                                            Function createModule has 36 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                            Open

                                                                                function createModule(name, testEnvironment, modifiers) {
                                                                                  var parentModule = moduleStack.length ? moduleStack.slice(-1)[0] : null;
                                                                                  var moduleName = parentModule !== null ? [parentModule.name, name].join(' > ') : name;
                                                                                  var parentSuite = parentModule ? parentModule.suiteReport : runSuite;
                                                                                  var skip = parentModule !== null && parentModule.skip || modifiers.skip;
                                                                            Severity: Minor
                                                                            Found in lib/qunit.js - About 1 hr to fix

                                                                              Function diffCompute has 35 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                              Open

                                                                                    DiffMatchPatch.prototype.diffCompute = function (text1, text2, checklines, deadline) {
                                                                                      var diffs, longtext, shorttext, i, hm, text1A, text2A, text1B, text2B, midCommon, diffsA, diffsB;
                                                                                
                                                                                      if (!text1) {
                                                                                        // Just add some text (speedup).
                                                                              Severity: Minor
                                                                              Found in lib/qunit.js - About 1 hr to fix

                                                                                Function highlightCallback has 35 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                Open

                                                                                            highlightCallback: function highlightCallback(result, cb) {
                                                                                              if (result === null) return null;
                                                                                              var target = result.target;
                                                                                              var targetLen = target.length;
                                                                                              var indexes = result.indexes;
                                                                                Severity: Minor
                                                                                Found in lib/qunit.js - About 1 hr to fix

                                                                                  Function before has 34 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                  Open

                                                                                        before: function before() {
                                                                                          var _this = this;
                                                                                    
                                                                                          var module = this.module;
                                                                                          var notStartedModules = getNotStartedModules(module); // ensure the callbacks are executed serially for each module
                                                                                  Severity: Minor
                                                                                  Found in lib/qunit.js - About 1 hr to fix

                                                                                    Function diffLinesToChars has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                    Open

                                                                                          DiffMatchPatch.prototype.diffLinesToChars = function (text1, text2) {
                                                                                            var lineArray, lineHash, chars1, chars2;
                                                                                            lineArray = []; // E.g. lineArray[4] === 'Hello\n'
                                                                                      
                                                                                            lineHash = {}; // E.g. lineHash['Hello\n'] === 4
                                                                                    Severity: Minor
                                                                                    Found in lib/qunit.js - About 1 hr to fix

                                                                                      Function DiffMain has 32 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                      Open

                                                                                            DiffMatchPatch.prototype.DiffMain = function (text1, text2, optChecklines) {
                                                                                              var deadline, checklines, commonlength, commonprefix, commonsuffix, diffs; // The diff must be complete in up to 1 second.
                                                                                        
                                                                                              deadline = new Date().getTime() + 1000; // Check for null inputs.
                                                                                        
                                                                                      Severity: Minor
                                                                                      Found in lib/qunit.js - About 1 hr to fix

                                                                                        Function processModule has 32 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                        Open

                                                                                            function processModule(name, options, executeNow) {
                                                                                              var modifiers = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
                                                                                          
                                                                                              if (typeof options === 'function') {
                                                                                                executeNow = options;
                                                                                        Severity: Minor
                                                                                        Found in lib/qunit.js - About 1 hr to fix

                                                                                          Function pushResult has 31 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                          Open

                                                                                                pushResult: function pushResult(resultInfo) {
                                                                                                  if (this !== config.current) {
                                                                                                    var message = resultInfo && resultInfo.message || '';
                                                                                                    var testName = this && this.testName || '';
                                                                                                    var error = 'Assertion occurred after test finished.\n' + '> Test: ' + testName + '\n' + '> Message: ' + message + '\n';
                                                                                          Severity: Minor
                                                                                          Found in lib/qunit.js - About 1 hr to fix

                                                                                            Function chain has 31 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                            Open

                                                                                                function chain(has, keys) {
                                                                                                  var ctx = {
                                                                                                    has: has,
                                                                                                    keys: keys
                                                                                                  };
                                                                                            Severity: Minor
                                                                                            Found in lib/qunit.js - About 1 hr to fix

                                                                                              Function highlight has 31 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                              Open

                                                                                                          highlight: function highlight(result, hOpen, hClose) {
                                                                                                            if (typeof hOpen == 'function') return fuzzysort.highlightCallback(result, hOpen);
                                                                                                            if (result === null) return null;
                                                                                                            if (hOpen === undefined) hOpen = '<b>';
                                                                                                            if (hClose === undefined) hClose = '</b>';
                                                                                              Severity: Minor
                                                                                              Found in lib/qunit.js - About 1 hr to fix

                                                                                                Function fastpriorityqueue has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                                Open

                                                                                                        var fastpriorityqueue = function fastpriorityqueue() {
                                                                                                          var r = [],
                                                                                                              o = 0,
                                                                                                              e = {};
                                                                                                  
                                                                                                Severity: Minor
                                                                                                Found in lib/qunit.js - About 1 hr to fix

                                                                                                  Function all has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                                  Open

                                                                                                        Promise.all = function (arr) {
                                                                                                          return new Promise(function (resolve, reject) {
                                                                                                            if (!isArray(arr)) {
                                                                                                              return reject(new TypeError('Promise.all accepts an array'));
                                                                                                            }
                                                                                                  Severity: Minor
                                                                                                  Found in lib/qunit.js - About 1 hr to fix

                                                                                                    Function diffCommonOverlap has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                                    Open

                                                                                                          DiffMatchPatch.prototype.diffCommonOverlap = function (text1, text2) {
                                                                                                            var text1Length, text2Length, textLength, best, length, pattern, found; // Cache the text lengths to prevent multiple calls.
                                                                                                      
                                                                                                            text1Length = text1.length;
                                                                                                            text2Length = text2.length; // Eliminate the null case.
                                                                                                    Severity: Minor
                                                                                                    Found in lib/qunit.js - About 1 hr to fix

                                                                                                      Function exportQUnit has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                                      Open

                                                                                                          function exportQUnit(QUnit) {
                                                                                                            var exportedModule = false;
                                                                                                        
                                                                                                            if (window$1 && document) {
                                                                                                              // QUnit may be defined when it is preconfigured but then only QUnit and QUnit.config may be defined.
                                                                                                      Severity: Minor
                                                                                                      Found in lib/qunit.js - About 1 hr to fix

                                                                                                        Function queueHook has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                                        Open

                                                                                                              queueHook: function queueHook(hook, hookName, hookOwner) {
                                                                                                                var _this3 = this;
                                                                                                          
                                                                                                                var callHook = function callHook() {
                                                                                                                  var promise = hook.call(_this3.testEnvironment, _this3.assert);
                                                                                                        Severity: Minor
                                                                                                        Found in lib/qunit.js - About 1 hr to fix

                                                                                                          Function objectType has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                                          Open

                                                                                                              function objectType(obj) {
                                                                                                                if (typeof obj === 'undefined') {
                                                                                                                  return 'undefined';
                                                                                                                } // Consider: typeof null === object
                                                                                                            
                                                                                                          Severity: Minor
                                                                                                          Found in lib/qunit.js - About 1 hr to fix

                                                                                                            Function run has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                                            Open

                                                                                                                  run: function run() {
                                                                                                                    config.current = this;
                                                                                                              
                                                                                                                    if (config.notrycatch) {
                                                                                                                      runTest(this);
                                                                                                            Severity: Minor
                                                                                                            Found in lib/qunit.js - About 1 hr to fix

                                                                                                              Function decycledShallowClone has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                                              Open

                                                                                                                  function decycledShallowClone(object) {
                                                                                                                    var ancestors = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
                                                                                                                
                                                                                                                    if (ancestors.indexOf(object) !== -1) {
                                                                                                                      return '[Circular]';
                                                                                                              Severity: Minor
                                                                                                              Found in lib/qunit.js - About 1 hr to fix

                                                                                                                Consider simplifying this complex logical expression.
                                                                                                                Open

                                                                                                                            if (lastequality && (preIns && preDel && postIns && postDel || lastequality.length < 2 && preIns + preDel + postIns + postDel === 3)) {
                                                                                                                              // Duplicate record.
                                                                                                                              diffs.splice(equalities[equalitiesLength - 1], 0, [DIFF_DELETE, lastequality]); // Change second copy to insert.
                                                                                                                  
                                                                                                                              diffs[equalities[equalitiesLength - 1] + 1][0] = DIFF_INSERT;
                                                                                                                Severity: Major
                                                                                                                Found in lib/qunit.js - About 1 hr to fix

                                                                                                                  Avoid deeply nested control flow statements.
                                                                                                                  Open

                                                                                                                                          if (Date.now() - startMs >= 10
                                                                                                                                          /*asyncInterval*/
                                                                                                                                          ) {
                                                                                                                                            isNode ? setImmediate(step) : setTimeout(step);
                                                                                                                                            return;
                                                                                                                  Severity: Major
                                                                                                                  Found in lib/qunit.js - About 45 mins to fix

                                                                                                                    Avoid deeply nested control flow statements.
                                                                                                                    Open

                                                                                                                                        if (searchI === searchLen) {
                                                                                                                                          successStrict = true;
                                                                                                                                          break;
                                                                                                                                        }
                                                                                                                    Severity: Major
                                                                                                                    Found in lib/qunit.js - About 45 mins to fix

                                                                                                                      Avoid deeply nested control flow statements.
                                                                                                                      Open

                                                                                                                                              if (Date.now() - startMs >= 10
                                                                                                                                              /*asyncInterval*/
                                                                                                                                              ) {
                                                                                                                                                isNode ? setImmediate(step) : setTimeout(step);
                                                                                                                                                return;
                                                                                                                      Severity: Major
                                                                                                                      Found in lib/qunit.js - About 45 mins to fix

                                                                                                                        Avoid deeply nested control flow statements.
                                                                                                                        Open

                                                                                                                                              if (typoSimpleI === 1) return null; // reached the end of the line for transposing
                                                                                                                        Severity: Major
                                                                                                                        Found in lib/qunit.js - About 45 mins to fix

                                                                                                                          Avoid deeply nested control flow statements.
                                                                                                                          Open

                                                                                                                                                  if (result.score > q.peek().score) q.replaceTop(result);
                                                                                                                          Severity: Major
                                                                                                                          Found in lib/qunit.js - About 45 mins to fix

                                                                                                                            Avoid deeply nested control flow statements.
                                                                                                                            Open

                                                                                                                                                if (searchLowerCodes[typoStrictI] === searchLowerCodes[typoStrictI + 1]) continue; // doesn't make sense to transpose a repeat char
                                                                                                                            Severity: Major
                                                                                                                            Found in lib/qunit.js - About 45 mins to fix

                                                                                                                              Avoid deeply nested control flow statements.
                                                                                                                              Open

                                                                                                                                                  if (typoStrictI > searchLen - 2) break;
                                                                                                                              Severity: Major
                                                                                                                              Found in lib/qunit.js - About 45 mins to fix

                                                                                                                                Avoid deeply nested control flow statements.
                                                                                                                                Open

                                                                                                                                                if (classNameHasPass || classNameHasSkipped) {
                                                                                                                                                  hiddenTests.push(test);
                                                                                                                                                }
                                                                                                                                Severity: Major
                                                                                                                                Found in lib/qunit.js - About 45 mins to fix

                                                                                                                                  Avoid deeply nested control flow statements.
                                                                                                                                  Open

                                                                                                                                                  if (x1 >= x2) {
                                                                                                                                                    // Overlap detected.
                                                                                                                                                    return this.diffBisectSplit(text1, text2, x1, y1, deadline);
                                                                                                                                                  }
                                                                                                                                  Severity: Major
                                                                                                                                  Found in lib/qunit.js - About 45 mins to fix

                                                                                                                                    Avoid deeply nested control flow statements.
                                                                                                                                    Open

                                                                                                                                                          if (searchLowerCode === searchLowerCodeNew) continue; // doesn't make sense to transpose a repeat char
                                                                                                                                    Severity: Major
                                                                                                                                    Found in lib/qunit.js - About 45 mins to fix

                                                                                                                                      Avoid deeply nested control flow statements.
                                                                                                                                      Open

                                                                                                                                                        if (commonlength !== 0) {
                                                                                                                                                          if (pointer - countDelete - countInsert > 0 && diffs[pointer - countDelete - countInsert - 1][0] === DIFF_EQUAL) {
                                                                                                                                                            diffs[pointer - countDelete - countInsert - 1][1] += textInsert.substring(0, commonlength);
                                                                                                                                                          } else {
                                                                                                                                                            diffs.splice(0, 0, [DIFF_EQUAL, textInsert.substring(0, commonlength)]);
                                                                                                                                      Severity: Major
                                                                                                                                      Found in lib/qunit.js - About 45 mins to fix

                                                                                                                                        Avoid deeply nested control flow statements.
                                                                                                                                        Open

                                                                                                                                                          if (commonlength !== 0) {
                                                                                                                                                            diffs[pointer][1] = textInsert.substring(textInsert.length - commonlength) + diffs[pointer][1];
                                                                                                                                                            textInsert = textInsert.substring(0, textInsert.length - commonlength);
                                                                                                                                                            textDelete = textDelete.substring(0, textDelete.length - commonlength);
                                                                                                                                                          }
                                                                                                                                        Severity: Major
                                                                                                                                        Found in lib/qunit.js - About 45 mins to fix

                                                                                                                                          Avoid deeply nested control flow statements.
                                                                                                                                          Open

                                                                                                                                                                if (searchLowerCode === searchLowerCodeNew) continue; // doesn't make sense to transpose a repeat char
                                                                                                                                          Severity: Major
                                                                                                                                          Found in lib/qunit.js - About 45 mins to fix

                                                                                                                                            Avoid deeply nested control flow statements.
                                                                                                                                            Open

                                                                                                                                                                    if (result.score > q.peek().score) q.replaceTop(result);
                                                                                                                                            Severity: Major
                                                                                                                                            Found in lib/qunit.js - About 45 mins to fix

                                                                                                                                              Avoid deeply nested control flow statements.
                                                                                                                                              Open

                                                                                                                                                                  if (searchI === searchLen) {
                                                                                                                                                                    successStrict = true;
                                                                                                                                                                    break;
                                                                                                                                                                  }
                                                                                                                                              Severity: Major
                                                                                                                                              Found in lib/qunit.js - About 45 mins to fix

                                                                                                                                                Avoid deeply nested control flow statements.
                                                                                                                                                Open

                                                                                                                                                                if (x1 >= x2) {
                                                                                                                                                                  // Overlap detected.
                                                                                                                                                                  return this.diffBisectSplit(text1, text2, x1, y1, deadline);
                                                                                                                                                                }
                                                                                                                                                Severity: Major
                                                                                                                                                Found in lib/qunit.js - About 45 mins to fix

                                                                                                                                                  Avoid deeply nested control flow statements.
                                                                                                                                                  Open

                                                                                                                                                                      if (result.score > q.peek().score) q.replaceTop(result);
                                                                                                                                                  Severity: Major
                                                                                                                                                  Found in lib/qunit.js - About 45 mins to fix

                                                                                                                                                    Avoid deeply nested control flow statements.
                                                                                                                                                    Open

                                                                                                                                                                        if (result.score > q.peek().score) q.replaceTop(result);
                                                                                                                                                    Severity: Major
                                                                                                                                                    Found in lib/qunit.js - About 45 mins to fix

                                                                                                                                                      Avoid deeply nested control flow statements.
                                                                                                                                                      Open

                                                                                                                                                                      if (hasOwn.call(val.value, _j)) {
                                                                                                                                                                        urlConfigHtml += "<option value='" + escapeText(_j) + "'" + (config[val.id] === _j ? (selection = true) && " selected='selected'" : '') + '>' + escapeText(val.value[_j]) + '</option>';
                                                                                                                                                                      }
                                                                                                                                                      Severity: Major
                                                                                                                                                      Found in lib/qunit.js - About 45 mins to fix

                                                                                                                                                        Consider simplifying this complex logical expression.
                                                                                                                                                        Open

                                                                                                                                                                if (value === '' || rSpecialJson.test(value) || rSpecialYaml.test(value[0]) || rUntrimmed.test(value) || rNumerical.test(value) || rBool.test(value)) {
                                                                                                                                                                  if (!/\n/.test(value)) {
                                                                                                                                                                    // Complex one-line string, use JSON (quoted string)
                                                                                                                                                                    return JSON.stringify(value);
                                                                                                                                                                  } // See also <https://yaml-multiline.info/>
                                                                                                                                                        Severity: Major
                                                                                                                                                        Found in lib/qunit.js - About 40 mins to fix

                                                                                                                                                          Function onerror has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                                                                                                                                          Open

                                                                                                                                                                window$1.onerror = function (message, fileName, lineNumber, columnNumber, errorObj) {
                                                                                                                                                          Severity: Minor
                                                                                                                                                          Found in lib/qunit.js - About 35 mins to fix

                                                                                                                                                            Function value has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                                                                                                                                            Open

                                                                                                                                                                    value: function push(result, actual, expected, message, negative) {
                                                                                                                                                            Severity: Minor
                                                                                                                                                            Found in lib/qunit.js - About 35 mins to fix

                                                                                                                                                              Function diffBisectSplit has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                                                                                                                                              Open

                                                                                                                                                                    DiffMatchPatch.prototype.diffBisectSplit = function (text1, text2, x, y, deadline) {
                                                                                                                                                              Severity: Minor
                                                                                                                                                              Found in lib/qunit.js - About 35 mins to fix

                                                                                                                                                                Avoid too many return statements within this function.
                                                                                                                                                                Open

                                                                                                                                                                        return regexFilter ? this.regexFilter(!!regexFilter[1], regexFilter[2], regexFilter[3], fullName) : this.stringFilter(filter, fullName);
                                                                                                                                                                Severity: Major
                                                                                                                                                                Found in lib/qunit.js - About 30 mins to fix

                                                                                                                                                                  Avoid too many return statements within this function.
                                                                                                                                                                  Open

                                                                                                                                                                            return true;
                                                                                                                                                                  Severity: Major
                                                                                                                                                                  Found in lib/qunit.js - About 30 mins to fix

                                                                                                                                                                    Avoid too many return statements within this function.
                                                                                                                                                                    Open

                                                                                                                                                                              return value;
                                                                                                                                                                    Severity: Major
                                                                                                                                                                    Found in lib/qunit.js - About 30 mins to fix

                                                                                                                                                                      Avoid too many return statements within this function.
                                                                                                                                                                      Open

                                                                                                                                                                            return JSON.stringify(decycledShallowClone(value), null, 2);
                                                                                                                                                                      Severity: Major
                                                                                                                                                                      Found in lib/qunit.js - About 30 mins to fix

                                                                                                                                                                        Avoid too many return statements within this function.
                                                                                                                                                                        Open

                                                                                                                                                                                          if (resultsLen === 0) return resolve(noResults);
                                                                                                                                                                        Severity: Major
                                                                                                                                                                        Found in lib/qunit.js - About 30 mins to fix

                                                                                                                                                                          Avoid too many return statements within this function.
                                                                                                                                                                          Open

                                                                                                                                                                                    return this.diffLineMode(text1, text2, deadline);
                                                                                                                                                                          Severity: Major
                                                                                                                                                                          Found in lib/qunit.js - About 30 mins to fix

                                                                                                                                                                            Avoid too many return statements within this function.
                                                                                                                                                                            Open

                                                                                                                                                                                    return this.diffBisect(text1, text2, deadline);
                                                                                                                                                                            Severity: Major
                                                                                                                                                                            Found in lib/qunit.js - About 30 mins to fix

                                                                                                                                                                              Avoid too many return statements within this function.
                                                                                                                                                                              Open

                                                                                                                                                                                        return diffsA.concat([[DIFF_EQUAL, midCommon]], diffsB);
                                                                                                                                                                              Severity: Major
                                                                                                                                                                              Found in lib/qunit.js - About 30 mins to fix

                                                                                                                                                                                Identical blocks of code found in 2 locations. Consider refactoring.
                                                                                                                                                                                Open

                                                                                                                                                                                                  for (var keyI = keysLen - 1; keyI >= 0; --keyI) {
                                                                                                                                                                                                    var key = keys[keyI];
                                                                                                                                                                                                    var target = getValue(obj, key);
                                                                                                                                                                                  
                                                                                                                                                                                                    if (!target) {
                                                                                                                                                                                Severity: Major
                                                                                                                                                                                Found in lib/qunit.js and 1 other location - About 3 hrs to fix
                                                                                                                                                                                lib/qunit.js on lines 4907..4918

                                                                                                                                                                                Duplicated Code

                                                                                                                                                                                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                Tuning

                                                                                                                                                                                This issue has a mass of 113.

                                                                                                                                                                                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                                                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                                                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                                                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                                                Refactorings

                                                                                                                                                                                Further Reading

                                                                                                                                                                                Identical blocks of code found in 2 locations. Consider refactoring.
                                                                                                                                                                                Open

                                                                                                                                                                                                      for (var keyI = keysLen - 1; keyI >= 0; --keyI) {
                                                                                                                                                                                                        var key = keys[keyI];
                                                                                                                                                                                                        var target = getValue(obj, key);
                                                                                                                                                                                  
                                                                                                                                                                                                        if (!target) {
                                                                                                                                                                                Severity: Major
                                                                                                                                                                                Found in lib/qunit.js and 1 other location - About 3 hrs to fix
                                                                                                                                                                                lib/qunit.js on lines 4773..4784

                                                                                                                                                                                Duplicated Code

                                                                                                                                                                                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                Tuning

                                                                                                                                                                                This issue has a mass of 113.

                                                                                                                                                                                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                                                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                                                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                                                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                                                Refactorings

                                                                                                                                                                                Further Reading

                                                                                                                                                                                Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                                                                                                                Open

                                                                                                                                                                                            getPrepared: function getPrepared(target) {
                                                                                                                                                                                              if (target.length > 999) return fuzzysort.prepare(target); // don't cache huge targets
                                                                                                                                                                                  
                                                                                                                                                                                              var targetPrepared = preparedCache.get(target);
                                                                                                                                                                                              if (targetPrepared !== undefined) return targetPrepared;
                                                                                                                                                                                Severity: Major
                                                                                                                                                                                Found in lib/qunit.js and 1 other location - About 2 hrs to fix
                                                                                                                                                                                lib/qunit.js on lines 5168..5176

                                                                                                                                                                                Duplicated Code

                                                                                                                                                                                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                Tuning

                                                                                                                                                                                This issue has a mass of 93.

                                                                                                                                                                                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                                                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                                                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                                                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                                                Refactorings

                                                                                                                                                                                Further Reading

                                                                                                                                                                                Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                                                                                                                Open

                                                                                                                                                                                            getPreparedSearch: function getPreparedSearch(search) {
                                                                                                                                                                                              if (search.length > 999) return fuzzysort.prepareSearch(search); // don't cache huge searches
                                                                                                                                                                                  
                                                                                                                                                                                              var searchPrepared = preparedSearchCache.get(search);
                                                                                                                                                                                              if (searchPrepared !== undefined) return searchPrepared;
                                                                                                                                                                                Severity: Major
                                                                                                                                                                                Found in lib/qunit.js and 1 other location - About 2 hrs to fix
                                                                                                                                                                                lib/qunit.js on lines 5159..5167

                                                                                                                                                                                Duplicated Code

                                                                                                                                                                                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                Tuning

                                                                                                                                                                                This issue has a mass of 93.

                                                                                                                                                                                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                                                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                                                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                                                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                                                Refactorings

                                                                                                                                                                                Further Reading

                                                                                                                                                                                Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                                                                                                                Open

                                                                                                                                                                                            if (k2 === -d || k2 !== d && v2[k2Offset - 1] < v2[k2Offset + 1]) {
                                                                                                                                                                                              x2 = v2[k2Offset + 1];
                                                                                                                                                                                            } else {
                                                                                                                                                                                              x2 = v2[k2Offset - 1] + 1;
                                                                                                                                                                                            }
                                                                                                                                                                                Severity: Major
                                                                                                                                                                                Found in lib/qunit.js and 1 other location - About 2 hrs to fix
                                                                                                                                                                                lib/qunit.js on lines 7224..7228

                                                                                                                                                                                Duplicated Code

                                                                                                                                                                                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                Tuning

                                                                                                                                                                                This issue has a mass of 83.

                                                                                                                                                                                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                                                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                                                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                                                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                                                Refactorings

                                                                                                                                                                                Further Reading

                                                                                                                                                                                Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                                                                                                                Open

                                                                                                                                                                                            if (k1 === -d || k1 !== d && v1[k1Offset - 1] < v1[k1Offset + 1]) {
                                                                                                                                                                                              x1 = v1[k1Offset + 1];
                                                                                                                                                                                            } else {
                                                                                                                                                                                              x1 = v1[k1Offset - 1] + 1;
                                                                                                                                                                                            }
                                                                                                                                                                                Severity: Major
                                                                                                                                                                                Found in lib/qunit.js and 1 other location - About 2 hrs to fix
                                                                                                                                                                                lib/qunit.js on lines 7264..7268

                                                                                                                                                                                Duplicated Code

                                                                                                                                                                                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                Tuning

                                                                                                                                                                                This issue has a mass of 83.

                                                                                                                                                                                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                                                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                                                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                                                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                                                Refactorings

                                                                                                                                                                                Further Reading

                                                                                                                                                                                Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                                                                                                                Open

                                                                                                                                                                                            for (var c = n - 1 >> 1; n > 0 && e.score < r[c].score; c = (n = c) - 1 >> 1) {
                                                                                                                                                                                              r[n] = r[c];
                                                                                                                                                                                            }
                                                                                                                                                                                Severity: Major
                                                                                                                                                                                Found in lib/qunit.js and 1 other location - About 2 hrs to fix
                                                                                                                                                                                lib/qunit.js on lines 5550..5552

                                                                                                                                                                                Duplicated Code

                                                                                                                                                                                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                Tuning

                                                                                                                                                                                This issue has a mass of 80.

                                                                                                                                                                                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                                                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                                                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                                                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                                                Refactorings

                                                                                                                                                                                Further Reading

                                                                                                                                                                                Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                                                                                                                Open

                                                                                                                                                                                            for (var a = e - 1 >> 1; e > 0 && n.score < r[a].score; a = (e = a) - 1 >> 1) {
                                                                                                                                                                                              r[e] = r[a];
                                                                                                                                                                                            }
                                                                                                                                                                                Severity: Major
                                                                                                                                                                                Found in lib/qunit.js and 1 other location - About 2 hrs to fix
                                                                                                                                                                                lib/qunit.js on lines 5561..5563

                                                                                                                                                                                Duplicated Code

                                                                                                                                                                                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                Tuning

                                                                                                                                                                                This issue has a mass of 80.

                                                                                                                                                                                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                                                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                                                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                                                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                                                Refactorings

                                                                                                                                                                                Further Reading

                                                                                                                                                                                Identical blocks of code found in 2 locations. Consider refactoring.
                                                                                                                                                                                Open

                                                                                                                                                                                                  if (resultsLen < limit) {
                                                                                                                                                                                                    q.add(result);
                                                                                                                                                                                                    ++resultsLen;
                                                                                                                                                                                                  } else {
                                                                                                                                                                                                    ++limitedCount;
                                                                                                                                                                                Severity: Major
                                                                                                                                                                                Found in lib/qunit.js and 1 other location - About 1 hr to fix
                                                                                                                                                                                lib/qunit.js on lines 4968..4974

                                                                                                                                                                                Duplicated Code

                                                                                                                                                                                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                Tuning

                                                                                                                                                                                This issue has a mass of 72.

                                                                                                                                                                                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                                                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                                                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                                                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                                                Refactorings

                                                                                                                                                                                Further Reading

                                                                                                                                                                                Identical blocks of code found in 2 locations. Consider refactoring.
                                                                                                                                                                                Open

                                                                                                                                                                                                      if (resultsLen < limit) {
                                                                                                                                                                                                        q.add(result);
                                                                                                                                                                                                        ++resultsLen;
                                                                                                                                                                                                      } else {
                                                                                                                                                                                                        ++limitedCount;
                                                                                                                                                                                Severity: Major
                                                                                                                                                                                Found in lib/qunit.js and 1 other location - About 1 hr to fix
                                                                                                                                                                                lib/qunit.js on lines 4823..4829

                                                                                                                                                                                Duplicated Code

                                                                                                                                                                                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                Tuning

                                                                                                                                                                                This issue has a mass of 72.

                                                                                                                                                                                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                                                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                                                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                                                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                                                Refactorings

                                                                                                                                                                                Further Reading

                                                                                                                                                                                Identical blocks of code found in 2 locations. Consider refactoring.
                                                                                                                                                                                Open

                                                                                                                                                                                                      if (resultsLen < limit) {
                                                                                                                                                                                                        q.add(result);
                                                                                                                                                                                                        ++resultsLen;
                                                                                                                                                                                                      } else {
                                                                                                                                                                                                        ++limitedCount;
                                                                                                                                                                                Severity: Major
                                                                                                                                                                                Found in lib/qunit.js and 1 other location - About 1 hr to fix
                                                                                                                                                                                lib/qunit.js on lines 4841..4847

                                                                                                                                                                                Duplicated Code

                                                                                                                                                                                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                Tuning

                                                                                                                                                                                This issue has a mass of 70.

                                                                                                                                                                                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                                                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                                                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                                                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                                                Refactorings

                                                                                                                                                                                Further Reading

                                                                                                                                                                                Identical blocks of code found in 2 locations. Consider refactoring.
                                                                                                                                                                                Open

                                                                                                                                                                                                  if (resultsLen < limit) {
                                                                                                                                                                                                    q.add(result);
                                                                                                                                                                                                    ++resultsLen;
                                                                                                                                                                                                  } else {
                                                                                                                                                                                                    ++limitedCount;
                                                                                                                                                                                Severity: Major
                                                                                                                                                                                Found in lib/qunit.js and 1 other location - About 1 hr to fix
                                                                                                                                                                                lib/qunit.js on lines 4997..5003

                                                                                                                                                                                Duplicated Code

                                                                                                                                                                                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                Tuning

                                                                                                                                                                                This issue has a mass of 70.

                                                                                                                                                                                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                                                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                                                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                                                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                                                Refactorings

                                                                                                                                                                                Further Reading

                                                                                                                                                                                Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                                                                                                                Open

                                                                                                                                                                                          if (typeof then !== 'function') {
                                                                                                                                                                                            var _message2 = 'The value provided to `assert.rejects` in ' + '"' + currentTest.testName + '" was not a promise.';
                                                                                                                                                                                  
                                                                                                                                                                                            currentTest.assert.pushResult({
                                                                                                                                                                                              result: false,
                                                                                                                                                                                Severity: Major
                                                                                                                                                                                Found in lib/qunit.js and 1 other location - About 1 hr to fix
                                                                                                                                                                                lib/qunit.js on lines 1844..1853

                                                                                                                                                                                Duplicated Code

                                                                                                                                                                                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                Tuning

                                                                                                                                                                                This issue has a mass of 68.

                                                                                                                                                                                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                                                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                                                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                                                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                                                Refactorings

                                                                                                                                                                                Further Reading

                                                                                                                                                                                Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                                                                                                                Open

                                                                                                                                                                                          if (typeof block !== 'function') {
                                                                                                                                                                                            var _message = 'The value provided to `assert.throws` in ' + '"' + currentTest.testName + '" was not a function.';
                                                                                                                                                                                  
                                                                                                                                                                                            currentTest.assert.pushResult({
                                                                                                                                                                                              result: false,
                                                                                                                                                                                Severity: Major
                                                                                                                                                                                Found in lib/qunit.js and 1 other location - About 1 hr to fix
                                                                                                                                                                                lib/qunit.js on lines 1897..1906

                                                                                                                                                                                Duplicated Code

                                                                                                                                                                                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                Tuning

                                                                                                                                                                                This issue has a mass of 68.

                                                                                                                                                                                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                                                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                                                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                                                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                                                Refactorings

                                                                                                                                                                                Further Reading

                                                                                                                                                                                Identical blocks of code found in 2 locations. Consider refactoring.
                                                                                                                                                                                Open

                                                                                                                                                                                                  if (resultsLen < limit) {
                                                                                                                                                                                                    q.add(objResults);
                                                                                                                                                                                                    ++resultsLen;
                                                                                                                                                                                                  } else {
                                                                                                                                                                                                    ++limitedCount;
                                                                                                                                                                                Severity: Major
                                                                                                                                                                                Found in lib/qunit.js and 1 other location - About 1 hr to fix
                                                                                                                                                                                lib/qunit.js on lines 4927..4933

                                                                                                                                                                                Duplicated Code

                                                                                                                                                                                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                Tuning

                                                                                                                                                                                This issue has a mass of 66.

                                                                                                                                                                                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                                                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                                                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                                                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                                                Refactorings

                                                                                                                                                                                Further Reading

                                                                                                                                                                                Identical blocks of code found in 2 locations. Consider refactoring.
                                                                                                                                                                                Open

                                                                                                                                                                                                      if (resultsLen < limit) {
                                                                                                                                                                                                        q.add(objResults);
                                                                                                                                                                                                        ++resultsLen;
                                                                                                                                                                                                      } else {
                                                                                                                                                                                                        ++limitedCount;
                                                                                                                                                                                Severity: Major
                                                                                                                                                                                Found in lib/qunit.js and 1 other location - About 1 hr to fix
                                                                                                                                                                                lib/qunit.js on lines 4793..4799

                                                                                                                                                                                Duplicated Code

                                                                                                                                                                                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                Tuning

                                                                                                                                                                                This issue has a mass of 66.

                                                                                                                                                                                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                                                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                                                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                                                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                                                Refactorings

                                                                                                                                                                                Further Reading

                                                                                                                                                                                Identical blocks of code found in 2 locations. Consider refactoring.
                                                                                                                                                                                Open

                                                                                                                                                                                                for (var i = 0; i < searchLen; ++i) {
                                                                                                                                                                                                  var targetI = matchesBest[i]; // score only goes down if they're not consecutive
                                                                                                                                                                                  
                                                                                                                                                                                                  if (lastTargetI !== targetI - 1) score -= targetI;
                                                                                                                                                                                                  lastTargetI = targetI;
                                                                                                                                                                                Severity: Major
                                                                                                                                                                                Found in lib/qunit.js and 1 other location - About 1 hr to fix
                                                                                                                                                                                lib/qunit.js on lines 5292..5297

                                                                                                                                                                                Duplicated Code

                                                                                                                                                                                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                Tuning

                                                                                                                                                                                This issue has a mass of 64.

                                                                                                                                                                                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                                                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                                                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                                                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                                                Refactorings

                                                                                                                                                                                Further Reading

                                                                                                                                                                                Identical blocks of code found in 2 locations. Consider refactoring.
                                                                                                                                                                                Open

                                                                                                                                                                                                  if (isMatch) {
                                                                                                                                                                                                    matchesStrict[matchesStrictLen++] = targetI;
                                                                                                                                                                                                    ++searchI;
                                                                                                                                                                                  
                                                                                                                                                                                                    if (searchI === searchLen) {
                                                                                                                                                                                Severity: Major
                                                                                                                                                                                Found in lib/qunit.js and 1 other location - About 1 hr to fix
                                                                                                                                                                                lib/qunit.js on lines 5264..5276

                                                                                                                                                                                Duplicated Code

                                                                                                                                                                                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                Tuning

                                                                                                                                                                                This issue has a mass of 64.

                                                                                                                                                                                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                                                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                                                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                                                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                                                Refactorings

                                                                                                                                                                                Further Reading

                                                                                                                                                                                Identical blocks of code found in 2 locations. Consider refactoring.
                                                                                                                                                                                Open

                                                                                                                                                                                                  if (isMatch) {
                                                                                                                                                                                                    matchesStrict[matchesStrictLen++] = targetI;
                                                                                                                                                                                                    ++searchI;
                                                                                                                                                                                  
                                                                                                                                                                                                    if (searchI === searchLen) {
                                                                                                                                                                                Severity: Major
                                                                                                                                                                                Found in lib/qunit.js and 1 other location - About 1 hr to fix
                                                                                                                                                                                lib/qunit.js on lines 5365..5377

                                                                                                                                                                                Duplicated Code

                                                                                                                                                                                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                Tuning

                                                                                                                                                                                This issue has a mass of 64.

                                                                                                                                                                                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                                                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                                                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                                                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                                                Refactorings

                                                                                                                                                                                Further Reading

                                                                                                                                                                                Identical blocks of code found in 2 locations. Consider refactoring.
                                                                                                                                                                                Open

                                                                                                                                                                                                for (var i = 0; i < searchLen; ++i) {
                                                                                                                                                                                                  var targetI = matchesBest[i]; // score only goes down if they're not consecutive
                                                                                                                                                                                  
                                                                                                                                                                                                  if (lastTargetI !== targetI - 1) score -= targetI;
                                                                                                                                                                                                  lastTargetI = targetI;
                                                                                                                                                                                Severity: Major
                                                                                                                                                                                Found in lib/qunit.js and 1 other location - About 1 hr to fix
                                                                                                                                                                                lib/qunit.js on lines 5393..5398

                                                                                                                                                                                Duplicated Code

                                                                                                                                                                                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                Tuning

                                                                                                                                                                                This issue has a mass of 64.

                                                                                                                                                                                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                                                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                                                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                                                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                                                Refactorings

                                                                                                                                                                                Further Reading

                                                                                                                                                                                Identical blocks of code found in 3 locations. Consider refactoring.
                                                                                                                                                                                Open

                                                                                                                                                                                                      if (iCurrent % 1000
                                                                                                                                                                                                      /*itemsPerCheck*/
                                                                                                                                                                                                      === 0) {
                                                                                                                                                                                                        if (Date.now() - startMs >= 10
                                                                                                                                                                                                        /*asyncInterval*/
                                                                                                                                                                                Severity: Major
                                                                                                                                                                                Found in lib/qunit.js and 2 other locations - About 1 hr to fix
                                                                                                                                                                                lib/qunit.js on lines 4893..4902
                                                                                                                                                                                lib/qunit.js on lines 4940..4949

                                                                                                                                                                                Duplicated Code

                                                                                                                                                                                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                Tuning

                                                                                                                                                                                This issue has a mass of 63.

                                                                                                                                                                                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                                                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                                                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                                                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                                                Refactorings

                                                                                                                                                                                Further Reading

                                                                                                                                                                                Identical blocks of code found in 3 locations. Consider refactoring.
                                                                                                                                                                                Open

                                                                                                                                                                                                      if (iCurrent % 1000
                                                                                                                                                                                                      /*itemsPerCheck*/
                                                                                                                                                                                                      === 0) {
                                                                                                                                                                                                        if (Date.now() - startMs >= 10
                                                                                                                                                                                                        /*asyncInterval*/
                                                                                                                                                                                Severity: Major
                                                                                                                                                                                Found in lib/qunit.js and 2 other locations - About 1 hr to fix
                                                                                                                                                                                lib/qunit.js on lines 4893..4902
                                                                                                                                                                                lib/qunit.js on lines 4979..4988

                                                                                                                                                                                Duplicated Code

                                                                                                                                                                                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                Tuning

                                                                                                                                                                                This issue has a mass of 63.

                                                                                                                                                                                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                                                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                                                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                                                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                                                Refactorings

                                                                                                                                                                                Further Reading

                                                                                                                                                                                Identical blocks of code found in 3 locations. Consider refactoring.
                                                                                                                                                                                Open

                                                                                                                                                                                                      if (iCurrent % 1000
                                                                                                                                                                                                      /*itemsPerCheck*/
                                                                                                                                                                                                      === 0) {
                                                                                                                                                                                                        if (Date.now() - startMs >= 10
                                                                                                                                                                                                        /*asyncInterval*/
                                                                                                                                                                                Severity: Major
                                                                                                                                                                                Found in lib/qunit.js and 2 other locations - About 1 hr to fix
                                                                                                                                                                                lib/qunit.js on lines 4940..4949
                                                                                                                                                                                lib/qunit.js on lines 4979..4988

                                                                                                                                                                                Duplicated Code

                                                                                                                                                                                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                Tuning

                                                                                                                                                                                This issue has a mass of 63.

                                                                                                                                                                                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                                                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                                                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                                                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                                                Refactorings

                                                                                                                                                                                Further Reading

                                                                                                                                                                                Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                                                                                                                Open

                                                                                                                                                                                    test.only.each = function (testName, dataset, callback) {
                                                                                                                                                                                      runEach(dataset, function (data, testKey) {
                                                                                                                                                                                        addOnlyTest({
                                                                                                                                                                                          testName: makeEachTestName(testName, testKey),
                                                                                                                                                                                          callback: callback,
                                                                                                                                                                                Severity: Major
                                                                                                                                                                                Found in lib/qunit.js and 1 other location - About 1 hr to fix
                                                                                                                                                                                lib/qunit.js on lines 3702..3712

                                                                                                                                                                                Duplicated Code

                                                                                                                                                                                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                Tuning

                                                                                                                                                                                This issue has a mass of 57.

                                                                                                                                                                                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                                                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                                                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                                                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                                                Refactorings

                                                                                                                                                                                Further Reading

                                                                                                                                                                                Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                                                                                                                Open

                                                                                                                                                                                      }, {
                                                                                                                                                                                        key: "false",
                                                                                                                                                                                        value: function _false(result, message) {
                                                                                                                                                                                          this.pushResult({
                                                                                                                                                                                            result: result === false,
                                                                                                                                                                                Severity: Major
                                                                                                                                                                                Found in lib/qunit.js and 1 other location - About 1 hr to fix
                                                                                                                                                                                lib/qunit.js on lines 1692..1702

                                                                                                                                                                                Duplicated Code

                                                                                                                                                                                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                Tuning

                                                                                                                                                                                This issue has a mass of 57.

                                                                                                                                                                                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                                                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                                                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                                                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                                                Refactorings

                                                                                                                                                                                Further Reading

                                                                                                                                                                                Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                                                                                                                Open

                                                                                                                                                                                      each: function each(testName, dataset, callback) {
                                                                                                                                                                                        runEach(dataset, function (data, testKey) {
                                                                                                                                                                                          addTest({
                                                                                                                                                                                            testName: makeEachTestName(testName, testKey),
                                                                                                                                                                                            callback: callback,
                                                                                                                                                                                Severity: Major
                                                                                                                                                                                Found in lib/qunit.js and 1 other location - About 1 hr to fix
                                                                                                                                                                                lib/qunit.js on lines 3738..3748

                                                                                                                                                                                Duplicated Code

                                                                                                                                                                                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                Tuning

                                                                                                                                                                                This issue has a mass of 57.

                                                                                                                                                                                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                                                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                                                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                                                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                                                Refactorings

                                                                                                                                                                                Further Reading

                                                                                                                                                                                Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                                                                                                                Open

                                                                                                                                                                                      }, {
                                                                                                                                                                                        key: "true",
                                                                                                                                                                                        value: function _true(result, message) {
                                                                                                                                                                                          this.pushResult({
                                                                                                                                                                                            result: result === true,
                                                                                                                                                                                Severity: Major
                                                                                                                                                                                Found in lib/qunit.js and 1 other location - About 1 hr to fix
                                                                                                                                                                                lib/qunit.js on lines 1702..1712

                                                                                                                                                                                Duplicated Code

                                                                                                                                                                                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                Tuning

                                                                                                                                                                                This issue has a mass of 57.

                                                                                                                                                                                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                                                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                                                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                                                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                                                Refactorings

                                                                                                                                                                                Further Reading

                                                                                                                                                                                Identical blocks of code found in 2 locations. Consider refactoring.
                                                                                                                                                                                Open

                                                                                                                                                                                                      result = {
                                                                                                                                                                                                        target: result.target,
                                                                                                                                                                                                        _targetLowerCodes: null,
                                                                                                                                                                                                        _nextBeginningIndexes: null,
                                                                                                                                                                                                        score: result.score,
                                                                                                                                                                                Severity: Minor
                                                                                                                                                                                Found in lib/qunit.js and 1 other location - About 55 mins to fix
                                                                                                                                                                                lib/qunit.js on lines 4814..4821

                                                                                                                                                                                Duplicated Code

                                                                                                                                                                                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                Tuning

                                                                                                                                                                                This issue has a mass of 54.

                                                                                                                                                                                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                                                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                                                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                                                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                                                Refactorings

                                                                                                                                                                                Further Reading

                                                                                                                                                                                Identical blocks of code found in 2 locations. Consider refactoring.
                                                                                                                                                                                Open

                                                                                                                                                                                                  result = {
                                                                                                                                                                                                    target: result.target,
                                                                                                                                                                                                    _targetLowerCodes: null,
                                                                                                                                                                                                    _nextBeginningIndexes: null,
                                                                                                                                                                                                    score: result.score,
                                                                                                                                                                                Severity: Minor
                                                                                                                                                                                Found in lib/qunit.js and 1 other location - About 55 mins to fix
                                                                                                                                                                                lib/qunit.js on lines 4959..4966

                                                                                                                                                                                Duplicated Code

                                                                                                                                                                                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                Tuning

                                                                                                                                                                                This issue has a mass of 54.

                                                                                                                                                                                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                                                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                                                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                                                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                                                Refactorings

                                                                                                                                                                                Further Reading

                                                                                                                                                                                Similar blocks of code found in 3 locations. Consider refactoring.
                                                                                                                                                                                Open

                                                                                                                                                                                            this.log($.cyan("not ok ".concat(this.testCount, " # TODO ").concat(test.fullName.join(' > '))));
                                                                                                                                                                                Severity: Major
                                                                                                                                                                                Found in lib/qunit.js and 2 other locations - About 50 mins to fix
                                                                                                                                                                                lib/qunit.js on lines 4260..4260
                                                                                                                                                                                lib/qunit.js on lines 4267..4267

                                                                                                                                                                                Duplicated Code

                                                                                                                                                                                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                Tuning

                                                                                                                                                                                This issue has a mass of 52.

                                                                                                                                                                                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                                                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                                                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                                                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                                                Refactorings

                                                                                                                                                                                Further Reading

                                                                                                                                                                                Similar blocks of code found in 3 locations. Consider refactoring.
                                                                                                                                                                                Open

                                                                                                                                                                                            this.log($.yellow("ok ".concat(this.testCount, " # SKIP ").concat(test.fullName.join(' > '))));
                                                                                                                                                                                Severity: Major
                                                                                                                                                                                Found in lib/qunit.js and 2 other locations - About 50 mins to fix
                                                                                                                                                                                lib/qunit.js on lines 4262..4262
                                                                                                                                                                                lib/qunit.js on lines 4267..4267

                                                                                                                                                                                Duplicated Code

                                                                                                                                                                                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                Tuning

                                                                                                                                                                                This issue has a mass of 52.

                                                                                                                                                                                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                                                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                                                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                                                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                                                Refactorings

                                                                                                                                                                                Further Reading

                                                                                                                                                                                Similar blocks of code found in 3 locations. Consider refactoring.
                                                                                                                                                                                Open

                                                                                                                                                                                            this.log($.red("not ok ".concat(this.testCount, " ").concat(test.fullName.join(' > '))));
                                                                                                                                                                                Severity: Major
                                                                                                                                                                                Found in lib/qunit.js and 2 other locations - About 50 mins to fix
                                                                                                                                                                                lib/qunit.js on lines 4260..4260
                                                                                                                                                                                lib/qunit.js on lines 4262..4262

                                                                                                                                                                                Duplicated Code

                                                                                                                                                                                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                Tuning

                                                                                                                                                                                This issue has a mass of 52.

                                                                                                                                                                                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                                                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                                                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                                                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                                                Refactorings

                                                                                                                                                                                Further Reading

                                                                                                                                                                                Identical blocks of code found in 3 locations. Consider refactoring.
                                                                                                                                                                                Open

                                                                                                                                                                                              var allowTypo = options && options.allowTypo !== undefined ? options.allowTypo : instanceOptions && instanceOptions.allowTypo !== undefined ? instanceOptions.allowTypo : true;
                                                                                                                                                                                Severity: Major
                                                                                                                                                                                Found in lib/qunit.js and 2 other locations - About 50 mins to fix
                                                                                                                                                                                lib/qunit.js on lines 4757..4757
                                                                                                                                                                                lib/qunit.js on lines 4877..4877

                                                                                                                                                                                Duplicated Code

                                                                                                                                                                                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                Tuning

                                                                                                                                                                                This issue has a mass of 51.

                                                                                                                                                                                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                                                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                                                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                                                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                                                Refactorings

                                                                                                                                                                                Further Reading

                                                                                                                                                                                Identical blocks of code found in 3 locations. Consider refactoring.
                                                                                                                                                                                Open

                                                                                                                                                                                              var allowTypo = options && options.allowTypo !== undefined ? options.allowTypo : instanceOptions && instanceOptions.allowTypo !== undefined ? instanceOptions.allowTypo : true;
                                                                                                                                                                                Severity: Major
                                                                                                                                                                                Found in lib/qunit.js and 2 other locations - About 50 mins to fix
                                                                                                                                                                                lib/qunit.js on lines 4741..4741
                                                                                                                                                                                lib/qunit.js on lines 4877..4877

                                                                                                                                                                                Duplicated Code

                                                                                                                                                                                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                Tuning

                                                                                                                                                                                This issue has a mass of 51.

                                                                                                                                                                                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                                                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                                                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                                                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                                                Refactorings

                                                                                                                                                                                Further Reading

                                                                                                                                                                                Identical blocks of code found in 3 locations. Consider refactoring.
                                                                                                                                                                                Open

                                                                                                                                                                                                var allowTypo = options && options.allowTypo !== undefined ? options.allowTypo : instanceOptions && instanceOptions.allowTypo !== undefined ? instanceOptions.allowTypo : true;
                                                                                                                                                                                Severity: Major
                                                                                                                                                                                Found in lib/qunit.js and 2 other locations - About 50 mins to fix
                                                                                                                                                                                lib/qunit.js on lines 4741..4741
                                                                                                                                                                                lib/qunit.js on lines 4757..4757

                                                                                                                                                                                Duplicated Code

                                                                                                                                                                                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                Tuning

                                                                                                                                                                                This issue has a mass of 51.

                                                                                                                                                                                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                                                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                                                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                                                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                                                Refactorings

                                                                                                                                                                                Further Reading

                                                                                                                                                                                Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                                                                                                                Open

                                                                                                                                                                                      function addClass(elem, name) {
                                                                                                                                                                                        if (!hasClass(elem, name)) {
                                                                                                                                                                                          elem.className += (elem.className ? ' ' : '') + name;
                                                                                                                                                                                        }
                                                                                                                                                                                      }
                                                                                                                                                                                Severity: Minor
                                                                                                                                                                                Found in lib/qunit.js and 1 other location - About 40 mins to fix
                                                                                                                                                                                lib/qunit-composite.js on lines 33..37

                                                                                                                                                                                Duplicated Code

                                                                                                                                                                                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                Tuning

                                                                                                                                                                                This issue has a mass of 49.

                                                                                                                                                                                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                                                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                                                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                                                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                                                Refactorings

                                                                                                                                                                                Further Reading

                                                                                                                                                                                Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                                                                                                                Open

                                                                                                                                                                                          if (config.current !== test) {
                                                                                                                                                                                            throw new Error('Unexpected release of async pause during a different test.\n' + "> Test: ".concat(test.testName, " [async #").concat(pauseId, "]"));
                                                                                                                                                                                          }
                                                                                                                                                                                Severity: Minor
                                                                                                                                                                                Found in lib/qunit.js and 1 other location - About 40 mins to fix
                                                                                                                                                                                lib/qunit.js on lines 3430..3432

                                                                                                                                                                                Duplicated Code

                                                                                                                                                                                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                Tuning

                                                                                                                                                                                This issue has a mass of 48.

                                                                                                                                                                                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                                                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                                                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                                                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                                                Refactorings

                                                                                                                                                                                Further Reading

                                                                                                                                                                                Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                                                                                                                Open

                                                                                                                                                                                          if (config.current === undefined) {
                                                                                                                                                                                            throw new Error('Unexpected release of async pause after tests finished.\n' + "> Test: ".concat(test.testName, " [async #").concat(pauseId, "]"));
                                                                                                                                                                                          }
                                                                                                                                                                                Severity: Minor
                                                                                                                                                                                Found in lib/qunit.js and 1 other location - About 40 mins to fix
                                                                                                                                                                                lib/qunit.js on lines 3434..3436

                                                                                                                                                                                Duplicated Code

                                                                                                                                                                                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                Tuning

                                                                                                                                                                                This issue has a mass of 48.

                                                                                                                                                                                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                                                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                                                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                                                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                                                Refactorings

                                                                                                                                                                                Further Reading

                                                                                                                                                                                Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                                                                                                                Open

                                                                                                                                                                                                  var isMatch = searchLowerCodes[typoStrictI === 0 ? searchI : typoStrictI === searchI ? searchI + 1 : typoStrictI === searchI - 1 ? searchI - 1 : searchI] === targetLowerCodes[targetI];
                                                                                                                                                                                Severity: Minor
                                                                                                                                                                                Found in lib/qunit.js and 1 other location - About 35 mins to fix
                                                                                                                                                                                lib/qunit.js on lines 5197..5197

                                                                                                                                                                                Duplicated Code

                                                                                                                                                                                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                Tuning

                                                                                                                                                                                This issue has a mass of 47.

                                                                                                                                                                                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                                                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                                                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                                                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                                                Refactorings

                                                                                                                                                                                Further Reading

                                                                                                                                                                                Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                                                                                                                Open

                                                                                                                                                                                                  searchLowerCode = searchLowerCodes[typoSimpleI === 0 ? searchI : typoSimpleI === searchI ? searchI + 1 : typoSimpleI === searchI - 1 ? searchI - 1 : searchI];
                                                                                                                                                                                Severity: Minor
                                                                                                                                                                                Found in lib/qunit.js and 1 other location - About 35 mins to fix
                                                                                                                                                                                lib/qunit.js on lines 5262..5262

                                                                                                                                                                                Duplicated Code

                                                                                                                                                                                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                Tuning

                                                                                                                                                                                This issue has a mass of 47.

                                                                                                                                                                                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                                                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                                                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                                                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                                                Refactorings

                                                                                                                                                                                Further Reading

                                                                                                                                                                                Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                                                                                                                Open

                                                                                                                                                                                        if (text1.length > text2.length) {
                                                                                                                                                                                          text1A = hm[0];
                                                                                                                                                                                          text1B = hm[1];
                                                                                                                                                                                          text2A = hm[2];
                                                                                                                                                                                          text2B = hm[3];
                                                                                                                                                                                Severity: Minor
                                                                                                                                                                                Found in lib/qunit.js and 1 other location - About 35 mins to fix
                                                                                                                                                                                lib/qunit.js on lines 7088..7093

                                                                                                                                                                                Duplicated Code

                                                                                                                                                                                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                Tuning

                                                                                                                                                                                This issue has a mass of 47.

                                                                                                                                                                                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                                                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                                                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                                                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                                                Refactorings

                                                                                                                                                                                Further Reading

                                                                                                                                                                                Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                                                                                                                Open

                                                                                                                                                                                        } else {
                                                                                                                                                                                          text2A = hm[0];
                                                                                                                                                                                          text2B = hm[1];
                                                                                                                                                                                          text1A = hm[2];
                                                                                                                                                                                          text1B = hm[3];
                                                                                                                                                                                Severity: Minor
                                                                                                                                                                                Found in lib/qunit.js and 1 other location - About 35 mins to fix
                                                                                                                                                                                lib/qunit.js on lines 7083..7088

                                                                                                                                                                                Duplicated Code

                                                                                                                                                                                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                Tuning

                                                                                                                                                                                This issue has a mass of 47.

                                                                                                                                                                                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                                                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                                                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                                                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                                                Refactorings

                                                                                                                                                                                Further Reading

                                                                                                                                                                                Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                                                                                                                Open

                                                                                                                                                                                            currentTest.assert.pushResult({
                                                                                                                                                                                              result: result,
                                                                                                                                                                                              // leave rejection value of undefined as-is
                                                                                                                                                                                              actual: actual && errorString(actual),
                                                                                                                                                                                              expected: expected,
                                                                                                                                                                                Severity: Minor
                                                                                                                                                                                Found in lib/qunit.js and 1 other location - About 35 mins to fix
                                                                                                                                                                                lib/qunit.js on lines 1877..1883

                                                                                                                                                                                Duplicated Code

                                                                                                                                                                                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                Tuning

                                                                                                                                                                                This issue has a mass of 46.

                                                                                                                                                                                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                                                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                                                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                                                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                                                Refactorings

                                                                                                                                                                                Further Reading

                                                                                                                                                                                Identical blocks of code found in 2 locations. Consider refactoring.
                                                                                                                                                                                Open

                                                                                                                                                                                                for (var i = matchesBestLen - 1; i >= 0; --i) {
                                                                                                                                                                                                  prepared.indexes[i] = matchesBest[i];
                                                                                                                                                                                                }
                                                                                                                                                                                Severity: Minor
                                                                                                                                                                                Found in lib/qunit.js and 1 other location - About 35 mins to fix
                                                                                                                                                                                lib/qunit.js on lines 5312..5314

                                                                                                                                                                                Duplicated Code

                                                                                                                                                                                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                Tuning

                                                                                                                                                                                This issue has a mass of 46.

                                                                                                                                                                                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                                                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                                                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                                                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                                                Refactorings

                                                                                                                                                                                Further Reading

                                                                                                                                                                                Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                                                                                                                Open

                                                                                                                                                                                          currentTest.assert.pushResult({
                                                                                                                                                                                            result: result,
                                                                                                                                                                                            // undefined if it didn't throw
                                                                                                                                                                                            actual: actual && errorString(actual),
                                                                                                                                                                                            expected: expected,
                                                                                                                                                                                Severity: Minor
                                                                                                                                                                                Found in lib/qunit.js and 1 other location - About 35 mins to fix
                                                                                                                                                                                lib/qunit.js on lines 1927..1933

                                                                                                                                                                                Duplicated Code

                                                                                                                                                                                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                Tuning

                                                                                                                                                                                This issue has a mass of 46.

                                                                                                                                                                                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                                                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                                                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                                                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                                                Refactorings

                                                                                                                                                                                Further Reading

                                                                                                                                                                                Identical blocks of code found in 2 locations. Consider refactoring.
                                                                                                                                                                                Open

                                                                                                                                                                                              if (!target) return {
                                                                                                                                                                                                target: '',
                                                                                                                                                                                                _targetLowerCodes: [0
                                                                                                                                                                                                /*this 0 doesn't make sense. here because an empty array causes the algorithm to deoptimize and run 50% slower!*/
                                                                                                                                                                                                ],
                                                                                                                                                                                Severity: Minor
                                                                                                                                                                                Found in lib/qunit.js and 1 other location - About 35 mins to fix
                                                                                                                                                                                lib/qunit.js on lines 5131..5140

                                                                                                                                                                                Duplicated Code

                                                                                                                                                                                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                Tuning

                                                                                                                                                                                This issue has a mass of 46.

                                                                                                                                                                                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                                                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                                                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                                                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                                                Refactorings

                                                                                                                                                                                Further Reading

                                                                                                                                                                                Identical blocks of code found in 2 locations. Consider refactoring.
                                                                                                                                                                                Open

                                                                                                                                                                                              if (!target) return {
                                                                                                                                                                                                target: '',
                                                                                                                                                                                                _targetLowerCodes: [0
                                                                                                                                                                                                /*this 0 doesn't make sense. here because an empty array causes the algorithm to deoptimize and run 50% slower!*/
                                                                                                                                                                                                ],
                                                                                                                                                                                Severity: Minor
                                                                                                                                                                                Found in lib/qunit.js and 1 other location - About 35 mins to fix
                                                                                                                                                                                lib/qunit.js on lines 5110..5119

                                                                                                                                                                                Duplicated Code

                                                                                                                                                                                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                Tuning

                                                                                                                                                                                This issue has a mass of 46.

                                                                                                                                                                                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                                                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                                                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                                                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                                                Refactorings

                                                                                                                                                                                Further Reading

                                                                                                                                                                                Identical blocks of code found in 2 locations. Consider refactoring.
                                                                                                                                                                                Open

                                                                                                                                                                                                for (var i = matchesBestLen - 1; i >= 0; --i) {
                                                                                                                                                                                                  prepared.indexes[i] = matchesBest[i];
                                                                                                                                                                                                }
                                                                                                                                                                                Severity: Minor
                                                                                                                                                                                Found in lib/qunit.js and 1 other location - About 35 mins to fix
                                                                                                                                                                                lib/qunit.js on lines 5405..5407

                                                                                                                                                                                Duplicated Code

                                                                                                                                                                                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                Tuning

                                                                                                                                                                                This issue has a mass of 46.

                                                                                                                                                                                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                                                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                                                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                                                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                                                Refactorings

                                                                                                                                                                                Further Reading

                                                                                                                                                                                Identical blocks of code found in 2 locations. Consider refactoring.
                                                                                                                                                                                Open

                                                                                                                                                                                                  for (var i = resultsLen - 1; i >= 0; --i) {
                                                                                                                                                                                                    results[i] = q.poll();
                                                                                                                                                                                                  }
                                                                                                                                                                                Severity: Minor
                                                                                                                                                                                Found in lib/qunit.js and 1 other location - About 30 mins to fix
                                                                                                                                                                                lib/qunit.js on lines 4854..4856

                                                                                                                                                                                Duplicated Code

                                                                                                                                                                                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                Tuning

                                                                                                                                                                                This issue has a mass of 45.

                                                                                                                                                                                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                                                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                                                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                                                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                                                Refactorings

                                                                                                                                                                                Further Reading

                                                                                                                                                                                Identical blocks of code found in 2 locations. Consider refactoring.
                                                                                                                                                                                Open

                                                                                                                                                                                              for (var i = resultsLen - 1; i >= 0; --i) {
                                                                                                                                                                                                results[i] = q.poll();
                                                                                                                                                                                              }
                                                                                                                                                                                Severity: Minor
                                                                                                                                                                                Found in lib/qunit.js and 1 other location - About 30 mins to fix
                                                                                                                                                                                lib/qunit.js on lines 5010..5012

                                                                                                                                                                                Duplicated Code

                                                                                                                                                                                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                Tuning

                                                                                                                                                                                This issue has a mass of 45.

                                                                                                                                                                                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                                                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                                                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                                                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                                                Refactorings

                                                                                                                                                                                Further Reading

                                                                                                                                                                                Identical blocks of code found in 2 locations. Consider refactoring.
                                                                                                                                                                                Open

                                                                                                                                                                                        this.log = options.log || Function.prototype.bind.call(console$1.log, console$1);
                                                                                                                                                                                Severity: Minor
                                                                                                                                                                                Found in lib/qunit.js and 1 other location - About 30 mins to fix
                                                                                                                                                                                lib/qunit.js on lines 4213..4213

                                                                                                                                                                                Duplicated Code

                                                                                                                                                                                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                Tuning

                                                                                                                                                                                This issue has a mass of 45.

                                                                                                                                                                                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                                                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                                                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                                                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                                                Refactorings

                                                                                                                                                                                Further Reading

                                                                                                                                                                                Identical blocks of code found in 2 locations. Consider refactoring.
                                                                                                                                                                                Open

                                                                                                                                                                                        this.log = options.log || Function.prototype.bind.call(console$1.log, console$1);
                                                                                                                                                                                Severity: Minor
                                                                                                                                                                                Found in lib/qunit.js and 1 other location - About 30 mins to fix
                                                                                                                                                                                lib/qunit.js on lines 3888..3888

                                                                                                                                                                                Duplicated Code

                                                                                                                                                                                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                                                                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                                                                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                                                                Tuning

                                                                                                                                                                                This issue has a mass of 45.

                                                                                                                                                                                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                                                                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                                                                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                                                                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                                                                Refactorings

                                                                                                                                                                                Further Reading

                                                                                                                                                                                There are no issues that match your filters.

                                                                                                                                                                                Category
                                                                                                                                                                                Status