datahuborg/datahub

View on GitHub
src/browser/static/datatables/js/dataTables.extra.js

Summary

Maintainability
F
1 mo
Test Coverage

File dataTables.extra.js has 975 lines of code (exceeds 250 allowed). Consider refactoring.
Open

(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);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.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(require,module,exports){
var api = require("./api.js");
var FilterBar = require("./filter-bar.js");
var Aggregator = require("./aggregator.js");
var table_header_template = require("./templates/table_header.hbs");
Severity: Major
Found in src/browser/static/datatables/js/dataTables.extra.js - About 2 days to fix

    Function 16 has a Cognitive Complexity of 111 (exceeds 5 allowed). Consider refactoring.
    Open

    },{}],16:[function(require,module,exports){
    "use strict";
    var Utils = require("./utils");
    var Exception = require("./exception")["default"];
    var COMPILER_REVISION = require("./base").COMPILER_REVISION;
    Severity: Minor
    Found in src/browser/static/datatables/js/dataTables.extra.js - About 2 days to fix

    Cognitive Complexity

    Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

    A method's cognitive complexity is based on a few simple rules:

    • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
    • Code is considered more complex for each "break in the linear flow of the code"
    • Code is considered more complex when "flow breaking structures are nested"

    Further reading

    Function 14 has 195 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    },{"./handlebars/base":14,"./handlebars/exception":15,"./handlebars/runtime":16,"./handlebars/safe-string":17,"./handlebars/utils":18}],14:[function(require,module,exports){
    "use strict";
    var Utils = require("./utils");
    var Exception = require("./exception")["default"];
    
    
    Severity: Major
    Found in src/browser/static/datatables/js/dataTables.extra.js - About 7 hrs to fix

      Function 16 has 182 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      },{}],16:[function(require,module,exports){
      "use strict";
      var Utils = require("./utils");
      var Exception = require("./exception")["default"];
      var COMPILER_REVISION = require("./base").COMPILER_REVISION;
      Severity: Major
      Found in src/browser/static/datatables/js/dataTables.extra.js - About 7 hrs to fix

        Function 4 has 129 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        },{}],4:[function(require,module,exports){
        var filter_buttons_template = require("./templates/filter_buttons.hbs");
        var filter_template = require("./templates/filter.hbs");
        var delete_button_col = require("./templates/delete-button-col.hbs");
        
        
        Severity: Major
        Found in src/browser/static/datatables/js/dataTables.extra.js - About 5 hrs to fix

          Function 18 has a Cognitive Complexity of 33 (exceeds 5 allowed). Consider refactoring.
          Open

          },{}],18:[function(require,module,exports){
          "use strict";
          /*jshint -W004 */
          var escape = {
            "&": "&amp;",
          Severity: Minor
          Found in src/browser/static/datatables/js/dataTables.extra.js - About 4 hrs to fix

          Cognitive Complexity

          Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

          A method's cognitive complexity is based on a few simple rules:

          • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
          • Code is considered more complex for each "break in the linear flow of the code"
          • Code is considered more complex when "flow breaking structures are nested"

          Further reading

          Function template has 119 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          function template(templateSpec, env) {
            /* istanbul ignore next */
            if (!env) {
              throw new Exception("No environment passed to template");
            }
          Severity: Major
          Found in src/browser/static/datatables/js/dataTables.extra.js - About 4 hrs to fix

            Function registerDefaultHelpers has 118 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            function registerDefaultHelpers(instance) {
              instance.registerHelper('helperMissing', function(/* [args, ]options */) {
                if(arguments.length === 1) {
                  // A missing field in a {{foo}} constuct.
                  return undefined;
            Severity: Major
            Found in src/browser/static/datatables/js/dataTables.extra.js - About 4 hrs to fix

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

              (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);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.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(require,module,exports){
              var api = require("./api.js");
              var FilterBar = require("./filter-bar.js");
              var Aggregator = require("./aggregator.js");
              var table_header_template = require("./templates/table_header.hbs");
              Severity: Major
              Found in src/browser/static/datatables/js/dataTables.extra.js - About 4 hrs to fix

                Function EnhancedDataTable has 104 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                $.fn.EnhancedDataTable = function(repo, table, query_callback, init_callback) {
                  // The jquer object for which the EnhancedDataTable function was triggered.
                  var jqueryObject = this;
                  var filterBar;
                  var aggregator;
                Severity: Major
                Found in src/browser/static/datatables/js/dataTables.extra.js - About 4 hrs to fix

                  Function 4 has a Cognitive Complexity of 27 (exceeds 5 allowed). Consider refactoring.
                  Open

                  },{}],4:[function(require,module,exports){
                  var filter_buttons_template = require("./templates/filter_buttons.hbs");
                  var filter_template = require("./templates/filter.hbs");
                  var delete_button_col = require("./templates/delete-button-col.hbs");
                  
                  
                  Severity: Minor
                  Found in src/browser/static/datatables/js/dataTables.extra.js - About 3 hrs to fix

                  Cognitive Complexity

                  Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                  A method's cognitive complexity is based on a few simple rules:

                  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                  • Code is considered more complex for each "break in the linear flow of the code"
                  • Code is considered more complex when "flow breaking structures are nested"

                  Further reading

                  Function 12 has a Cognitive Complexity of 26 (exceeds 5 allowed). Consider refactoring.
                  Open

                  },{"hbsfy/runtime":20}],12:[function(require,module,exports){
                  // hbsfy compiled Handlebars template
                  var HandlebarsCompiler = require('hbsfy/runtime');
                  module.exports = HandlebarsCompiler.template({"1":function(depth0,helpers,partials,data) {
                      var helper, alias1=helpers.helperMissing, alias2="function", alias3=this.escapeExpression;
                  Severity: Minor
                  Found in src/browser/static/datatables/js/dataTables.extra.js - About 3 hrs to fix

                  Cognitive Complexity

                  Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                  A method's cognitive complexity is based on a few simple rules:

                  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                  • Code is considered more complex for each "break in the linear flow of the code"
                  • Code is considered more complex when "flow breaking structures are nested"

                  Further reading

                  Function 9 has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring.
                  Open

                  },{"hbsfy/runtime":20}],9:[function(require,module,exports){
                  // hbsfy compiled Handlebars template
                  var HandlebarsCompiler = require('hbsfy/runtime');
                  module.exports = HandlebarsCompiler.template({"1":function(depth0,helpers,partials,data) {
                      var stack1, helper, alias1=helpers.helperMissing, alias2="function", alias3=this.escapeExpression;
                  Severity: Minor
                  Found in src/browser/static/datatables/js/dataTables.extra.js - About 3 hrs to fix

                  Cognitive Complexity

                  Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                  A method's cognitive complexity is based on a few simple rules:

                  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                  • Code is considered more complex for each "break in the linear flow of the code"
                  • Code is considered more complex when "flow breaking structures are nested"

                  Further reading

                  Function 18 has 78 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                  },{}],18:[function(require,module,exports){
                  "use strict";
                  /*jshint -W004 */
                  var escape = {
                    "&": "&amp;",
                  Severity: Major
                  Found in src/browser/static/datatables/js/dataTables.extra.js - About 3 hrs to fix

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

                    },{"./aggregator.js":2,"./api.js":3,"./filter-bar.js":4,"./shorten-query.js":6,"./templates/table_header.hbs":12}],2:[function(require,module,exports){
                    var grouped_buttons_template = require("./templates/grouped-aggregate-dropdown.hbs");
                    var api = require("./api.js");
                    var col_list_items_template = require("./templates/aggregate-col-list-item.hbs");
                    var PostgresTypes = require("./postgres-types.js");
                    Severity: Major
                    Found in src/browser/static/datatables/js/dataTables.extra.js - About 2 hrs to fix

                      Function exports has 54 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                      module.exports = function(container, cd, dt) {
                        var that = {};
                      
                        jqueryContainer = container;
                        colDefs = cd;
                      Severity: Major
                      Found in src/browser/static/datatables/js/dataTables.extra.js - About 2 hrs to fix

                        Function e has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring.
                        Open

                        (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);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.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(require,module,exports){
                        Severity: Minor
                        Found in src/browser/static/datatables/js/dataTables.extra.js - About 2 hrs to fix

                        Cognitive Complexity

                        Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                        A method's cognitive complexity is based on a few simple rules:

                        • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                        • Code is considered more complex for each "break in the linear flow of the code"
                        • Code is considered more complex when "flow breaking structures are nested"

                        Further reading

                        Function 14 has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring.
                        Open

                        },{"./handlebars/base":14,"./handlebars/exception":15,"./handlebars/runtime":16,"./handlebars/safe-string":17,"./handlebars/utils":18}],14:[function(require,module,exports){
                        "use strict";
                        var Utils = require("./utils");
                        var Exception = require("./exception")["default"];
                        
                        
                        Severity: Minor
                        Found in src/browser/static/datatables/js/dataTables.extra.js - About 2 hrs to fix

                        Cognitive Complexity

                        Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                        A method's cognitive complexity is based on a few simple rules:

                        • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                        • Code is considered more complex for each "break in the linear flow of the code"
                        • Code is considered more complex when "flow breaking structures are nested"

                        Further reading

                        Function 8 has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring.
                        Open

                        },{"hbsfy/runtime":20}],8:[function(require,module,exports){
                        // hbsfy compiled Handlebars template
                        var HandlebarsCompiler = require('hbsfy/runtime');
                        module.exports = HandlebarsCompiler.template({"compiler":[6,">= 2.0.0-beta.1"],"main":function(depth0,helpers,partials,data) {
                            var helper, alias1=helpers.helperMissing, alias2="function", alias3=this.escapeExpression;
                        Severity: Minor
                        Found in src/browser/static/datatables/js/dataTables.extra.js - About 1 hr to fix

                        Cognitive Complexity

                        Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                        A method's cognitive complexity is based on a few simple rules:

                        • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                        • Code is considered more complex for each "break in the linear flow of the code"
                        • Code is considered more complex when "flow breaking structures are nested"

                        Further reading

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

                              "initComplete": function(settings, json) {
                                filterBar = FilterBar(jqueryObject.parent().parent().parent(), columnDefs, datatable);
                                aggregator = Aggregator(jqueryObject.parent().parent().parent(), columnDefs, repo, table);
                        
                                datatable.forEachRowInColumn = function(colName, func) {
                        Severity: Minor
                        Found in src/browser/static/datatables/js/dataTables.extra.js - About 1 hr to fix

                          Function 7 has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
                          Open

                          },{}],7:[function(require,module,exports){
                          // hbsfy compiled Handlebars template
                          var HandlebarsCompiler = require('hbsfy/runtime');
                          module.exports = HandlebarsCompiler.template({"1":function(depth0,helpers,partials,data) {
                              var helper;
                          Severity: Minor
                          Found in src/browser/static/datatables/js/dataTables.extra.js - About 1 hr to fix

                          Cognitive Complexity

                          Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                          A method's cognitive complexity is based on a few simple rules:

                          • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                          • Code is considered more complex for each "break in the linear flow of the code"
                          • Code is considered more complex when "flow breaking structures are nested"

                          Further reading

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

                          },{"./api.js":3,"./postgres-types.js":5,"./templates/aggregate-col-list-item.hbs":7,"./templates/grouped-aggregate-dropdown.hbs":11}],3:[function(require,module,exports){
                          /**
                           * This file contains the code for interacting with the API
                           * for server side processing of datatables.
                           */
                          Severity: Minor
                          Found in src/browser/static/datatables/js/dataTables.extra.js - About 1 hr to fix

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

                            },{"hbsfy/runtime":20}],13:[function(require,module,exports){
                            (function (global){
                            "use strict";
                            /*globals Handlebars: true */
                            var base = require("./handlebars/base");
                            Severity: Minor
                            Found in src/browser/static/datatables/js/dataTables.extra.js - About 1 hr to fix

                              Function 13 has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
                              Open

                              },{"hbsfy/runtime":20}],13:[function(require,module,exports){
                              (function (global){
                              "use strict";
                              /*globals Handlebars: true */
                              var base = require("./handlebars/base");
                              Severity: Minor
                              Found in src/browser/static/datatables/js/dataTables.extra.js - About 1 hr to fix

                              Cognitive Complexity

                              Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                              A method's cognitive complexity is based on a few simple rules:

                              • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                              • Code is considered more complex for each "break in the linear flow of the code"
                              • Code is considered more complex when "flow breaking structures are nested"

                              Further reading

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

                                      datatable.forEachRowInColumn = function(colName, func) {
                                        var targets = -1;
                                        columnDefs.forEach(function(columnDef) {
                                          if (columnDef.name === colName) {
                                            targets = columnDef.targets;
                              Severity: Minor
                              Found in src/browser/static/datatables/js/dataTables.extra.js - About 1 hr to fix

                                Function program has 7 arguments (exceeds 4 allowed). Consider refactoring.
                                Open

                                exports.template = template;function program(container, i, fn, data, declaredBlockParams, blockParams, depths) {
                                Severity: Major
                                Found in src/browser/static/datatables/js/dataTables.extra.js - About 50 mins to fix

                                  Avoid deeply nested control flow statements.
                                  Open

                                              if (priorKey) {
                                                execIteration(priorKey, i-1);
                                              }
                                  Severity: Major
                                  Found in src/browser/static/datatables/js/dataTables.extra.js - About 45 mins to fix

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

                                    api.compute_aggregate = function(repo, table, agg_type, col_name, callback) {
                                    Severity: Minor
                                    Found in src/browser/static/datatables/js/dataTables.extra.js - About 35 mins to fix

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

                                          program: function(i, data, declaredBlockParams, blockParams, depths) {
                                      Severity: Minor
                                      Found in src/browser/static/datatables/js/dataTables.extra.js - About 35 mins to fix

                                        Function 15 has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                                        Open

                                        },{"./exception":15,"./utils":18}],15:[function(require,module,exports){
                                        "use strict";
                                        
                                        var errorProps = ['description', 'fileName', 'lineNumber', 'message', 'name', 'number', 'stack'];
                                        
                                        
                                        Severity: Minor
                                        Found in src/browser/static/datatables/js/dataTables.extra.js - About 35 mins to fix

                                        Cognitive Complexity

                                        Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                                        A method's cognitive complexity is based on a few simple rules:

                                        • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                                        • Code is considered more complex for each "break in the linear flow of the code"
                                        • Code is considered more complex when "flow breaking structures are nested"

                                        Further reading

                                        Function 6 has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                                        Open

                                        },{}],6:[function(require,module,exports){
                                        module.exports = function(query, hidden_cols) {
                                          try {
                                            var lower_case_query = query.toLowerCase();
                                            var select_end = lower_case_query.indexOf("select") + "select".length;
                                        Severity: Minor
                                        Found in src/browser/static/datatables/js/dataTables.extra.js - About 35 mins to fix

                                        Cognitive Complexity

                                        Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                                        A method's cognitive complexity is based on a few simple rules:

                                        • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                                        • Code is considered more complex for each "break in the linear flow of the code"
                                        • Code is considered more complex when "flow breaking structures are nested"

                                        Further reading

                                        Avoid too many return statements within this function.
                                        Open

                                              return fn(context, options);
                                        Severity: Major
                                        Found in src/browser/static/datatables/js/dataTables.extra.js - About 30 mins to fix

                                          Avoid too many return statements within this function.
                                          Open

                                            return string.replace(badChars, escapeChar);
                                          Severity: Major
                                          Found in src/browser/static/datatables/js/dataTables.extra.js - About 30 mins to fix

                                            TODO found
                                            Open

                                            exports.checkRevision = checkRevision;// TODO: Remove this line and break up compilePartial

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

                                            $.fn.EnhancedDataTable = function(repo, table, query_callback, init_callback) {
                                              // The jquer object for which the EnhancedDataTable function was triggered.
                                              var jqueryObject = this;
                                              var filterBar;
                                              var aggregator;
                                            Severity: Major
                                            Found in src/browser/static/datatables/js/dataTables.extra.js and 1 other location - About 5 days to fix
                                            src/apps/datatables/client/js/dataTables.extra.js on lines 7..127

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

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

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

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

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

                                            Refactorings

                                            Further Reading

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

                                            module.exports = function(container, cd, dt) {
                                              var that = {};
                                            
                                              jqueryContainer = container;
                                              colDefs = cd;
                                            Severity: Major
                                            Found in src/browser/static/datatables/js/dataTables.extra.js and 1 other location - About 3 days to fix
                                            src/apps/datatables/client/js/filter-bar.js on lines 91..157

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

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

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

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

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

                                            Refactorings

                                            Further Reading

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

                                            $(document).on('click', '.dt-agg-item', function() {
                                              // Hide the result.
                                              $(".dt-agg-result").css("visibility", "hidden");
                                            
                                              // Make the column list div visible.
                                            Severity: Major
                                            Found in src/browser/static/datatables/js/dataTables.extra.js and 1 other location - About 1 day to fix
                                            src/apps/datatables/client/js/aggregator.js on lines 24..60

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

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

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

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

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

                                            Refactorings

                                            Further Reading

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

                                            module.exports = function(query, hidden_cols) {
                                              try {
                                                var lower_case_query = query.toLowerCase();
                                                var select_end = lower_case_query.indexOf("select") + "select".length;
                                                var from_start = lower_case_query.indexOf("from");
                                            Severity: Major
                                            Found in src/browser/static/datatables/js/dataTables.extra.js and 1 other location - About 1 day to fix
                                            src/apps/datatables/client/js/shorten-query.js on lines 1..24

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

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

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

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

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

                                            Refactorings

                                            Further Reading

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

                                            var createFilter = function(){
                                              var selector = $(".dataTables_scrollFootInner tfoot"); 
                                              var order = datatable.colReorder.order();
                                            
                                              for (var i = 0; i < order.length; i++) {
                                            Severity: Major
                                            Found in src/browser/static/datatables/js/dataTables.extra.js and 1 other location - About 1 day to fix
                                            src/apps/datatables/client/js/filter-bar.js on lines 57..85

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

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

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

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

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

                                            Refactorings

                                            Further Reading

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

                                              return "<div class=\"input-group\">\n  <span class=\"input-group-btn\">\n    <button class=\"btn btn-danger dt-delete-button\" type=\"button\"><i class=\"fa fa-trash\"></i></button>\n    <button class=\"btn btn-default dt-op-button\" type=\"button\">=</button>\n  </span>\n  <input type=\"text\" class=\"form-control dt-filtertext\" placeholder=\""
                                                + alias3(((helper = (helper = helpers.name || (depth0 != null ? depth0.name : depth0)) != null ? helper : alias1),(typeof helper === alias2 ? helper.call(depth0,{"name":"name","hash":{},"data":data}) : helper)))
                                                + "\" value=\""
                                                + alias3(((helper = (helper = helpers.value || (depth0 != null ? depth0.value : depth0)) != null ? helper : alias1),(typeof helper === alias2 ? helper.call(depth0,{"name":"value","hash":{},"data":data}) : helper)))
                                                + "\"> \n</div>\n";
                                            Severity: Major
                                            Found in src/browser/static/datatables/js/dataTables.extra.js and 1 other location - About 7 hrs to fix
                                            src/browser/static/datatables/js/dataTables.extra.js on lines 561..565

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

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

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

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

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

                                            Refactorings

                                            Further Reading

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

                                              return "  <th data-colname=\""
                                                + alias3(((helper = (helper = helpers.name || (depth0 != null ? depth0.name : depth0)) != null ? helper : alias1),(typeof helper === alias2 ? helper.call(depth0,{"name":"name","hash":{},"data":data}) : helper)))
                                                + "\">"
                                                + alias3(((helper = (helper = helpers.name || (depth0 != null ? depth0.name : depth0)) != null ? helper : alias1),(typeof helper === alias2 ? helper.call(depth0,{"name":"name","hash":{},"data":data}) : helper)))
                                                + " <span class=\"gray\">("
                                            Severity: Major
                                            Found in src/browser/static/datatables/js/dataTables.extra.js and 1 other location - About 7 hrs to fix
                                            src/browser/static/datatables/js/dataTables.extra.js on lines 511..515

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

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

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

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

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

                                            Refactorings

                                            Further Reading

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

                                            api.get_column_definitions = function(repo, table, callback) {
                                              // Create the endpoint URL.
                                              var url = url_base + "schema/" + repo + "/" + table + "/";
                                            
                                              // Get the schema.
                                            Severity: Major
                                            Found in src/browser/static/datatables/js/dataTables.extra.js and 1 other location - About 7 hrs to fix
                                            src/apps/datatables/client/js/api.js on lines 32..59

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

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

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

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

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

                                            Refactorings

                                            Further Reading

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

                                            $(document).on("click", ".dt-col-agg-item", function() {
                                              $(".dt-agg-result").css("visibility", "hidden");
                                              var agg_type = current_aggregate;
                                              var col_name = $(this).html();
                                              $(".dt-col-agg-name").html(col_name + " ");
                                            Severity: Major
                                            Found in src/browser/static/datatables/js/dataTables.extra.js and 1 other location - About 6 hrs to fix
                                            src/apps/datatables/client/js/aggregator.js on lines 62..76

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

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

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

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

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

                                            Refactorings

                                            Further Reading

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

                                            var set_visibility = function(colname, visibility) {
                                              if (visibility !== undefined) {
                                                if (visibility) {
                                                  hidden_cols[colname] = undefined;
                                                } else {
                                            Severity: Major
                                            Found in src/browser/static/datatables/js/dataTables.extra.js and 1 other location - About 4 hrs to fix
                                            src/apps/datatables/client/js/filter-bar.js on lines 7..22

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

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

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

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

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

                                            Refactorings

                                            Further Reading

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

                                            var PostgresTypes = function() {
                                              var that = {};
                                              that.is_numeric = function(type) {
                                                return number_types.indexOf(type) !== -1;
                                              };
                                            Severity: Major
                                            Found in src/browser/static/datatables/js/dataTables.extra.js and 1 other location - About 4 hrs to fix
                                            src/apps/datatables/client/js/postgres-types.js on lines 4..19

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

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

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

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

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

                                            Refactorings

                                            Further Reading

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

                                            api.compute_aggregate = function(repo, table, agg_type, col_name, callback) {
                                              var url = url_base + "aggregate/" + repo + "/" + table + "/" + agg_type + "/" + col_name + "/";
                                              $.get(url, function(aggregate_result) {
                                                if (aggregate_result.success) {
                                                  callback(null, aggregate_result.value);
                                            Severity: Major
                                            Found in src/browser/static/datatables/js/dataTables.extra.js and 1 other location - About 4 hrs to fix
                                            src/apps/datatables/client/js/api.js on lines 61..70

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

                                            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

                                            },"compiler":[6,">= 2.0.0-beta.1"],"main":function(depth0,helpers,partials,data) {
                                                var stack1;
                                            
                                              return "<tr class=\"dt-filter\">\n"
                                                + ((stack1 = helpers.each.call(depth0,(depth0 != null ? depth0.colDefs : depth0),{"name":"each","hash":{},"fn":this.program(1, data, 0),"inverse":this.noop,"data":data})) != null ? stack1 : "")
                                            Severity: Major
                                            Found in src/browser/static/datatables/js/dataTables.extra.js and 1 other location - About 3 hrs to fix
                                            src/browser/static/datatables/js/dataTables.extra.js on lines 568..574

                                            Duplicated Code

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

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

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

                                            Tuning

                                            This issue has a mass of 113.

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

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

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

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

                                            Refactorings

                                            Further Reading

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

                                            },"compiler":[6,">= 2.0.0-beta.1"],"main":function(depth0,helpers,partials,data) {
                                                var stack1;
                                            
                                              return "<tr>\n"
                                                + ((stack1 = helpers.each.call(depth0,(depth0 != null ? depth0.colDefs : depth0),{"name":"each","hash":{},"fn":this.program(1, data, 0),"inverse":this.noop,"data":data})) != null ? stack1 : "")
                                            Severity: Major
                                            Found in src/browser/static/datatables/js/dataTables.extra.js and 1 other location - About 3 hrs to fix
                                            src/browser/static/datatables/js/dataTables.extra.js on lines 533..539

                                            Duplicated Code

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

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

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

                                            Tuning

                                            This issue has a mass of 113.

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

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

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

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

                                            Refactorings

                                            Further Reading

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

                                            module.exports = function(container, cd, r, tbl) {
                                              var that = {};
                                              postgres_types = PostgresTypes();
                                              colDefs = cd;
                                              repo = r;
                                            Severity: Major
                                            Found in src/browser/static/datatables/js/dataTables.extra.js and 1 other location - About 2 hrs to fix
                                            src/apps/datatables/client/js/aggregator.js on lines 12..22

                                            Duplicated Code

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

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

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

                                            Tuning

                                            This issue has a mass of 83.

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

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

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

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

                                            Refactorings

                                            Further Reading

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

                                            },{"hbsfy/runtime":20}],10:[function(require,module,exports){
                                            // hbsfy compiled Handlebars template
                                            var HandlebarsCompiler = require('hbsfy/runtime');
                                            module.exports = HandlebarsCompiler.template({"compiler":[6,">= 2.0.0-beta.1"],"main":function(depth0,helpers,partials,data) {
                                                return "<p>Shift-click columns for multi-sort.</p>\n<button class=\"btn btn-primary dt-new-filter\">New Filter</button>\n<label class=\"btn btn-primary\">\n  <input class=\"dt-invert-filter\" type=\"checkbox\" autocomplete=\"off\"> Invert Filter\n</label>\n\n";
                                            Severity: Major
                                            Found in src/browser/static/datatables/js/dataTables.extra.js and 1 other location - About 2 hrs to fix
                                            src/browser/static/datatables/js/dataTables.extra.js on lines 548..555

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

                                            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

                                            },{"hbsfy/runtime":20}],11:[function(require,module,exports){
                                            // hbsfy compiled Handlebars template
                                            var HandlebarsCompiler = require('hbsfy/runtime');
                                            module.exports = HandlebarsCompiler.template({"compiler":[6,">= 2.0.0-beta.1"],"main":function(depth0,helpers,partials,data) {
                                                return "<div class=\"btn-group dropup\">\n  <button type=\"button\" class=\"dt-agg-button btn btn-primary dropdown-toggle dropup\" data-toggle=\"dropdown\" aria-expanded=\"false\">\n    <span class=\"dt-agg-type\">Aggregate... </span><span class=\"caret\"></span>\n  </button>\n  <ul class=\"dropdown-menu\" role=\"menu\">\n    <li><a class=\"dt-agg-item\" data-agg-type=\"count\">Count</a></li>\n    <li><a class=\"dt-agg-item\" data-agg-type=\"sum\">Sum</a></li>\n    <li><a class=\"dt-agg-item\" data-agg-type=\"avg\">Average</a></li>\n    <li><a class=\"dt-agg-item\" data-agg-type=\"min\">Min</a></li>\n    <li><a class=\"dt-agg-item\" data-agg-type=\"max\">Max</a></li>\n  </ul>\n</div>\n<div class=\"btn-group dropup dt-col-agg-div\" style=\"visibility:hidden\">\n  <button type=\"button\" class=\"dt-col-agg-button btn btn-primary dropdown-toggle dropup\" data-toggle=\"dropdown\" aria-expanded=\"false\">\n    <span class=\"dt-col-agg-name\">Column Name... </span><span class=\"caret\"></span>\n  </button>\n  <ul class=\"dropdown-menu dt-col-agg-list\" role=\"menu\">\n  </ul>\n</div>\n<span class=\"dt-agg-result \" style=\"visibility:hidden\">123</span>\n";
                                            Severity: Major
                                            Found in src/browser/static/datatables/js/dataTables.extra.js and 1 other location - About 2 hrs to fix
                                            src/browser/static/datatables/js/dataTables.extra.js on lines 541..548

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

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

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

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

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

                                            Refactorings

                                            Further Reading

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

                                            $(document).on("click", ".dt-delete-button", function() {
                                              // Delete the entire row.
                                              // button < span < div < th < tr
                                              $(this).parent().parent().parent().parent().remove();
                                            });
                                            Severity: Major
                                            Found in src/browser/static/datatables/js/dataTables.extra.js and 1 other location - About 1 hr to fix
                                            src/apps/datatables/client/js/filter-bar.js on lines 47..51

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

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

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

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

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

                                            Refactorings

                                            Further Reading

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

                                            $(document).on("click", ".dt-op-button", function() {
                                              $(this).text(nextOp[$(this).text()]);
                                              datatable.draw();
                                            });
                                            Severity: Major
                                            Found in src/browser/static/datatables/js/dataTables.extra.js and 1 other location - About 1 hr to fix
                                            src/apps/datatables/client/js/filter-bar.js on lines 34..37

                                            Duplicated Code

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

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

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

                                            Tuning

                                            This issue has a mass of 62.

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

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

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

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

                                            Refactorings

                                            Further Reading

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

                                            api.table_url = function(repo, table) {
                                              return url_base + "table/" + repo + "/" + table + "/";
                                            }
                                            Severity: Minor
                                            Found in src/browser/static/datatables/js/dataTables.extra.js and 1 other location - About 30 mins to fix
                                            src/apps/datatables/client/js/api.js on lines 19..21

                                            Duplicated Code

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

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

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

                                            Tuning

                                            This issue has a mass of 45.

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

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

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

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

                                            Refactorings

                                            Further Reading

                                            There are no issues that match your filters.

                                            Category
                                            Status