wikimedia/mediawiki-core

View on GitHub
resources/lib/qunitjs/qunit.js

Summary

Maintainability
F
1 mo
Test Coverage

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

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

    Function UMD has 665 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 resources/lib/qunitjs/qunit.js - About 3 days to fix

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

        QUnit.diff = function () {
          function DiffMatchPatch() {}
      
          //  DIFF FUNCTIONS
      
      
      Severity: Major
      Found in resources/lib/qunitjs/qunit.js - About 3 days to fix

        Function fuzzysortNew has 577 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 resources/lib/qunitjs/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 resources/lib/qunitjs/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, '\\"') + '"';
                }
                function literal(o) {
            Severity: Major
            Found in resources/lib/qunitjs/qunit.js - About 1 day 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 resources/lib/qunitjs/qunit.js - About 5 hrs to fix

                Function goAsync has 121 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 resources/lib/qunitjs/qunit.js - About 4 hrs to fix

                  Function p has 114 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 resources/lib/qunitjs/qunit.js - About 4 hrs to fix

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

                      var SuiteReport = /*#__PURE__*/function () {
                        function SuiteReport(name, parentSuite) {
                          _classCallCheck(this, SuiteReport);
                          this.name = name;
                          this.fullName = parentSuite ? parentSuite.fullName.concat(name) : [];
                    Severity: Major
                    Found in resources/lib/qunitjs/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);
                            // Cache references to console methods to ensure we can report failures
                      Severity: Major
                      Found in resources/lib/qunitjs/qunit.js - About 4 hrs to fix

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

                            finish: function finish() {
                              config.current = this;
                        
                              // Release the timeout and timeout callback references to be garbage collected.
                              // https://github.com/qunitjs/qunit/pull/1708
                        Severity: Major
                        Found in resources/lib/qunitjs/qunit.js - About 4 hrs to fix

                          Function algorithm has 99 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 resources/lib/qunitjs/qunit.js - About 3 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 resources/lib/qunitjs/qunit.js - About 3 hrs to fix

                              Function step has 94 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]
                              Severity: Major
                              Found in resources/lib/qunitjs/qunit.js - About 3 hrs to fix

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

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

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

                                      DiffMatchPatch.prototype.diffCleanupMerge = function (diffs) {
                                        diffs.push([DIFF_EQUAL, '']); // Add a dummy entry at the end.
                                        var pointer = 0;
                                        var countDelete = 0;
                                        var countInsert = 0;
                                  Severity: Major
                                  Found in resources/lib/qunitjs/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;
                                    Severity: Major
                                    Found in resources/lib/qunitjs/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 = false;
                                            var equalities = []; // Stack of indices where equalities are found.
                                            var equalitiesLength = 0; // Keeping our own length var is faster in JS.
                                            /** @type {?string} */
                                      Severity: Major
                                      Found in resources/lib/qunitjs/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 resources/lib/qunitjs/qunit.js - About 2 hrs to fix

                                          Function PerfReporter has 55 lines of code (exceeds 25 allowed). Consider refactoring.
                                          Open

                                            var PerfReporter = /*#__PURE__*/function () {
                                              function PerfReporter(runner) {
                                                var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
                                                _classCallCheck(this, PerfReporter);
                                                this.perf = options.perf || perf;
                                          Severity: Major
                                          Found in resources/lib/qunitjs/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 resources/lib/qunitjs/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;
                                                    if (longtext.length < 4 || shorttext.length * 2 < longtext.length) {
                                              Severity: Major
                                              Found in resources/lib/qunitjs/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
                                                Severity: Minor
                                                Found in resources/lib/qunitjs/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 resources/lib/qunitjs/qunit.js - About 2 hrs 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") {
                                                            if (it) o = it;
                                                    Severity: Minor
                                                    Found in resources/lib/qunitjs/qunit.js - About 1 hr 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.
                                                            equalitiesLength = 0; // Keeping our own length var is faster in JS.
                                                      Severity: Minor
                                                      Found in resources/lib/qunitjs/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 resources/lib/qunitjs/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);
                                                          Severity: Minor
                                                          Found in resources/lib/qunitjs/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);
                                                                  // Cache references to console methods to ensure we can report failures
                                                            Severity: Minor
                                                            Found in resources/lib/qunitjs/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;
                                                                  this.has = function (strKey) {
                                                              Severity: Minor
                                                              Found in resources/lib/qunitjs/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
                                                                      // and let the below output it as bare string.
                                                                Severity: Minor
                                                                Found in resources/lib/qunitjs/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 resources/lib/qunitjs/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 resources/lib/qunitjs/qunit.js - About 1 hr to fix

                                                                      Function rejects has 37 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);
                                                                              expected = _validateExpectedExce4[0];
                                                                              message = _validateExpectedExce4[1];
                                                                      Severity: Minor
                                                                      Found in resources/lib/qunitjs/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 = '';
                                                                              for (var i = 0; i < urlConfig.length; i++) {
                                                                        Severity: Minor
                                                                        Found in resources/lib/qunitjs/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 resources/lib/qunitjs/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 resources/lib/qunitjs/qunit.js - About 1 hr to fix

                                                                              Function throws has 35 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);
                                                                                      expected = _validateExpectedExce2[0];
                                                                                      message = _validateExpectedExce2[1];
                                                                              Severity: Minor
                                                                              Found in resources/lib/qunitjs/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).
                                                                                        return [[DIFF_INSERT, text2]];
                                                                                Severity: Minor
                                                                                Found in resources/lib/qunitjs/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);
                                                                                  
                                                                                  
                                                                                  Severity: Minor
                                                                                  Found in resources/lib/qunitjs/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;
                                                                                          options = undefined;
                                                                                    Severity: Minor
                                                                                    Found in resources/lib/qunitjs/qunit.js - About 1 hr to fix

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

                                                                                          object: function object(a, b) {
                                                                                            // Handle memory (skip recursion)
                                                                                            if (memory.some(function (pair) {
                                                                                              return pair.a === a && pair.b === b;
                                                                                            })) {
                                                                                      Severity: Minor
                                                                                      Found in resources/lib/qunitjs/qunit.js - About 1 hr to fix

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

                                                                                            DiffMatchPatch.prototype.diffLinesToChars = function (text1, text2) {
                                                                                              var lineArray = []; // E.g. lineArray[4] === 'Hello\n'
                                                                                              var lineHash = {}; // E.g. lineHash['Hello\n'] === 4
                                                                                        
                                                                                              // '\x00' is a valid character, but various debuggers don't like it.
                                                                                        Severity: Minor
                                                                                        Found in resources/lib/qunitjs/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 resources/lib/qunitjs/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 resources/lib/qunitjs/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 resources/lib/qunitjs/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 resources/lib/qunitjs/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 = {};
                                                                                                          function n() {
                                                                                                  Severity: Minor
                                                                                                  Found in resources/lib/qunitjs/qunit.js - About 1 hr to fix

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

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

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

                                                                                                          DiffMatchPatch.prototype.diffCommonOverlap = function (text1, text2) {
                                                                                                            // Cache the text lengths to prevent multiple calls.
                                                                                                            var text1Length = text1.length;
                                                                                                            var text2Length = text2.length;
                                                                                                      
                                                                                                      
                                                                                                      Severity: Minor
                                                                                                      Found in resources/lib/qunitjs/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';
                                                                                                            }
                                                                                                        
                                                                                                        
                                                                                                        Severity: Minor
                                                                                                        Found in resources/lib/qunitjs/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.
                                                                                                                if (window$1.QUnit && window$1.QUnit.version) {
                                                                                                          Severity: Minor
                                                                                                          Found in resources/lib/qunitjs/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);
                                                                                                                    _this3.resolvePromise(promise, hookName);
                                                                                                            Severity: Minor
                                                                                                            Found in resources/lib/qunitjs/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 resources/lib/qunitjs/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);
                                                                                                                        return;
                                                                                                                Severity: Minor
                                                                                                                Found in resources/lib/qunitjs/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.
                                                                                                                  Severity: Major
                                                                                                                  Found in resources/lib/qunitjs/qunit.js - About 1 hr 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 resources/lib/qunitjs/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 resources/lib/qunitjs/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 resources/lib/qunitjs/qunit.js - About 45 mins to fix

                                                                                                                          Avoid deeply nested control flow statements.
                                                                                                                          Open

                                                                                                                                            if (searchI === searchLen) {
                                                                                                                                              successStrict = true;
                                                                                                                                              break;
                                                                                                                                            }
                                                                                                                          Severity: Major
                                                                                                                          Found in resources/lib/qunitjs/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 resources/lib/qunitjs/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 resources/lib/qunitjs/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 resources/lib/qunitjs/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 resources/lib/qunitjs/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 resources/lib/qunitjs/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 resources/lib/qunitjs/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 resources/lib/qunitjs/qunit.js - About 45 mins to fix

                                                                                                                                          Avoid deeply nested control flow statements.
                                                                                                                                          Open

                                                                                                                                                            if (typoStrictI > searchLen - 2) break;
                                                                                                                                          Severity: Major
                                                                                                                                          Found in resources/lib/qunitjs/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 resources/lib/qunitjs/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 resources/lib/qunitjs/qunit.js - About 45 mins to fix

                                                                                                                                                Avoid deeply nested control flow statements.
                                                                                                                                                Open

                                                                                                                                                                  if (searchI === searchLen) {
                                                                                                                                                                    successStrict = true;
                                                                                                                                                                    break;
                                                                                                                                                                  }
                                                                                                                                                Severity: Major
                                                                                                                                                Found in resources/lib/qunitjs/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 resources/lib/qunitjs/qunit.js - About 45 mins to fix

                                                                                                                                                    Avoid deeply nested control flow statements.
                                                                                                                                                    Open

                                                                                                                                                                  if (classNameHasPass || classNameHasSkipped) {
                                                                                                                                                                    hiddenTests.push(test);
                                                                                                                                                                  }
                                                                                                                                                    Severity: Major
                                                                                                                                                    Found in resources/lib/qunitjs/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 resources/lib/qunitjs/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 resources/lib/qunitjs/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);
                                                                                                                                                                  }
                                                                                                                                                          Severity: Major
                                                                                                                                                          Found in resources/lib/qunitjs/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 resources/lib/qunitjs/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 resources/lib/qunitjs/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 resources/lib/qunitjs/qunit.js - About 35 mins to fix

                                                                                                                                                                  Avoid too many return statements within this function.
                                                                                                                                                                  Open

                                                                                                                                                                          return diffsA.concat([[DIFF_EQUAL, midCommon]], diffsB);
                                                                                                                                                                  Severity: Major
                                                                                                                                                                  Found in resources/lib/qunitjs/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 resources/lib/qunitjs/qunit.js - About 30 mins to fix

                                                                                                                                                                      Avoid too many return statements within this function.
                                                                                                                                                                      Open

                                                                                                                                                                              return true;
                                                                                                                                                                      Severity: Major
                                                                                                                                                                      Found in resources/lib/qunitjs/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 resources/lib/qunitjs/qunit.js - About 30 mins to fix

                                                                                                                                                                          Avoid too many return statements within this function.
                                                                                                                                                                          Open

                                                                                                                                                                                return objTypeCallbacks.array(aProperties.sort(), bProperties.sort());
                                                                                                                                                                          Severity: Major
                                                                                                                                                                          Found in resources/lib/qunitjs/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 resources/lib/qunitjs/qunit.js - About 30 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 resources/lib/qunitjs/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 resources/lib/qunitjs/qunit.js - About 30 mins to fix

                                                                                                                                                                                  Avoid too many return statements within this function.
                                                                                                                                                                                  Open

                                                                                                                                                                                          return value;
                                                                                                                                                                                  Severity: Major
                                                                                                                                                                                  Found in resources/lib/qunitjs/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) {
                                                                                                                                                                                                            objResults[keyI] = null;
                                                                                                                                                                                    Severity: Major
                                                                                                                                                                                    Found in resources/lib/qunitjs/qunit.js and 1 other location - About 3 hrs to fix
                                                                                                                                                                                    resources/lib/qunitjs/qunit.js on lines 4425..4434

                                                                                                                                                                                    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) {
                                                                                                                                                                                                        objResults[keyI] = null;
                                                                                                                                                                                    Severity: Major
                                                                                                                                                                                    Found in resources/lib/qunitjs/qunit.js and 1 other location - About 3 hrs to fix
                                                                                                                                                                                    resources/lib/qunitjs/qunit.js on lines 4546..4555

                                                                                                                                                                                    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;
                                                                                                                                                                                                targetPrepared = fuzzysort.prepare(target);
                                                                                                                                                                                    Severity: Major
                                                                                                                                                                                    Found in resources/lib/qunitjs/qunit.js and 1 other location - About 2 hrs to fix
                                                                                                                                                                                    resources/lib/qunitjs/qunit.js on lines 4772..4779

                                                                                                                                                                                    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;
                                                                                                                                                                                                searchPrepared = fuzzysort.prepareSearch(search);
                                                                                                                                                                                    Severity: Major
                                                                                                                                                                                    Found in resources/lib/qunitjs/qunit.js and 1 other location - About 2 hrs to fix
                                                                                                                                                                                    resources/lib/qunitjs/qunit.js on lines 4764..4771

                                                                                                                                                                                    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 resources/lib/qunitjs/qunit.js and 1 other location - About 2 hrs to fix
                                                                                                                                                                                    resources/lib/qunitjs/qunit.js on lines 6609..6613

                                                                                                                                                                                    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 resources/lib/qunitjs/qunit.js and 1 other location - About 2 hrs to fix
                                                                                                                                                                                    resources/lib/qunitjs/qunit.js on lines 6642..6646

                                                                                                                                                                                    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 resources/lib/qunitjs/qunit.js and 1 other location - About 2 hrs to fix
                                                                                                                                                                                    resources/lib/qunitjs/qunit.js on lines 5102..5104

                                                                                                                                                                                    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 resources/lib/qunitjs/qunit.js and 1 other location - About 2 hrs to fix
                                                                                                                                                                                    resources/lib/qunitjs/qunit.js on lines 5110..5112

                                                                                                                                                                                    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 resources/lib/qunitjs/qunit.js and 1 other location - About 1 hr to fix
                                                                                                                                                                                    resources/lib/qunitjs/qunit.js on lines 4471..4477

                                                                                                                                                                                    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 resources/lib/qunitjs/qunit.js and 1 other location - About 1 hr to fix
                                                                                                                                                                                    resources/lib/qunitjs/qunit.js on lines 4598..4604

                                                                                                                                                                                    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 resources/lib/qunitjs/qunit.js and 1 other location - About 1 hr to fix
                                                                                                                                                                                    resources/lib/qunitjs/qunit.js on lines 4489..4495

                                                                                                                                                                                    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 resources/lib/qunitjs/qunit.js and 1 other location - About 1 hr to fix
                                                                                                                                                                                    resources/lib/qunitjs/qunit.js on lines 4622..4628

                                                                                                                                                                                    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(objResults);
                                                                                                                                                                                                      ++resultsLen;
                                                                                                                                                                                                    } else {
                                                                                                                                                                                                      ++limitedCount;
                                                                                                                                                                                    Severity: Major
                                                                                                                                                                                    Found in resources/lib/qunitjs/qunit.js and 1 other location - About 1 hr to fix
                                                                                                                                                                                    resources/lib/qunitjs/qunit.js on lines 4561..4567

                                                                                                                                                                                    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 resources/lib/qunitjs/qunit.js and 1 other location - About 1 hr to fix
                                                                                                                                                                                    resources/lib/qunitjs/qunit.js on lines 4440..4446

                                                                                                                                                                                    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 resources/lib/qunitjs/qunit.js and 1 other location - About 1 hr to fix
                                                                                                                                                                                    resources/lib/qunitjs/qunit.js on lines 4881..4886

                                                                                                                                                                                    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) {
                                                                                                                                                                                                        successStrict = true;
                                                                                                                                                                                    Severity: Major
                                                                                                                                                                                    Found in resources/lib/qunitjs/qunit.js and 1 other location - About 1 hr to fix
                                                                                                                                                                                    resources/lib/qunitjs/qunit.js on lines 4857..4867

                                                                                                                                                                                    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) {
                                                                                                                                                                                                        successStrict = true;
                                                                                                                                                                                    Severity: Major
                                                                                                                                                                                    Found in resources/lib/qunitjs/qunit.js and 1 other location - About 1 hr to fix
                                                                                                                                                                                    resources/lib/qunitjs/qunit.js on lines 4946..4956

                                                                                                                                                                                    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 resources/lib/qunitjs/qunit.js and 1 other location - About 1 hr to fix
                                                                                                                                                                                    resources/lib/qunitjs/qunit.js on lines 4970..4975

                                                                                                                                                                                    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*/) {
                                                                                                                                                                                                            isNode ? setImmediate(step) : setTimeout(step);
                                                                                                                                                                                                            return;
                                                                                                                                                                                                          }
                                                                                                                                                                                    Severity: Major
                                                                                                                                                                                    Found in resources/lib/qunitjs/qunit.js and 2 other locations - About 1 hr to fix
                                                                                                                                                                                    resources/lib/qunitjs/qunit.js on lines 4538..4543
                                                                                                                                                                                    resources/lib/qunitjs/qunit.js on lines 4574..4579

                                                                                                                                                                                    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*/) {
                                                                                                                                                                                                            isNode ? setImmediate(step) : setTimeout(step);
                                                                                                                                                                                                            return;
                                                                                                                                                                                                          }
                                                                                                                                                                                    Severity: Major
                                                                                                                                                                                    Found in resources/lib/qunitjs/qunit.js and 2 other locations - About 1 hr to fix
                                                                                                                                                                                    resources/lib/qunitjs/qunit.js on lines 4574..4579
                                                                                                                                                                                    resources/lib/qunitjs/qunit.js on lines 4610..4615

                                                                                                                                                                                    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*/) {
                                                                                                                                                                                                            isNode ? setImmediate(step) : setTimeout(step);
                                                                                                                                                                                                            return;
                                                                                                                                                                                                          }
                                                                                                                                                                                    Severity: Major
                                                                                                                                                                                    Found in resources/lib/qunitjs/qunit.js and 2 other locations - About 1 hr to fix
                                                                                                                                                                                    resources/lib/qunitjs/qunit.js on lines 4538..4543
                                                                                                                                                                                    resources/lib/qunitjs/qunit.js on lines 4610..4615

                                                                                                                                                                                    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

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

                                                                                                                                                                                    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 resources/lib/qunitjs/qunit.js and 1 other location - About 1 hr to fix
                                                                                                                                                                                    resources/lib/qunitjs/qunit.js on lines 1527..1537

                                                                                                                                                                                    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

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

                                                                                                                                                                                    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 resources/lib/qunitjs/qunit.js and 1 other location - About 1 hr to fix
                                                                                                                                                                                    resources/lib/qunitjs/qunit.js on lines 3378..3388

                                                                                                                                                                                    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

                                                                                                                                                                                          var assertion = {
                                                                                                                                                                                            passed: details.result,
                                                                                                                                                                                            actual: details.actual,
                                                                                                                                                                                            expected: details.expected,
                                                                                                                                                                                            message: details.message,
                                                                                                                                                                                    Severity: Major
                                                                                                                                                                                    Found in resources/lib/qunitjs/qunit.js and 1 other location - About 1 hr to fix
                                                                                                                                                                                    resources/lib/vuex/vuex.global.js on lines 334..341

                                                                                                                                                                                    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 56.

                                                                                                                                                                                    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 resources/lib/qunitjs/qunit.js and 1 other location - About 55 mins to fix
                                                                                                                                                                                    resources/lib/qunitjs/qunit.js on lines 4462..4469

                                                                                                                                                                                    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 resources/lib/qunitjs/qunit.js and 1 other location - About 55 mins to fix
                                                                                                                                                                                    resources/lib/qunitjs/qunit.js on lines 4589..4596

                                                                                                                                                                                    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($.red("not ok ".concat(this.testCount, " ").concat(test.fullName.join(' > '))));
                                                                                                                                                                                    Severity: Major
                                                                                                                                                                                    Found in resources/lib/qunitjs/qunit.js and 2 other locations - About 50 mins to fix
                                                                                                                                                                                    resources/lib/qunitjs/qunit.js on lines 3948..3948
                                                                                                                                                                                    resources/lib/qunitjs/qunit.js on lines 3950..3950

                                                                                                                                                                                    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 resources/lib/qunitjs/qunit.js and 2 other locations - About 50 mins to fix
                                                                                                                                                                                    resources/lib/qunitjs/qunit.js on lines 3950..3950
                                                                                                                                                                                    resources/lib/qunitjs/qunit.js on lines 3955..3955

                                                                                                                                                                                    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($.cyan("not ok ".concat(this.testCount, " # TODO ").concat(test.fullName.join(' > '))));
                                                                                                                                                                                    Severity: Major
                                                                                                                                                                                    Found in resources/lib/qunitjs/qunit.js and 2 other locations - About 50 mins to fix
                                                                                                                                                                                    resources/lib/qunitjs/qunit.js on lines 3948..3948
                                                                                                                                                                                    resources/lib/qunitjs/qunit.js on lines 3955..3955

                                                                                                                                                                                    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 resources/lib/qunitjs/qunit.js and 2 other locations - About 50 mins to fix
                                                                                                                                                                                    resources/lib/qunitjs/qunit.js on lines 4393..4393
                                                                                                                                                                                    resources/lib/qunitjs/qunit.js on lines 4409..4409

                                                                                                                                                                                    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 resources/lib/qunitjs/qunit.js and 2 other locations - About 50 mins to fix
                                                                                                                                                                                    resources/lib/qunitjs/qunit.js on lines 4393..4393
                                                                                                                                                                                    resources/lib/qunitjs/qunit.js on lines 4522..4522

                                                                                                                                                                                    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 resources/lib/qunitjs/qunit.js and 2 other locations - About 50 mins to fix
                                                                                                                                                                                    resources/lib/qunitjs/qunit.js on lines 4409..4409
                                                                                                                                                                                    resources/lib/qunitjs/qunit.js on lines 4522..4522

                                                                                                                                                                                    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

                                                                                                                                                                                            return extend(this.start(), {
                                                                                                                                                                                              runtime: this.getRuntime(),
                                                                                                                                                                                              status: this.getStatus(),
                                                                                                                                                                                              errors: this.getFailedAssertions(),
                                                                                                                                                                                              assertions: this.getAssertions()
                                                                                                                                                                                    Severity: Minor
                                                                                                                                                                                    Found in resources/lib/qunitjs/qunit.js and 1 other location - About 45 mins to fix
                                                                                                                                                                                    resources/src/mediawiki.rcfilters/dm/FilterItem.js on lines 56..61

                                                                                                                                                                                    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 50.

                                                                                                                                                                                    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 commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
                                                                                                                                                                                    Severity: Minor
                                                                                                                                                                                    Found in resources/lib/qunitjs/qunit.js and 1 other location - About 45 mins to fix
                                                                                                                                                                                    resources/lib/vue/vue.global.js on lines 101..101

                                                                                                                                                                                    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 50.

                                                                                                                                                                                    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 resources/lib/qunitjs/qunit.js and 1 other location - About 40 mins to fix
                                                                                                                                                                                    resources/lib/qunitjs/qunit.js on lines 3115..3117

                                                                                                                                                                                    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 !== 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 resources/lib/qunitjs/qunit.js and 1 other location - About 40 mins to fix
                                                                                                                                                                                    resources/lib/qunitjs/qunit.js on lines 3112..3114

                                                                                                                                                                                    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

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

                                                                                                                                                                                    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: false,
                                                                                                                                                                                                message: 'The promise returned by the `assert.rejects` callback in ' + '"' + currentTest.testName + '" did not reject.',
                                                                                                                                                                                                actual: promise
                                                                                                                                                                                              });
                                                                                                                                                                                    Severity: Minor
                                                                                                                                                                                    Found in resources/lib/qunitjs/qunit.js and 1 other location - About 35 mins to fix
                                                                                                                                                                                    resources/lib/qunitjs/qunit.js on lines 1707..1711

                                                                                                                                                                                    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: false,
                                                                                                                                                                                                message: 'The value provided to `assert.rejects` in ' + '"' + currentTest.testName + '" was not a promise.',
                                                                                                                                                                                                actual: promise
                                                                                                                                                                                              });
                                                                                                                                                                                    Severity: Minor
                                                                                                                                                                                    Found in resources/lib/qunitjs/qunit.js and 1 other location - About 35 mins to fix
                                                                                                                                                                                    resources/lib/qunitjs/qunit.js on lines 1716..1720

                                                                                                                                                                                    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 resources/lib/qunitjs/qunit.js and 1 other location - About 35 mins to fix
                                                                                                                                                                                    resources/lib/qunitjs/qunit.js on lines 4856..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 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

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

                                                                                                                                                                                    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 resources/lib/qunitjs/qunit.js and 1 other location - About 35 mins to fix
                                                                                                                                                                                    resources/lib/qunitjs/qunit.js on lines 6479..6484

                                                                                                                                                                                    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

                                                                                                                                                                                    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!*/],
                                                                                                                                                                                                  _nextBeginningIndexes: null,
                                                                                                                                                                                                  score: null,
                                                                                                                                                                                    Severity: Minor
                                                                                                                                                                                    Found in resources/lib/qunitjs/qunit.js and 1 other location - About 35 mins to fix
                                                                                                                                                                                    resources/lib/qunitjs/qunit.js on lines 4718..4725

                                                                                                                                                                                    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 resources/lib/qunitjs/qunit.js and 1 other location - About 35 mins to fix
                                                                                                                                                                                    resources/lib/qunitjs/qunit.js on lines 4980..4982

                                                                                                                                                                                    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 resources/lib/qunitjs/qunit.js and 1 other location - About 35 mins to fix
                                                                                                                                                                                    resources/lib/qunitjs/qunit.js on lines 4897..4899

                                                                                                                                                                                    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!*/],
                                                                                                                                                                                                  _nextBeginningIndexes: null,
                                                                                                                                                                                                  score: null,
                                                                                                                                                                                    Severity: Minor
                                                                                                                                                                                    Found in resources/lib/qunitjs/qunit.js and 1 other location - About 35 mins to fix
                                                                                                                                                                                    resources/lib/qunitjs/qunit.js on lines 4737..4744

                                                                                                                                                                                    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 resources/lib/qunitjs/qunit.js and 1 other location - About 35 mins to fix
                                                                                                                                                                                    resources/lib/qunitjs/qunit.js on lines 1729..1735

                                                                                                                                                                                    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,
                                                                                                                                                                                                // leave rejection value of undefined as-is
                                                                                                                                                                                                actual: actual && errorString(actual),
                                                                                                                                                                                                expected: expected,
                                                                                                                                                                                    Severity: Minor
                                                                                                                                                                                    Found in resources/lib/qunitjs/qunit.js and 1 other location - About 35 mins to fix
                                                                                                                                                                                    resources/lib/qunitjs/qunit.js on lines 1689..1695

                                                                                                                                                                                    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

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

                                                                                                                                                                                    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 resources/lib/qunitjs/qunit.js and 1 other location - About 30 mins to fix
                                                                                                                                                                                    resources/lib/qunitjs/qunit.js on lines 3517..3517

                                                                                                                                                                                    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 resources/lib/qunitjs/qunit.js and 1 other location - About 30 mins to fix
                                                                                                                                                                                    resources/lib/qunitjs/qunit.js on lines 4500..4502

                                                                                                                                                                                    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 resources/lib/qunitjs/qunit.js and 1 other location - About 30 mins to fix
                                                                                                                                                                                    resources/lib/qunitjs/qunit.js on lines 4633..4635

                                                                                                                                                                                    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

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

                                                                                                                                                                                            Object.keys(object).forEach(function (key) {
                                                                                                                                                                                              clone[key] = decycledShallowClone(object[key], ancestors);
                                                                                                                                                                                            });
                                                                                                                                                                                    Severity: Minor
                                                                                                                                                                                    Found in resources/lib/qunitjs/qunit.js and 1 other location - About 30 mins to fix
                                                                                                                                                                                    resources/lib/vuex/vuex.global.js on lines 89..91

                                                                                                                                                                                    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