kuasha/cosmos

View on GitHub
samples/adminpanel/app/bower_components/ace-builds/src/mode-jsoniq.js

Summary

Maintainability
F
1 yr
Test Coverage

File mode-jsoniq.js has 4322 lines of code (exceeds 250 allowed). Consider refactoring.
Open

define("ace/mode/xquery/jsoniq_lexer",["require","exports","module"], function(require, exports, module) {
module.exports = (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);throw new Error("Cannot find module '"+o+"'")}var f=n[o]={exports:{}};t[o][0].call(f.exports,function(e){var n=t[o][1][e];return s(n?n:e)},f,f.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({
1:[function(_dereq_,module,exports){


                                                            var JSONiqTokenizer = exports.JSONiqTokenizer = function JSONiqTokenizer(string, parsingEventHandler)
                                                            {

    Function 1 has 1771 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    1:[function(_dereq_,module,exports){
    
    
                                                                var JSONiqTokenizer = exports.JSONiqTokenizer = function JSONiqTokenizer(string, parsingEventHandler)
                                                                {
                                                                  init(string, parsingEventHandler);
    
      var self = this;

      Function JSONiqTokenizer has 1447 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

                                                                  var JSONiqTokenizer = exports.JSONiqTokenizer = function JSONiqTokenizer(string, parsingEventHandler)
                                                                  {
                                                                    init(string, parsingEventHandler);
      
        var self = this;
      

        Function parse_NCName has 391 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

          function parse_NCName()
          {
            eventHandler.startNonterminal("NCName", e0);
            switch (l1)
            {
        Severity: Major
        Found in samples/adminpanel/app/bower_components/ace-builds/src/mode-jsoniq.js - About 1 day to fix

          Function parse_FunctionName has 343 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

            function parse_FunctionName()
            {
              eventHandler.startNonterminal("FunctionName", e0);
              switch (l1)
              {
          Severity: Major
          Found in samples/adminpanel/app/bower_components/ace-builds/src/mode-jsoniq.js - About 1 day to fix

            Function CstyleBehaviour has 238 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            var CstyleBehaviour = function() {
                this.add("braces", "insertion", function(state, action, editor, session, text) {
                    var cursor = editor.getCursorPosition();
                    var line = session.doc.getLine(cursor.row);
                    if (text == '{') {
            Severity: Major
            Found in samples/adminpanel/app/bower_components/ace-builds/src/mode-jsoniq.js - About 1 day to fix

              Function 2 has 210 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              2:[function(_dereq_,module,exports){
              'use strict';
              
              var JSONiqTokenizer = _dereq_('./JSONiqTokenizer').JSONiqTokenizer;
              
              
              Severity: Major
              Found in samples/adminpanel/app/bower_components/ace-builds/src/mode-jsoniq.js - About 1 day to fix

                Function AcePopup has 201 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                var AcePopup = function(parentNode) {
                    var el = dom.createElement("div");
                    var popup = new $singleLineEditor(el);
                
                    if (parentNode)
                Severity: Major
                Found in samples/adminpanel/app/bower_components/ace-builds/src/mode-jsoniq.js - About 1 day to fix

                  Function parse_start has 110 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                    this.parse_start = function()
                    {
                      eventHandler.startNonterminal("start", e0);
                      lookahead1W(14);                // ModuleDecl | Annotation | OptionDecl | Operator | Variable | Tag | AttrTest |
                  
                  
                  
                  
                  
                  
                  
                  
                  
                  
                  
                  
                  
                  
                  
                  
                  
                  
                  
                  
                  
                  
                  
                  
                      switch (l1)
                  Severity: Major
                  Found in samples/adminpanel/app/bower_components/ace-builds/src/mode-jsoniq.js - About 4 hrs to fix

                    Function XmlBehaviour has 99 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                    var XmlBehaviour = function () {
                    
                        this.add("string_dquotes", "insertion", function (state, action, editor, session, text) {
                            if (text == '"' || text == "'") {
                                var quote = text;
                    Severity: Major
                    Found in samples/adminpanel/app/bower_components/ace-builds/src/mode-jsoniq.js - About 3 hrs to fix

                      Function insertSnippetForSelection has 97 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          this.insertSnippetForSelection = function(editor, snippetText) {
                              var cursor = editor.getCursorPosition();
                              var line = editor.session.getLine(cursor.row);
                              var tabString = editor.session.getTabString();
                              var indentString = line.match(/^\s*/)[0];
                      Severity: Major
                      Found in samples/adminpanel/app/bower_components/ace-builds/src/mode-jsoniq.js - About 3 hrs to fix

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

                            this.getTokenizer = function() {
                                function TabstopToken(str, _, stack) {
                                    str = str.substr(1);
                                    if (/^\d+$/.test(str) && !stack.inFormatString)
                                        return [{tabstopId: parseInt(str, 10)}];
                        Severity: Major
                        Found in samples/adminpanel/app/bower_components/ace-builds/src/mode-jsoniq.js - About 3 hrs to fix

                          Function match has 72 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                            function match(tokenSetId)
                            {
                              var nonbmp = false;
                              begin = end;
                              var current = end;
                          Severity: Major
                          Found in samples/adminpanel/app/bower_components/ace-builds/src/mode-jsoniq.js - About 2 hrs to fix

                            Function JSONiqLexer has 59 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                            exports.JSONiqLexer = function() {
                              
                                this.tokens = [];
                              
                                this.getLineTokens = function(line, state) {
                            Severity: Major
                            Found in samples/adminpanel/app/bower_components/ace-builds/src/mode-jsoniq.js - About 2 hrs to fix

                              Function getLineTokens has 56 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                  this.getLineTokens = function(line, state) {
                                      state = (state === 'start' || !state) ? '["start"]' : state;
                                      var stack = JSON.parse(state);
                                      var h = new TokenHandler(line);
                                      var tokenizer = new JSONiqTokenizer(line, h);
                              Severity: Major
                              Found in samples/adminpanel/app/bower_components/ace-builds/src/mode-jsoniq.js - About 2 hrs to fix

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

                                  function parse_EQName()
                                  {
                                    eventHandler.startNonterminal("EQName", e0);
                                    switch (l1)
                                    {
                                Severity: Major
                                Found in samples/adminpanel/app/bower_components/ace-builds/src/mode-jsoniq.js - About 2 hrs to fix

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

                                      this.register = function(snippets, scope) {
                                          var snippetMap = this.snippetMap;
                                          var snippetNameMap = this.snippetNameMap;
                                          var self = this;
                                          function wrapRegexp(src) {
                                  Severity: Major
                                  Found in samples/adminpanel/app/bower_components/ace-builds/src/mode-jsoniq.js - About 2 hrs to fix

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

                                        this.addTabstops = function(tabstops, start, end) {
                                            if (!this.$openTabstops)
                                                this.$openTabstops = [];
                                            if (!tabstops[0]) {
                                                var p = Range.fromPoints(end, end);

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

                                          this.onChange = function(e) {
                                              var changeRange = e.data.range;
                                              var isRemove = e.data.action[0] == "r";
                                              var start = changeRange.start;
                                              var end = changeRange.end;

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

                                            this.resolveVariables = function(snippet, editor) {
                                                var result = [];
                                                for (var i = 0; i < snippet.length; i++) {
                                                    var ch = snippet[i];
                                                    if (typeof ch == "string") {

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

                                            this.parse_TagContent = function()
                                            {
                                              eventHandler.startNonterminal("TagContent", e0);
                                              lookahead1(11);                 // Tag | EndTag | PredefinedEntityRef | ElementContentChar | CharRef | EOF |
                                          
                                              switch (l1)

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

                                                this.updateCompletions = function(keepPopupPosition) {
                                                    if (keepPopupPosition && this.base && this.completions) {
                                                        var pos = this.editor.getCursorPosition();
                                                        var prefix = this.editor.session.getTextRange({start: this.base, end: pos});
                                                        if (prefix == this.completions.filterText)

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

                                                  this.$getDefaultValue = function(editor, name) {
                                                      if (/^[A-Z]\d+$/.test(name)) {
                                                          var i = name.substr(1);
                                                          return (this.variables[name[0] + "__"] || {})[i];
                                                      }

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

                                                    this.tmStrFormat = function(str, ch, editor) {
                                                        var flag = ch.flag || "";
                                                        var re = ch.guard;
                                                        re = new RegExp(re, flag.replace(/[^gi]/, ""));
                                                        var fmtTokens = this.tokenizeTmSnippet(ch.fmt, "formatString");

                                                  Consider simplifying this complex logical expression.
                                                  Open

                                                              if (!token || !hasType(token, 'meta.tag') && !(hasType(token, 'text') && token.value.match('/'))){
                                                                  do {
                                                                      token = iterator.stepBackward();
                                                                  } while (token && (hasType(token, 'string') || hasType(token, 'keyword.operator') || hasType(token, 'entity.attribute-name') || hasType(token, 'text')));
                                                              } else {
                                                  Severity: Critical
                                                  Found in samples/adminpanel/app/bower_components/ace-builds/src/mode-jsoniq.js - About 1 hr to fix

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

                                                      this.parse_AposAttr = function()
                                                      {
                                                        eventHandler.startNonterminal("AposAttr", e0);
                                                        lookahead1(10);                 // PredefinedEntityRef | EscapeApos | AposAttrContentChar | CharRef | EOF | "'" |
                                                    
                                                        switch (l1)

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

                                                        this.parse_QuotAttr = function()
                                                        {
                                                          eventHandler.startNonterminal("QuotAttr", e0);
                                                          lookahead1(9);                  // PredefinedEntityRef | EscapeQuot | QuotAttrContentChar | CharRef | EOF | '"' |
                                                      
                                                          switch (l1)

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

                                                            this.addMarkers = function(annos, mySession) {
                                                                var _self = this;
                                                                
                                                                if (!mySession.markerAnchors) mySession.markerAnchors = [];
                                                                this.removeMarkers(mySession);

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

                                                            var XQueryBehaviour = function () {
                                                                
                                                                this.inherit(CstyleBehaviour, ["braces", "parens", "string_dquotes"]); // Get string behaviour
                                                                this.inherit(XmlBehaviour); // Get xml behaviour
                                                                

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

                                                                this.parseSnippetFile = function(str) {
                                                                    str = str.replace(/\r/g, "");
                                                                    var list = [], snippet = {};
                                                                    var re = /^#.*|^({[\s\S]*})\s*$|^(\S+) (.*)$|^((?:\n*\t.*)+)/gm;
                                                                    var m;

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

                                                                  this.filterCompletions = function(items, needle) {
                                                                      var results = [];
                                                                      var upper = needle.toUpperCase();
                                                                      var lower = needle.toLowerCase();
                                                                      loop: for (var i = 0, item; item = items[i]; i++) {

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

                                                                    this.getSectionRange = function(session, row) {
                                                                        var line = session.getLine(row);
                                                                        var startIndent = line.search(/\S/);
                                                                        var startRow = row;
                                                                        var startColumn = line.length;

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

                                                                    this.parse_StartTag = function()
                                                                    {
                                                                      eventHandler.startNonterminal("StartTag", e0);
                                                                      lookahead1W(8);                 // QName | S^WS | EOF | '"' | "'" | '/>' | '=' | '>'
                                                                      switch (l1)

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

                                                                            var formatted = str.replace(re, function() {
                                                                                _self.variables.__ = arguments;
                                                                                var fmtParts = _self.resolveVariables(fmtTokens, editor);
                                                                                var gChangeCase = "E";
                                                                                for (var i  = 0; i < fmtParts.length; i++) {

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

                                                                          bgTokenizer.$tokenizeRow = function(i) {
                                                                              var data = popup.data[i];
                                                                              var tokens = [];
                                                                              if (!data)
                                                                                  return tokens;

                                                                        Avoid deeply nested control flow statements.
                                                                        Open

                                                                                    } else if (closing) {
                                                                                        var next_indent = this.$getIndent(line);
                                                                                    } else {
                                                                                        CstyleBehaviour.clearMaybeInsertedClosing();
                                                                                        return;
                                                                        Severity: Major
                                                                        Found in samples/adminpanel/app/bower_components/ace-builds/src/mode-jsoniq.js - About 45 mins to fix

                                                                          Avoid deeply nested control flow statements.
                                                                          Open

                                                                                              if (rightChar == quote) {
                                                                                                  return {
                                                                                                      text: '',
                                                                                                      selection: [1, 1]
                                                                                                  };
                                                                          Severity: Major
                                                                          Found in samples/adminpanel/app/bower_components/ace-builds/src/mode-jsoniq.js - About 45 mins to fix

                                                                            Avoid deeply nested control flow statements.
                                                                            Open

                                                                                            if (!openBracePos)
                                                                                                 return null;
                                                                            Severity: Major
                                                                            Found in samples/adminpanel/app/bower_components/ace-builds/src/mode-jsoniq.js - About 45 mins to fix

                                                                              Avoid deeply nested control flow statements.
                                                                              Open

                                                                                                          if (ch.changeCase == "u")
                                                                                                              fmtParts[i] = next[0].toUpperCase();
                                                                                                          else
                                                                                                              fmtParts[i] = next[0].toLowerCase();
                                                                              Severity: Major
                                                                              Found in samples/adminpanel/app/bower_components/ace-builds/src/mode-jsoniq.js - About 45 mins to fix

                                                                                Consider simplifying this complex logical expression.
                                                                                Open

                                                                                            if (!token || !(is(token, "tag-name") || is(token, "tag-whitespace") || is(token, "attribute-name") || is(token, "attribute-equals") || is(token, "attribute-value")))
                                                                                                return;
                                                                                Severity: Major
                                                                                Found in samples/adminpanel/app/bower_components/ace-builds/src/mode-jsoniq.js - About 40 mins to fix

                                                                                  Consider simplifying this complex logical expression.
                                                                                  Open

                                                                                                  if (!token || (quotepos < 0 && token.type !== "comment" && (token.type !== "string" || ((selection.start.column !== token.value.length+col-1) && token.value.lastIndexOf(quote) === token.value.length-1)))) {
                                                                                                      if (!CstyleBehaviour.isSaneInsertion(editor, session))
                                                                                                          return;
                                                                                                      return {
                                                                                                          text: quote + quote,
                                                                                  Severity: Major
                                                                                  Found in samples/adminpanel/app/bower_components/ace-builds/src/mode-jsoniq.js - About 40 mins to fix

                                                                                    Consider simplifying this complex logical expression.
                                                                                    Open

                                                                                                if (is(token, "attribute-equals") && (rightSpace || rightChar == '>') || (is(token, "decl-attribute-equals") && (rightSpace || rightChar == '?'))) {
                                                                                                    return {
                                                                                                        text: quote + quote,
                                                                                                        selection: [1, 1]
                                                                                                    };
                                                                                    Severity: Major
                                                                                    Found in samples/adminpanel/app/bower_components/ace-builds/src/mode-jsoniq.js - About 40 mins to fix

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

                                                                                          getCompletions: function(editor, session, pos, prefix, callback) {
                                                                                      Severity: Minor
                                                                                      Found in samples/adminpanel/app/bower_components/ace-builds/src/mode-jsoniq.js - About 35 mins to fix

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

                                                                                            exports.getCompletions = function(editor, session, pos, prefix, callback) {
                                                                                        Severity: Minor
                                                                                        Found in samples/adminpanel/app/bower_components/ace-builds/src/mode-jsoniq.js - About 35 mins to fix

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

                                                                                                  getCompletions: function(editor, session, pos, prefix, callback) {
                                                                                          Severity: Minor
                                                                                          Found in samples/adminpanel/app/bower_components/ace-builds/src/mode-jsoniq.js - About 35 mins to fix

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

                                                                                                getCompletions: function(editor, session, pos, prefix, callback) {
                                                                                            Severity: Minor
                                                                                            Found in samples/adminpanel/app/bower_components/ace-builds/src/mode-jsoniq.js - About 35 mins to fix

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

                                                                                                this.ParseException = function(b, e, s, o, x)
                                                                                              Severity: Minor
                                                                                              Found in samples/adminpanel/app/bower_components/ace-builds/src/mode-jsoniq.js - About 35 mins to fix

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

                                                                                                  function error(b, e, s, l, t)
                                                                                                Severity: Minor
                                                                                                Found in samples/adminpanel/app/bower_components/ace-builds/src/mode-jsoniq.js - About 35 mins to fix

                                                                                                  Avoid too many return statements within this function.
                                                                                                  Open

                                                                                                                       return null;
                                                                                                  Severity: Major
                                                                                                  Found in samples/adminpanel/app/bower_components/ace-builds/src/mode-jsoniq.js - About 30 mins to fix

                                                                                                    Avoid too many return statements within this function.
                                                                                                    Open

                                                                                                                return session.getCommentFoldRange(row, i, -1);
                                                                                                    Severity: Major
                                                                                                    Found in samples/adminpanel/app/bower_components/ace-builds/src/mode-jsoniq.js - About 30 mins to fix

                                                                                                      Avoid too many return statements within this function.
                                                                                                      Open

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

                                                                                                        Avoid too many return statements within this function.
                                                                                                        Open

                                                                                                                                return {
                                                                                                                                    text: '',
                                                                                                                                    selection: [1, 1]
                                                                                                                                };
                                                                                                        Severity: Major
                                                                                                        Found in samples/adminpanel/app/bower_components/ace-builds/src/mode-jsoniq.js - About 30 mins to fix

                                                                                                          Avoid too many return statements within this function.
                                                                                                          Open

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

                                                                                                            Avoid too many return statements within this function.
                                                                                                            Open

                                                                                                                        return {
                                                                                                                           text: '>' + '</' + element + '>',
                                                                                                                           selection: [1, 1]
                                                                                                                        };
                                                                                                            Severity: Major
                                                                                                            Found in samples/adminpanel/app/bower_components/ace-builds/src/mode-jsoniq.js - About 30 mins to fix

                                                                                                              Avoid too many return statements within this function.
                                                                                                              Open

                                                                                                                          return {
                                                                                                                              text: '\n' + indent + '\n' + next_indent + closing,
                                                                                                                              selection: [1, indent.length, 1, indent.length]
                                                                                                                          };
                                                                                                              Severity: Major
                                                                                                              Found in samples/adminpanel/app/bower_components/ace-builds/src/mode-jsoniq.js - About 30 mins to fix

                                                                                                                Avoid too many return statements within this function.
                                                                                                                Open

                                                                                                                                return this.insertMatch(filtered[0]);
                                                                                                                Severity: Major
                                                                                                                Found in samples/adminpanel/app/bower_components/ace-builds/src/mode-jsoniq.js - About 30 mins to fix

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

                                                                                                                  define("ace/mode/xquery/jsoniq_lexer",["require","exports","module"], function(require, exports, module) {
                                                                                                                  module.exports = (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);throw new Error("Cannot find module '"+o+"'")}var f=n[o]={exports:{}};t[o][0].call(f.exports,function(e){var n=t[o][1][e];return s(n?n:e)},f,f.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({
                                                                                                                  1:[function(_dereq_,module,exports){
                                                                                                                  
                                                                                                                  
                                                                                                                                                                              var JSONiqTokenizer = exports.JSONiqTokenizer = function JSONiqTokenizer(string, parsingEventHandler)
                                                                                                                                                                              {
                                                                                                                  samples/adminpanel/app/bower_components/ace-builds/src-noconflict/mode-jsoniq.js on lines 1..2063

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

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

                                                                                                                  define("ace/snippets",["require","exports","module","ace/lib/oop","ace/lib/event_emitter","ace/lib/lang","ace/range","ace/anchor","ace/keyboard/hash_handler","ace/tokenizer","ace/lib/dom","ace/editor"], function(require, exports, module) {
                                                                                                                  "use strict";
                                                                                                                  var oop = require("./lib/oop");
                                                                                                                  var EventEmitter = require("./lib/event_emitter").EventEmitter;
                                                                                                                  var lang = require("./lib/lang");
                                                                                                                  samples/adminpanel/app/bower_components/ace-builds/demo/kitchen-sink/demo.js on lines 4233..5130
                                                                                                                  samples/adminpanel/app/bower_components/ace-builds/src/ext-emmet.js on lines 1..898
                                                                                                                  samples/adminpanel/app/bower_components/ace-builds/src/ext-language_tools.js on lines 1..898
                                                                                                                  samples/adminpanel/app/bower_components/ace-builds/src/mode-xquery.js on lines 2749..3646

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

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

                                                                                                                  define("ace/autocomplete",["require","exports","module","ace/keyboard/hash_handler","ace/autocomplete/popup","ace/autocomplete/util","ace/lib/event","ace/lib/lang","ace/snippets"], function(require, exports, module) {
                                                                                                                  "use strict";
                                                                                                                  
                                                                                                                  var HashHandler = require("./keyboard/hash_handler").HashHandler;
                                                                                                                  var AcePopup = require("./autocomplete/popup").AcePopup;
                                                                                                                  samples/adminpanel/app/bower_components/ace-builds/demo/kitchen-sink/demo.js on lines 5746..6092
                                                                                                                  samples/adminpanel/app/bower_components/ace-builds/src/ext-language_tools.js on lines 1249..1595
                                                                                                                  samples/adminpanel/app/bower_components/ace-builds/src/mode-xquery.js on lines 3997..4343

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

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

                                                                                                                  define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"], function(require, exports, module) {
                                                                                                                  "use strict";
                                                                                                                  
                                                                                                                  var oop = require("../../lib/oop");
                                                                                                                  var Behaviour = require("../behaviour").Behaviour;
                                                                                                                  samples/adminpanel/app/bower_components/ace-builds/src/mode-c_cpp.js on lines 263..619
                                                                                                                  samples/adminpanel/app/bower_components/ace-builds/src/mode-coldfusion.js on lines 397..753
                                                                                                                  samples/adminpanel/app/bower_components/ace-builds/src/mode-csharp.js on lines 176..532
                                                                                                                  samples/adminpanel/app/bower_components/ace-builds/src/mode-css.js on lines 185..541
                                                                                                                  samples/adminpanel/app/bower_components/ace-builds/src/mode-curly.js on lines 397..753
                                                                                                                  samples/adminpanel/app/bower_components/ace-builds/src/mode-dart.js on lines 263..619
                                                                                                                  samples/adminpanel/app/bower_components/ace-builds/src/mode-django.js on lines 397..753
                                                                                                                  samples/adminpanel/app/bower_components/ace-builds/src/mode-dockerfile.js on lines 210..566
                                                                                                                  samples/adminpanel/app/bower_components/ace-builds/src/mode-ejs.js on lines 833..1189
                                                                                                                  samples/adminpanel/app/bower_components/ace-builds/src/mode-glsl.js on lines 263..619
                                                                                                                  samples/adminpanel/app/bower_components/ace-builds/src/mode-golang.js on lines 194..550
                                                                                                                  samples/adminpanel/app/bower_components/ace-builds/src/mode-groovy.js on lines 397..753
                                                                                                                  samples/adminpanel/app/bower_components/ace-builds/src/mode-handlebars.js on lines 397..753
                                                                                                                  samples/adminpanel/app/bower_components/ace-builds/src/mode-haxe.js on lines 179..535
                                                                                                                  samples/adminpanel/app/bower_components/ace-builds/src/mode-html.js on lines 397..753
                                                                                                                  samples/adminpanel/app/bower_components/ace-builds/src/mode-html_ruby.js on lines 1113..1469
                                                                                                                  samples/adminpanel/app/bower_components/ace-builds/src/mode-jack.js on lines 151..507
                                                                                                                  samples/adminpanel/app/bower_components/ace-builds/src/mode-java.js on lines 397..753
                                                                                                                  samples/adminpanel/app/bower_components/ace-builds/src/mode-javascript.js on lines 397..753
                                                                                                                  samples/adminpanel/app/bower_components/ace-builds/src/mode-json.js on lines 109..465
                                                                                                                  samples/adminpanel/app/bower_components/ace-builds/src/mode-jsp.js on lines 1017..1373
                                                                                                                  samples/adminpanel/app/bower_components/ace-builds/src/mode-jsx.js on lines 204..560
                                                                                                                  samples/adminpanel/app/bower_components/ace-builds/src/mode-less.js on lines 270..626
                                                                                                                  samples/adminpanel/app/bower_components/ace-builds/src/mode-logiql.js on lines 162..518
                                                                                                                  samples/adminpanel/app/bower_components/ace-builds/src/mode-lsl.js on lines 135..491
                                                                                                                  samples/adminpanel/app/bower_components/ace-builds/src/mode-luapage.js on lines 397..753
                                                                                                                  samples/adminpanel/app/bower_components/ace-builds/src/mode-markdown.js on lines 397..753
                                                                                                                  samples/adminpanel/app/bower_components/ace-builds/src/mode-mel.js on lines 91..447
                                                                                                                  samples/adminpanel/app/bower_components/ace-builds/src/mode-nix.js on lines 263..619
                                                                                                                  samples/adminpanel/app/bower_components/ace-builds/src/mode-powershell.js on lines 182..538
                                                                                                                  samples/adminpanel/app/bower_components/ace-builds/src/mode-protobuf.js on lines 263..619
                                                                                                                  samples/adminpanel/app/bower_components/ace-builds/src/mode-rhtml.js on lines 397..753
                                                                                                                  samples/adminpanel/app/bower_components/ace-builds/src/mode-scad.js on lines 195..551
                                                                                                                  samples/adminpanel/app/bower_components/ace-builds/src/mode-scala.js on lines 397..753
                                                                                                                  samples/adminpanel/app/bower_components/ace-builds/src/mode-scss.js on lines 295..651
                                                                                                                  samples/adminpanel/app/bower_components/ace-builds/src/mode-sh.js on lines 210..566
                                                                                                                  samples/adminpanel/app/bower_components/ace-builds/src/mode-sjs.js on lines 397..753
                                                                                                                  samples/adminpanel/app/bower_components/ace-builds/src/mode-smarty.js on lines 397..753
                                                                                                                  samples/adminpanel/app/bower_components/ace-builds/src/mode-soy_template.js on lines 397..753
                                                                                                                  samples/adminpanel/app/bower_components/ace-builds/src/mode-svg.js on lines 1006..1362
                                                                                                                  samples/adminpanel/app/bower_components/ace-builds/src/mode-twig.js on lines 397..753
                                                                                                                  samples/adminpanel/app/bower_components/ace-builds/src/mode-typescript.js on lines 397..753
                                                                                                                  samples/adminpanel/app/bower_components/ace-builds/src/mode-vala.js on lines 516..872
                                                                                                                  samples/adminpanel/app/bower_components/ace-builds/src/mode-velocity.js on lines 397..753
                                                                                                                  samples/adminpanel/app/bower_components/ace-builds/src/mode-xquery.js on lines 2099..2455

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

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

                                                                                                                  define("ace/autocomplete/popup",["require","exports","module","ace/edit_session","ace/virtual_renderer","ace/editor","ace/range","ace/lib/event","ace/lib/lang","ace/lib/dom"], function(require, exports, module) {
                                                                                                                  "use strict";
                                                                                                                  
                                                                                                                  var EditSession = require("../edit_session").EditSession;
                                                                                                                  var Renderer = require("../virtual_renderer").VirtualRenderer;
                                                                                                                  samples/adminpanel/app/bower_components/ace-builds/demo/kitchen-sink/demo.js on lines 5397..5699
                                                                                                                  samples/adminpanel/app/bower_components/ace-builds/src/ext-language_tools.js on lines 900..1202
                                                                                                                  samples/adminpanel/app/bower_components/ace-builds/src/mode-xquery.js on lines 3648..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 2776.

                                                                                                                  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/jsoniq",["require","exports","module","ace/worker/worker_client","ace/lib/oop","ace/mode/text","ace/mode/text_highlight_rules","ace/mode/xquery/jsoniq_lexer","ace/range","ace/mode/behaviour/xquery","ace/mode/folding/cstyle","ace/anchor","ace/ext/language_tools"], function(require, exports, module) {
                                                                                                                  "use strict";
                                                                                                                  
                                                                                                                  var WorkerClient = require("../worker/worker_client").WorkerClient;
                                                                                                                  var oop = require("../lib/oop");
                                                                                                                  samples/adminpanel/app/bower_components/ace-builds/src-noconflict/mode-jsoniq.js on lines 4524..4683

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

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

                                                                                                                  define("ace/ext/language_tools",["require","exports","module","ace/snippets","ace/autocomplete","ace/config","ace/autocomplete/util","ace/autocomplete/text_completer","ace/editor","ace/config"], function(require, exports, module) {
                                                                                                                  "use strict";
                                                                                                                  
                                                                                                                  var snippetManager = require("../snippets").snippetManager;
                                                                                                                  var Autocomplete = require("../autocomplete").Autocomplete;
                                                                                                                  samples/adminpanel/app/bower_components/ace-builds/demo/kitchen-sink/demo.js on lines 6138..6305
                                                                                                                  samples/adminpanel/app/bower_components/ace-builds/src/ext-language_tools.js on lines 1641..1808
                                                                                                                  samples/adminpanel/app/bower_components/ace-builds/src/mode-xquery.js on lines 4389..4556

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

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

                                                                                                                  define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator"], function(require, exports, module) {
                                                                                                                  "use strict";
                                                                                                                  
                                                                                                                  var oop = require("../../lib/oop");
                                                                                                                  var Behaviour = require("../behaviour").Behaviour;
                                                                                                                  samples/adminpanel/app/bower_components/ace-builds/src/mode-coldfusion.js on lines 1521..1652
                                                                                                                  samples/adminpanel/app/bower_components/ace-builds/src/mode-curly.js on lines 1521..1652
                                                                                                                  samples/adminpanel/app/bower_components/ace-builds/src/mode-django.js on lines 1521..1652
                                                                                                                  samples/adminpanel/app/bower_components/ace-builds/src/mode-ejs.js on lines 1521..1652
                                                                                                                  samples/adminpanel/app/bower_components/ace-builds/src/mode-handlebars.js on lines 1521..1652
                                                                                                                  samples/adminpanel/app/bower_components/ace-builds/src/mode-html.js on lines 1521..1652
                                                                                                                  samples/adminpanel/app/bower_components/ace-builds/src/mode-html_ruby.js on lines 1801..1932
                                                                                                                  samples/adminpanel/app/bower_components/ace-builds/src/mode-luapage.js on lines 1521..1652
                                                                                                                  samples/adminpanel/app/bower_components/ace-builds/src/mode-markdown.js on lines 1147..1278
                                                                                                                  samples/adminpanel/app/bower_components/ace-builds/src/mode-rhtml.js on lines 1521..1652
                                                                                                                  samples/adminpanel/app/bower_components/ace-builds/src/mode-smarty.js on lines 1521..1652
                                                                                                                  samples/adminpanel/app/bower_components/ace-builds/src/mode-soy_template.js on lines 1521..1652
                                                                                                                  samples/adminpanel/app/bower_components/ace-builds/src/mode-svg.js on lines 211..342
                                                                                                                  samples/adminpanel/app/bower_components/ace-builds/src/mode-twig.js on lines 1521..1652
                                                                                                                  samples/adminpanel/app/bower_components/ace-builds/src/mode-velocity.js on lines 1521..1652
                                                                                                                  samples/adminpanel/app/bower_components/ace-builds/src/mode-xml.js on lines 211..342
                                                                                                                  samples/adminpanel/app/bower_components/ace-builds/src/mode-xquery.js on lines 2457..2588

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

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

                                                                                                                  define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) {
                                                                                                                  "use strict";
                                                                                                                  
                                                                                                                  var oop = require("../../lib/oop");
                                                                                                                  var Range = require("../../range").Range;
                                                                                                                  samples/adminpanel/app/bower_components/ace-builds/src/mode-actionscript.js on lines 105..198
                                                                                                                  samples/adminpanel/app/bower_components/ace-builds/src/mode-apache_conf.js on lines 195..288
                                                                                                                  samples/adminpanel/app/bower_components/ace-builds/src/mode-applescript.js on lines 109..202
                                                                                                                  samples/adminpanel/app/bower_components/ace-builds/src/mode-batchfile.js on lines 61..154
                                                                                                                  samples/adminpanel/app/bower_components/ace-builds/src/mode-c_cpp.js on lines 621..714
                                                                                                                  samples/adminpanel/app/bower_components/ace-builds/src/mode-coldfusion.js on lines 755..848
                                                                                                                  samples/adminpanel/app/bower_components/ace-builds/src/mode-csharp.js on lines 534..627
                                                                                                                  samples/adminpanel/app/bower_components/ace-builds/src/mode-css.js on lines 622..715
                                                                                                                  samples/adminpanel/app/bower_components/ace-builds/src/mode-curly.js on lines 755..848
                                                                                                                  samples/adminpanel/app/bower_components/ace-builds/src/mode-d.js on lines 345..438
                                                                                                                  samples/adminpanel/app/bower_components/ace-builds/src/mode-dart.js on lines 621..714
                                                                                                                  samples/adminpanel/app/bower_components/ace-builds/src/mode-django.js on lines 755..848
                                                                                                                  samples/adminpanel/app/bower_components/ace-builds/src/mode-dockerfile.js on lines 115..208
                                                                                                                  samples/adminpanel/app/bower_components/ace-builds/src/mode-dot.js on lines 212..305
                                                                                                                  samples/adminpanel/app/bower_components/ace-builds/src/mode-ejs.js on lines 1191..1284
                                                                                                                  samples/adminpanel/app/bower_components/ace-builds/src/mode-erlang.js on lines 840..933
                                                                                                                  samples/adminpanel/app/bower_components/ace-builds/src/mode-forth.js on lines 128..221
                                                                                                                  samples/adminpanel/app/bower_components/ace-builds/src/mode-glsl.js on lines 621..714
                                                                                                                  samples/adminpanel/app/bower_components/ace-builds/src/mode-golang.js on lines 552..645
                                                                                                                  samples/adminpanel/app/bower_components/ace-builds/src/mode-groovy.js on lines 755..848
                                                                                                                  samples/adminpanel/app/bower_components/ace-builds/src/mode-handlebars.js on lines 755..848
                                                                                                                  samples/adminpanel/app/bower_components/ace-builds/src/mode-haskell.js on lines 210..303
                                                                                                                  samples/adminpanel/app/bower_components/ace-builds/src/mode-haxe.js on lines 537..630
                                                                                                                  samples/adminpanel/app/bower_components/ace-builds/src/mode-html.js on lines 755..848
                                                                                                                  samples/adminpanel/app/bower_components/ace-builds/src/mode-html_ruby.js on lines 1471..1564
                                                                                                                  samples/adminpanel/app/bower_components/ace-builds/src/mode-jack.js on lines 509..602
                                                                                                                  samples/adminpanel/app/bower_components/ace-builds/src/mode-java.js on lines 755..848
                                                                                                                  samples/adminpanel/app/bower_components/ace-builds/src/mode-javascript.js on lines 755..848
                                                                                                                  samples/adminpanel/app/bower_components/ace-builds/src/mode-json.js on lines 467..560
                                                                                                                  samples/adminpanel/app/bower_components/ace-builds/src/mode-jsp.js on lines 1375..1468
                                                                                                                  samples/adminpanel/app/bower_components/ace-builds/src/mode-jsx.js on lines 562..655
                                                                                                                  samples/adminpanel/app/bower_components/ace-builds/src/mode-julia.js on lines 134..227
                                                                                                                  samples/adminpanel/app/bower_components/ace-builds/src/mode-less.js on lines 707..800
                                                                                                                  samples/adminpanel/app/bower_components/ace-builds/src/mode-lsl.js on lines 493..586
                                                                                                                  samples/adminpanel/app/bower_components/ace-builds/src/mode-luapage.js on lines 755..848
                                                                                                                  samples/adminpanel/app/bower_components/ace-builds/src/mode-markdown.js on lines 755..848
                                                                                                                  samples/adminpanel/app/bower_components/ace-builds/src/mode-mel.js on lines 449..542
                                                                                                                  samples/adminpanel/app/bower_components/ace-builds/src/mode-nix.js on lines 621..714
                                                                                                                  samples/adminpanel/app/bower_components/ace-builds/src/mode-objectivec.js on lines 550..643
                                                                                                                  samples/adminpanel/app/bower_components/ace-builds/src/mode-perl.js on lines 174..267
                                                                                                                  samples/adminpanel/app/bower_components/ace-builds/src/mode-powershell.js on lines 540..633
                                                                                                                  samples/adminpanel/app/bower_components/ace-builds/src/mode-prolog.js on lines 202..295
                                                                                                                  samples/adminpanel/app/bower_components/ace-builds/src/mode-protobuf.js on lines 621..714
                                                                                                                  samples/adminpanel/app/bower_components/ace-builds/src/mode-rhtml.js on lines 755..848
                                                                                                                  samples/adminpanel/app/bower_components/ace-builds/src/mode-rust.js on lines 93..186
                                                                                                                  samples/adminpanel/app/bower_components/ace-builds/src/mode-scad.js on lines 553..646
                                                                                                                  samples/adminpanel/app/bower_components/ace-builds/src/mode-scala.js on lines 755..848
                                                                                                                  samples/adminpanel/app/bower_components/ace-builds/src/mode-scss.js on lines 732..825
                                                                                                                  samples/adminpanel/app/bower_components/ace-builds/src/mode-sh.js on lines 115..208
                                                                                                                  samples/adminpanel/app/bower_components/ace-builds/src/mode-sjs.js on lines 755..848
                                                                                                                  samples/adminpanel/app/bower_components/ace-builds/src/mode-smarty.js on lines 755..848
                                                                                                                  samples/adminpanel/app/bower_components/ace-builds/src/mode-soy_template.js on lines 755..848
                                                                                                                  samples/adminpanel/app/bower_components/ace-builds/src/mode-svg.js on lines 1364..1457
                                                                                                                  samples/adminpanel/app/bower_components/ace-builds/src/mode-tcl.js on lines 1..94
                                                                                                                  samples/adminpanel/app/bower_components/ace-builds/src/mode-twig.js on lines 755..848
                                                                                                                  samples/adminpanel/app/bower_components/ace-builds/src/mode-typescript.js on lines 755..848
                                                                                                                  samples/adminpanel/app/bower_components/ace-builds/src/mode-vala.js on lines 421..514
                                                                                                                  samples/adminpanel/app/bower_components/ace-builds/src/mode-velocity.js on lines 755..848
                                                                                                                  samples/adminpanel/app/bower_components/ace-builds/src/mode-xquery.js on lines 2654..2747

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

                                                                                                                  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/behaviour/xquery",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/mode/behaviour/cstyle","ace/mode/behaviour/xml","ace/token_iterator"], function(require, exports, module) {
                                                                                                                  "use strict";
                                                                                                                  
                                                                                                                    var oop = require("../../lib/oop");
                                                                                                                    var Behaviour = require('../behaviour').Behaviour;
                                                                                                                  samples/adminpanel/app/bower_components/ace-builds/src/mode-xquery.js on lines 2590..2652

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

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

                                                                                                                  define("ace/autocomplete/text_completer",["require","exports","module","ace/range"], function(require, exports, module) {
                                                                                                                      var Range = require("../range").Range;
                                                                                                                      
                                                                                                                      var splitRegex = /[^a-zA-Z_0-9\$\-\u00C0-\u1FFF\u2C00-\uD7FF\w]+/;
                                                                                                                  
                                                                                                                  
                                                                                                                  samples/adminpanel/app/bower_components/ace-builds/demo/kitchen-sink/demo.js on lines 6094..6136
                                                                                                                  samples/adminpanel/app/bower_components/ace-builds/src/ext-language_tools.js on lines 1597..1639
                                                                                                                  samples/adminpanel/app/bower_components/ace-builds/src/mode-xquery.js on lines 4345..4387

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

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

                                                                                                                  define("ace/autocomplete/util",["require","exports","module"], function(require, exports, module) {
                                                                                                                  "use strict";
                                                                                                                  
                                                                                                                  exports.parForEach = function(array, fn, callback) {
                                                                                                                      var completed = 0;
                                                                                                                  samples/adminpanel/app/bower_components/ace-builds/demo/kitchen-sink/demo.js on lines 5701..5744
                                                                                                                  samples/adminpanel/app/bower_components/ace-builds/src/ext-language_tools.js on lines 1204..1247
                                                                                                                  samples/adminpanel/app/bower_components/ace-builds/src/mode-xquery.js on lines 3952..3995

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

                                                                                                                  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