kuasha/cosmos

View on GitHub
samples/adminpanel/app/bower_components/ace-builds/src/worker-json.js

Summary

Maintainability
F
4 mos
Test Coverage

File worker-json.js has 2010 lines of code (exceeds 250 allowed). Consider refactoring.
Open

"no use strict";
;(function(window) {
if (typeof window.window != "undefined" && window.document) {
    return;
}
Severity: Major
Found in samples/adminpanel/app/bower_components/ace-builds/src/worker-json.js - About 5 days to fix

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

        this.onChange = function(e) {
            var delta = e.data;
            var range = delta.range;
    
            if (range.start.row == range.end.row && range.start.row != this.row)
    Severity: Major
    Found in samples/adminpanel/app/bower_components/ace-builds/src/worker-json.js - About 2 hrs to fix

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

              Array.prototype.splice = function(pos, removeCount){
                  var length = this.length;
                  if (pos > 0) {
                      if (pos > length)
                          pos = length;

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

        window.define = function(id, deps, factory) {
            if (arguments.length == 2) {
                factory = deps;
                if (typeof id != "string") {
                    deps = id;

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

                  number = function () {
          
                      var number,
                          string = '';
          
          

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

                    string = function () {
            
                        var hex,
                            i,
                            string = '',

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

                  Array.prototype.reduce = function reduce(fun /*, initial*/) {
                      var object = toObject(this),
                          self = splitString && _toString(this) == "[object String]" ?
                              this.split("") :
                              object,

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

                    Object.defineProperty = function defineProperty(object, property, descriptor) {
                        if ((typeof object != "object" && typeof object != "function") || object === null)
                            throw new TypeError(ERR_NON_OBJECT_TARGET + object);
                        if ((typeof descriptor != "object" && typeof descriptor != "function") || descriptor === null)
                            throw new TypeError(ERR_NON_OBJECT_DESCRIPTOR + descriptor);

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

                      Array.prototype.reduceRight = function reduceRight(fun /*, initial*/) {
                          var object = toObject(this),
                              self = splitString && _toString(this) == "[object String]" ?
                                  this.split("") :
                                  object,

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

                        Function.prototype.bind = function bind(that) { // .length is 1
                            var target = this;
                            if (typeof target != "function") {
                                throw new TypeError("Function.prototype.bind called on incompatible " + target);
                            }

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

                              object = function () {
                      
                                  var key,
                                      object = {};
                      
                      

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

                        exports.delayedCall = function(fcn, defaultTimeout) {
                            var timer = null;
                            var callback = function() {
                                timer = null;
                                fcn();

                          Avoid deeply nested control flow statements.
                          Open

                                      } else if (start.row !== end.row && start.row < row) {
                                          if (end.row === row)
                                              column = Math.max(0, column - end.column) + start.column;
                                          row -= (end.row - start.row);
                                      } else if (end.row === row) {
                          Severity: Major
                          Found in samples/adminpanel/app/bower_components/ace-builds/src/worker-json.js - About 45 mins to fix

                            Avoid deeply nested control flow statements.
                            Open

                                                    } else if (typeof escapee[ch] === 'string') {
                                                        string += escapee[ch];
                                                    } else {
                                                        break;
                                                    }
                            Severity: Major
                            Found in samples/adminpanel/app/bower_components/ace-builds/src/worker-json.js - About 45 mins to fix

                              Avoid deeply nested control flow statements.
                              Open

                                                  for (i = 0; i < add; ++i) {
                                                      this[pos+i] = insert[i];
                                                  }
                              Severity: Major
                              Found in samples/adminpanel/app/bower_components/ace-builds/src/worker-json.js - About 45 mins to fix

                                Avoid deeply nested control flow statements.
                                Open

                                            if (start.row <= row) {
                                                if (end.row <= row)
                                                    row -= end.row - start.row;
                                                else {
                                                    row = start.row;
                                Severity: Major
                                Found in samples/adminpanel/app/bower_components/ace-builds/src/worker-json.js - About 45 mins to fix

                                  Avoid deeply nested control flow statements.
                                  Open

                                                  if (end.column >= column)
                                                      column = start.column;
                                                  else
                                                      column = Math.max(0, column - (end.column - start.column));
                                  Severity: Major
                                  Found in samples/adminpanel/app/bower_components/ace-builds/src/worker-json.js - About 45 mins to fix

                                    Avoid deeply nested control flow statements.
                                    Open

                                                    } else if (tailNewPos > tailOldPos) { // case B
                                                        for (i = tailCount; i--; ) {
                                                            this[tailNewPos+i] = this[tailOldPos+i];
                                                        }
                                                    } // else, add == remove (nothing to do)
                                    Severity: Major
                                    Found in samples/adminpanel/app/bower_components/ace-builds/src/worker-json.js - About 45 mins to fix

                                      Avoid deeply nested control flow statements.
                                      Open

                                                          for (var i = 0; i < tailCount; ++i) {
                                                              this[tailNewPos+i] = this[tailOldPos+i];
                                                          }
                                      Severity: Major
                                      Found in samples/adminpanel/app/bower_components/ace-builds/src/worker-json.js - About 45 mins to fix

                                        Avoid deeply nested control flow statements.
                                        Open

                                                                    for (i = 0; i < 4; i += 1) {
                                                                        hex = parseInt(next(), 16);
                                                                        if (!isFinite(hex)) {
                                                                            break;
                                                                        }
                                        Severity: Major
                                        Found in samples/adminpanel/app/bower_components/ace-builds/src/worker-json.js - About 45 mins to fix

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

                                          window.onerror = function(message, file, line, col, err) {
                                          Severity: Minor
                                          Found in samples/adminpanel/app/bower_components/ace-builds/src/worker-json.js - About 35 mins to fix

                                            Avoid too many return statements within this function.
                                            Open

                                                    return 0;
                                            Severity: Major
                                            Found in samples/adminpanel/app/bower_components/ace-builds/src/worker-json.js - About 30 mins to fix

                                              Avoid too many return statements within this function.
                                              Open

                                                          return column <= this.end.column ? 0 : 1;
                                              Severity: Major
                                              Found in samples/adminpanel/app/bower_components/ace-builds/src/worker-json.js - About 30 mins to fix

                                                Avoid too many return statements within this function.
                                                Open

                                                                return 0;
                                                Severity: Major
                                                Found in samples/adminpanel/app/bower_components/ace-builds/src/worker-json.js - About 30 mins to fix

                                                  Avoid too many return statements within this function.
                                                  Open

                                                                  return 42;
                                                  Severity: Major
                                                  Found in samples/adminpanel/app/bower_components/ace-builds/src/worker-json.js - About 30 mins to fix

                                                    Avoid too many return statements within this function.
                                                    Open

                                                                    return -1;
                                                    Severity: Major
                                                    Found in samples/adminpanel/app/bower_components/ace-builds/src/worker-json.js - About 30 mins to fix

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

                                                      define("ace/lib/es5-shim",["require","exports","module"], function(require, exports, module) {
                                                      
                                                      function Empty() {}
                                                      
                                                      if (!Function.prototype.bind) {
                                                      samples/adminpanel/app/bower_components/ace-builds/src/worker-coffee.js on lines 6894..7589
                                                      samples/adminpanel/app/bower_components/ace-builds/src/worker-css.js on lines 7692..8387
                                                      samples/adminpanel/app/bower_components/ace-builds/src/worker-html.js on lines 10822..11517
                                                      samples/adminpanel/app/bower_components/ace-builds/src/worker-javascript.js on lines 9724..10419
                                                      samples/adminpanel/app/bower_components/ace-builds/src/worker-lua.js on lines 2849..3544
                                                      samples/adminpanel/app/bower_components/ace-builds/src/worker-php.js on lines 6242..6937

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

                                                      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 7 locations. Consider refactoring.
                                                      Open

                                                      define("ace/document",["require","exports","module","ace/lib/oop","ace/lib/event_emitter","ace/range","ace/anchor"], function(require, exports, module) {
                                                      "use strict";
                                                      
                                                      var oop = require("./lib/oop");
                                                      var EventEmitter = require("./lib/event_emitter").EventEmitter;
                                                      samples/adminpanel/app/bower_components/ace-builds/src/worker-coffee.js on lines 726..1083
                                                      samples/adminpanel/app/bower_components/ace-builds/src/worker-css.js on lines 913..1270
                                                      samples/adminpanel/app/bower_components/ace-builds/src/worker-html.js on lines 913..1270
                                                      samples/adminpanel/app/bower_components/ace-builds/src/worker-javascript.js on lines 726..1083
                                                      samples/adminpanel/app/bower_components/ace-builds/src/worker-lua.js on lines 726..1083
                                                      samples/adminpanel/app/bower_components/ace-builds/src/worker-php.js on lines 726..1083

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

                                                      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 7 locations. Consider refactoring.
                                                      Open

                                                      define("ace/range",["require","exports","module"], function(require, exports, module) {
                                                      "use strict";
                                                      var comparePoints = function(p1, p2) {
                                                          return p1.row - p2.row || p1.column - p2.column;
                                                      };
                                                      samples/adminpanel/app/bower_components/ace-builds/src/worker-coffee.js on lines 338..575
                                                      samples/adminpanel/app/bower_components/ace-builds/src/worker-css.js on lines 525..762
                                                      samples/adminpanel/app/bower_components/ace-builds/src/worker-html.js on lines 525..762
                                                      samples/adminpanel/app/bower_components/ace-builds/src/worker-javascript.js on lines 338..575
                                                      samples/adminpanel/app/bower_components/ace-builds/src/worker-lua.js on lines 338..575
                                                      samples/adminpanel/app/bower_components/ace-builds/src/worker-php.js on lines 338..575

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

                                                      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 14 locations. Consider refactoring.
                                                      Open

                                                      ;(function(window) {
                                                      if (typeof window.window != "undefined" && window.document) {
                                                          return;
                                                      }
                                                      
                                                      
                                                      samples/adminpanel/app/bower_components/ace-builds/src-noconflict/worker-coffee.js on lines 2..182
                                                      samples/adminpanel/app/bower_components/ace-builds/src-noconflict/worker-css.js on lines 2..182
                                                      samples/adminpanel/app/bower_components/ace-builds/src-noconflict/worker-html.js on lines 2..182
                                                      samples/adminpanel/app/bower_components/ace-builds/src-noconflict/worker-javascript.js on lines 2..182
                                                      samples/adminpanel/app/bower_components/ace-builds/src-noconflict/worker-json.js on lines 2..182
                                                      samples/adminpanel/app/bower_components/ace-builds/src-noconflict/worker-lua.js on lines 2..182
                                                      samples/adminpanel/app/bower_components/ace-builds/src-noconflict/worker-php.js on lines 2..182
                                                      samples/adminpanel/app/bower_components/ace-builds/src/worker-coffee.js on lines 2..182
                                                      samples/adminpanel/app/bower_components/ace-builds/src/worker-css.js on lines 2..182
                                                      samples/adminpanel/app/bower_components/ace-builds/src/worker-html.js on lines 2..182
                                                      samples/adminpanel/app/bower_components/ace-builds/src/worker-javascript.js on lines 2..182
                                                      samples/adminpanel/app/bower_components/ace-builds/src/worker-lua.js on lines 2..182
                                                      samples/adminpanel/app/bower_components/ace-builds/src/worker-php.js on lines 2..182

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

                                                      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 7 locations. Consider refactoring.
                                                      Open

                                                      define("ace/anchor",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"], function(require, exports, module) {
                                                      "use strict";
                                                      
                                                      var oop = require("./lib/oop");
                                                      var EventEmitter = require("./lib/event_emitter").EventEmitter;
                                                      samples/adminpanel/app/bower_components/ace-builds/src/worker-coffee.js on lines 577..724
                                                      samples/adminpanel/app/bower_components/ace-builds/src/worker-css.js on lines 764..911
                                                      samples/adminpanel/app/bower_components/ace-builds/src/worker-html.js on lines 764..911
                                                      samples/adminpanel/app/bower_components/ace-builds/src/worker-javascript.js on lines 577..724
                                                      samples/adminpanel/app/bower_components/ace-builds/src/worker-lua.js on lines 577..724
                                                      samples/adminpanel/app/bower_components/ace-builds/src/worker-php.js on lines 577..724

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

                                                      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

                                                      define("ace/mode/json/json_parse",["require","exports","module"], function(require, exports, module) {
                                                      "use strict";
                                                      
                                                          var at,     // The index of the current character
                                                              ch,     // The current character
                                                      samples/adminpanel/app/bower_components/ace-builds/src-noconflict/worker-json.js on lines 1321..1573

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

                                                      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 7 locations. Consider refactoring.
                                                      Open

                                                      define("ace/lib/lang",["require","exports","module"], function(require, exports, module) {
                                                      "use strict";
                                                      
                                                      exports.last = function(a) {
                                                          return a[a.length - 1];
                                                      samples/adminpanel/app/bower_components/ace-builds/src/worker-coffee.js on lines 1085..1270
                                                      samples/adminpanel/app/bower_components/ace-builds/src/worker-css.js on lines 212..397
                                                      samples/adminpanel/app/bower_components/ace-builds/src/worker-html.js on lines 212..397
                                                      samples/adminpanel/app/bower_components/ace-builds/src/worker-javascript.js on lines 1085..1270
                                                      samples/adminpanel/app/bower_components/ace-builds/src/worker-lua.js on lines 1085..1270
                                                      samples/adminpanel/app/bower_components/ace-builds/src/worker-php.js on lines 1085..1270

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

                                                      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 7 locations. Consider refactoring.
                                                      Open

                                                      define("ace/lib/event_emitter",["require","exports","module"], function(require, exports, module) {
                                                      "use strict";
                                                      
                                                      var EventEmitter = {};
                                                      var stopPropagation = function() { this.propagationStopped = true; };
                                                      samples/adminpanel/app/bower_components/ace-builds/src/worker-coffee.js on lines 212..336
                                                      samples/adminpanel/app/bower_components/ace-builds/src/worker-css.js on lines 399..523
                                                      samples/adminpanel/app/bower_components/ace-builds/src/worker-html.js on lines 399..523
                                                      samples/adminpanel/app/bower_components/ace-builds/src/worker-javascript.js on lines 212..336
                                                      samples/adminpanel/app/bower_components/ace-builds/src/worker-lua.js on lines 212..336
                                                      samples/adminpanel/app/bower_components/ace-builds/src/worker-php.js on lines 212..336

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

                                                      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 7 locations. Consider refactoring.
                                                      Open

                                                      define("ace/worker/mirror",["require","exports","module","ace/document","ace/lib/lang"], function(require, exports, module) {
                                                      "use strict";
                                                      
                                                      var Document = require("../document").Document;
                                                      var lang = require("../lib/lang");
                                                      samples/adminpanel/app/bower_components/ace-builds/src/worker-coffee.js on lines 1272..1319
                                                      samples/adminpanel/app/bower_components/ace-builds/src/worker-css.js on lines 1272..1319
                                                      samples/adminpanel/app/bower_components/ace-builds/src/worker-html.js on lines 1272..1319
                                                      samples/adminpanel/app/bower_components/ace-builds/src/worker-javascript.js on lines 1272..1319
                                                      samples/adminpanel/app/bower_components/ace-builds/src/worker-lua.js on lines 1272..1319
                                                      samples/adminpanel/app/bower_components/ace-builds/src/worker-php.js on lines 1272..1319

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

                                                      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

                                                      define("ace/mode/json_worker",["require","exports","module","ace/lib/oop","ace/worker/mirror","ace/mode/json/json_parse"], function(require, exports, module) {
                                                      "use strict";
                                                      
                                                      var oop = require("../lib/oop");
                                                      var Mirror = require("../worker/mirror").Mirror;
                                                      samples/adminpanel/app/bower_components/ace-builds/src-noconflict/worker-json.js on lines 1575..1611

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

                                                      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 7 locations. Consider refactoring.
                                                      Open

                                                      define("ace/lib/oop",["require","exports","module"], function(require, exports, module) {
                                                      "use strict";
                                                      
                                                      exports.inherits = function(ctor, superCtor) {
                                                          ctor.super_ = superCtor;
                                                      samples/adminpanel/app/bower_components/ace-builds/src/worker-coffee.js on lines 184..210
                                                      samples/adminpanel/app/bower_components/ace-builds/src/worker-css.js on lines 184..210
                                                      samples/adminpanel/app/bower_components/ace-builds/src/worker-html.js on lines 184..210
                                                      samples/adminpanel/app/bower_components/ace-builds/src/worker-javascript.js on lines 184..210
                                                      samples/adminpanel/app/bower_components/ace-builds/src/worker-lua.js on lines 184..210
                                                      samples/adminpanel/app/bower_components/ace-builds/src/worker-php.js on lines 184..210

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

                                                      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