VSVverkeerskunde/gvq-api

View on GitHub
public/js/bootstrap-table.js

Summary

Maintainability
F
3 wks
Test Coverage

File bootstrap-table.js has 2745 lines of code (exceeds 250 allowed). Consider refactoring.
Open

/**
 * @author zhixin wen <wenzhixin2010@gmail.com>
 * version: 1.12.1
 * https://github.com/wenzhixin/bootstrap-table/
 */
Severity: Major
Found in public/js/bootstrap-table.js - About 1 wk to fix

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

        BootstrapTable.prototype.initPagination = function () {
            if (!this.options.pagination) {
                this.$pagination.hide();
                return;
            } else {
    Severity: Major
    Found in public/js/bootstrap-table.js - About 1 day to fix

      Function initRow has 161 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          BootstrapTable.prototype.initRow = function(item, i, data, parentDom) {
              var that=this,
                  key,
                  html = [],
                  style = {},
      Severity: Major
      Found in public/js/bootstrap-table.js - About 6 hrs to fix

        Function initToolbar has 152 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            BootstrapTable.prototype.initToolbar = function () {
                var that = this,
                    html = [],
                    timeoutId = 0,
                    $keepOpen,
        Severity: Major
        Found in public/js/bootstrap-table.js - About 6 hrs to fix

          Function initHeader has 141 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              BootstrapTable.prototype.initHeader = function () {
                  var that = this,
                      visibleColumns = {},
                      html = [];
          
          
          Severity: Major
          Found in public/js/bootstrap-table.js - About 5 hrs to fix

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

                BootstrapTable.prototype.initBody = function (fixedScroll) {
                    var that = this,
                        html = [],
                        data = this.getData();
            
            
            Severity: Major
            Found in public/js/bootstrap-table.js - About 5 hrs to fix

              Function initServer has 81 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  BootstrapTable.prototype.initServer = function (silent, query, url) {
                      var that = this,
                          data = {},
                          index = $.inArray(this.options.sortName, this.header.fields),
                          params = {
              Severity: Major
              Found in public/js/bootstrap-table.js - About 3 hrs to fix

                Function initTable has 77 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    BootstrapTable.prototype.initTable = function () {
                        var that = this,
                            columns = [],
                            data = [];
                
                
                Severity: Major
                Found in public/js/bootstrap-table.js - About 3 hrs to fix

                  Consider simplifying this complex logical expression.
                  Open

                              if (column.checkbox || column.radio) {
                                  type = column.checkbox ? 'checkbox' : type;
                                  type = column.radio ? 'radio' : type;
                  
                                  text = [sprintf(that.options.cardView ?
                  Severity: Critical
                  Found in public/js/bootstrap-table.js - About 3 hrs to fix

                    Function initSort has 69 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        BootstrapTable.prototype.initSort = function () {
                            var that = this,
                                name = this.options.sortName,
                                order = this.options.sortOrder === 'desc' ? -1 : 1,
                                index = $.inArray(this.options.sortName, this.header.fields),
                    Severity: Major
                    Found in public/js/bootstrap-table.js - About 2 hrs to fix

                      Function fitHeader has 65 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          BootstrapTable.prototype.fitHeader = function () {
                              var that = this,
                                  fixedBody,
                                  scrollWidth,
                                  focused,
                      Severity: Major
                      Found in public/js/bootstrap-table.js - About 2 hrs to fix

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

                            BootstrapTable.prototype.initSearch = function () {
                                var that = this;
                        
                                if (this.options.sidePagination !== 'server') {
                                    if (this.options.customSearch !== $.noop) {
                        Severity: Major
                        Found in public/js/bootstrap-table.js - About 2 hrs to fix

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

                              BootstrapTable.prototype.resetFooter = function () {
                                  var that = this,
                                      data = that.getData(),
                                      html = [];
                          
                          
                          Severity: Minor
                          Found in public/js/bootstrap-table.js - About 1 hr to fix

                            Function initContainer has 41 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                BootstrapTable.prototype.initContainer = function () {
                                    this.$container = $([
                                        '<div class="bootstrap-table">',
                                        '<div class="fixed-table-toolbar"></div>',
                                        this.options.paginationVAlign === 'top' || this.options.paginationVAlign === 'both' ?
                            Severity: Minor
                            Found in public/js/bootstrap-table.js - About 1 hr to fix

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

                                  BootstrapTable.prototype.resetView = function (params) {
                                      var padding = 0;
                              
                                      if (params && params.height) {
                                          this.options.height = params.height;
                              Severity: Minor
                              Found in public/js/bootstrap-table.js - About 1 hr to fix

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

                                    var objectKeys = function () {
                                        // From https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/keys
                                        if (!Object.keys) {
                                            Object.keys = (function() {
                                                var hasOwnProperty = Object.prototype.hasOwnProperty,
                                Severity: Minor
                                Found in public/js/bootstrap-table.js - About 1 hr to fix

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

                                              this.data = s ? $.grep(this.data, function (item, i) {
                                                  for (var j = 0; j < that.header.fields.length; j++) {
                                  
                                                      if (!that.header.searchables[j]) {
                                                          continue;
                                  Severity: Minor
                                  Found in public/js/bootstrap-table.js - About 1 hr to fix

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

                                        BootstrapTable.prototype.expandAllRows = function (isSubTable) {
                                            if (isSubTable) {
                                                var $tr = this.$body.find(sprintf('> tr[data-index="%s"]', 0)),
                                                    that = this,
                                                    detailIcon = null,
                                    Severity: Minor
                                    Found in public/js/bootstrap-table.js - About 1 hr to fix

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

                                          var setFieldIndex = function (columns) {
                                              var i, j, k,
                                                  totalCol = 0,
                                                  flag = [];
                                      
                                      
                                      Severity: Minor
                                      Found in public/js/bootstrap-table.js - About 1 hr to fix

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

                                                    Object.keys = (function() {
                                                        var hasOwnProperty = Object.prototype.hasOwnProperty,
                                                            hasDontEnumBug = !({ toString: null }).propertyIsEnumerable('toString'),
                                                            dontEnums = [
                                                                'toString',
                                        Severity: Minor
                                        Found in public/js/bootstrap-table.js - About 1 hr to fix

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

                                              BootstrapTable.prototype.getRowByUniqueId = function (id) {
                                                  var uniqueId = this.options.uniqueId,
                                                      len = this.options.data.length,
                                                      dataRow = null,
                                                      i, row, rowUniqueId;
                                          Severity: Minor
                                          Found in public/js/bootstrap-table.js - About 1 hr to fix

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

                                                var compareObjects = function (objectA, objectB, compareLength) {
                                                    // Create arrays of property names
                                                    var getOwnPropertyNames = Object.getOwnPropertyNames || function (obj) {
                                                        var arr = [];
                                                        for (var k in obj) {
                                            Severity: Minor
                                            Found in public/js/bootstrap-table.js - About 1 hr to fix

                                              Avoid deeply nested control flow statements.
                                              Open

                                                                          if (value[props[prop_index]] != null) {
                                                                              value = value[props[prop_index]];
                                                                          }
                                              Severity: Major
                                              Found in public/js/bootstrap-table.js - About 45 mins to fix

                                                Avoid deeply nested control flow statements.
                                                Open

                                                                            if ((value + '').toLowerCase() === s) {
                                                                                return true;
                                                                            }
                                                Severity: Major
                                                Found in public/js/bootstrap-table.js - About 45 mins to fix

                                                  Avoid deeply nested control flow statements.
                                                  Open

                                                                              if ((value + '').toLowerCase().indexOf(s) !== -1) {
                                                                                  return true;
                                                                              }
                                                  Severity: Major
                                                  Found in public/js/bootstrap-table.js - About 45 mins to fix

                                                    Avoid too many return statements within this function.
                                                    Open

                                                                        return order * -1;
                                                    Severity: Major
                                                    Found in public/js/bootstrap-table.js - About 30 mins to fix

                                                      Avoid too many return statements within this function.
                                                      Open

                                                                          return 0;
                                                      Severity: Major
                                                      Found in public/js/bootstrap-table.js - About 30 mins to fix

                                                        Avoid too many return statements within this function.
                                                        Open

                                                                            return order;
                                                        Severity: Major
                                                        Found in public/js/bootstrap-table.js - About 30 mins to fix

                                                          Avoid too many return statements within this function.
                                                          Open

                                                                          return order;
                                                          Severity: Major
                                                          Found in public/js/bootstrap-table.js - About 30 mins to fix

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

                                                                    if (this.options.showRefresh) {
                                                                        html.push(sprintf('<button class="btn' +
                                                                                sprintf(' btn-%s', this.options.buttonsClass) +
                                                                                sprintf(' btn-%s', this.options.iconSize) +
                                                                                '" type="button" name="refresh" aria-label="refresh" title="%s">',
                                                            Severity: Major
                                                            Found in public/js/bootstrap-table.js and 3 other locations - About 3 hrs to fix
                                                            public/js/bootstrap-table.js on lines 1138..1146
                                                            public/js/bootstrap-table.js on lines 1163..1171
                                                            public/js/bootstrap-table.js on lines 1173..1181

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

                                                            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

                                                                    if (this.options.showFullscreen) {
                                                                        html.push(sprintf('<button class="btn' +
                                                                                sprintf(' btn-%s', this.options.buttonsClass) +
                                                                                sprintf(' btn-%s', this.options.iconSize) +
                                                                                '" type="button" name="fullscreen" aria-label="fullscreen" title="%s">',
                                                            Severity: Major
                                                            Found in public/js/bootstrap-table.js and 3 other locations - About 3 hrs to fix
                                                            public/js/bootstrap-table.js on lines 1138..1146
                                                            public/js/bootstrap-table.js on lines 1153..1161
                                                            public/js/bootstrap-table.js on lines 1163..1171

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

                                                            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

                                                                    if (this.options.showPaginationSwitch) {
                                                                        html.push(sprintf('<button class="btn' +
                                                                                sprintf(' btn-%s', this.options.buttonsClass) +
                                                                                sprintf(' btn-%s', this.options.iconSize) +
                                                                                '" type="button" name="paginationSwitch" aria-label="pagination Switch" title="%s">',
                                                            Severity: Major
                                                            Found in public/js/bootstrap-table.js and 3 other locations - About 3 hrs to fix
                                                            public/js/bootstrap-table.js on lines 1153..1161
                                                            public/js/bootstrap-table.js on lines 1163..1171
                                                            public/js/bootstrap-table.js on lines 1173..1181

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

                                                            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

                                                                    if (this.options.showToggle) {
                                                                        html.push(sprintf('<button class="btn' +
                                                                                sprintf(' btn-%s', this.options.buttonsClass) +
                                                                                sprintf(' btn-%s', this.options.iconSize) +
                                                                                '" type="button" name="toggle" aria-label="toggle" title="%s">',
                                                            Severity: Major
                                                            Found in public/js/bootstrap-table.js and 3 other locations - About 3 hrs to fix
                                                            public/js/bootstrap-table.js on lines 1138..1146
                                                            public/js/bootstrap-table.js on lines 1153..1161
                                                            public/js/bootstrap-table.js on lines 1173..1181

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

                                                            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

                                                                    3: {
                                                                        buttonsClass: 'default',
                                                                        iconsPrefix: 'glyphicon',
                                                                        icons: {
                                                                            paginationSwitchDown: 'glyphicon-collapse-down icon-chevron-down',
                                                            Severity: Major
                                                            Found in public/js/bootstrap-table.js and 1 other location - About 3 hrs to fix
                                                            public/js/bootstrap-table.js on lines 38..57

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

                                                            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

                                                                    4: {
                                                                        buttonsClass: 'secondary',
                                                                        iconsPrefix: 'fa',
                                                                        icons: {
                                                                            paginationSwitchDown: 'fa-toggle-down',
                                                            Severity: Major
                                                            Found in public/js/bootstrap-table.js and 1 other location - About 3 hrs to fix
                                                            public/js/bootstrap-table.js on lines 18..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 98.

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

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

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

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

                                                            Refactorings

                                                            Further Reading

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

                                                                    if (isSubTable) {
                                                                        var $tr = this.$body.find(sprintf('> tr[data-index="%s"]', 0)),
                                                                            that = this,
                                                                            detailIcon = null,
                                                                            executeInterval = false,
                                                            Severity: Major
                                                            Found in public/js/bootstrap-table.js and 1 other location - About 2 hrs to fix
                                                            public/js/bootstrap-table.js on lines 3183..3190

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

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

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

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

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

                                                            Refactorings

                                                            Further Reading

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

                                                                    if (isSubTable) {
                                                                        this.expandRow_(false, 0);
                                                                    } else {
                                                                        var trs = this.$body.children();
                                                                        for (var i = 0; i < trs.length; i++) {
                                                            Severity: Major
                                                            Found in public/js/bootstrap-table.js and 1 other location - About 2 hrs to fix
                                                            public/js/bootstrap-table.js on lines 3145..3179

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

                                                            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

                                                                BootstrapTable.prototype.append = function (data) {
                                                                    this.initData(data, 'append');
                                                                    this.initSearch();
                                                                    this.initPagination();
                                                                    this.initSort();
                                                            Severity: Major
                                                            Found in public/js/bootstrap-table.js and 1 other location - About 1 hr to fix
                                                            public/js/bootstrap-table.js on lines 2550..2556

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

                                                            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

                                                                BootstrapTable.prototype.prepend = function (data) {
                                                                    this.initData(data, 'prepend');
                                                                    this.initSearch();
                                                                    this.initPagination();
                                                                    this.initSort();
                                                            Severity: Major
                                                            Found in public/js/bootstrap-table.js and 1 other location - About 1 hr to fix
                                                            public/js/bootstrap-table.js on lines 2542..2548

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

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

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

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

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

                                                            Refactorings

                                                            Further Reading

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

                                                                    if (this.options.showPaginationSwitch) {
                                                                        this.$toolbar.find('button[name="paginationSwitch"]')
                                                                            .off('click').on('click', $.proxy(this.togglePagination, this));
                                                                    }
                                                            Severity: Major
                                                            Found in public/js/bootstrap-table.js and 2 other locations - About 1 hr to fix
                                                            public/js/bootstrap-table.js on lines 1148..1151
                                                            public/js/bootstrap-table.js on lines 1228..1231

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

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

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

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

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

                                                            Refactorings

                                                            Further Reading

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

                                                                    if (this.options.showFullscreen) {
                                                                        this.$toolbar.find('button[name="fullscreen"]')
                                                                            .off('click').on('click', $.proxy(this.toggleFullscreen, this));
                                                                    }
                                                            Severity: Major
                                                            Found in public/js/bootstrap-table.js and 2 other locations - About 1 hr to fix
                                                            public/js/bootstrap-table.js on lines 1223..1226
                                                            public/js/bootstrap-table.js on lines 1228..1231

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

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

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

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

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

                                                            Refactorings

                                                            Further Reading

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

                                                                    if (this.options.showRefresh) {
                                                                        this.$toolbar.find('button[name="refresh"]')
                                                                            .off('click').on('click', $.proxy(this.refresh, this));
                                                                    }
                                                            Severity: Major
                                                            Found in public/js/bootstrap-table.js and 2 other locations - About 1 hr to fix
                                                            public/js/bootstrap-table.js on lines 1148..1151
                                                            public/js/bootstrap-table.js on lines 1223..1226

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

                                                            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

                                                                            params.limit = this.options.pageSize === this.options.formatAllRows() ?
                                                                                this.options.totalRows : this.options.pageSize;
                                                            Severity: Major
                                                            Found in public/js/bootstrap-table.js and 1 other location - About 1 hr to fix
                                                            public/js/bootstrap-table.js on lines 2081..2082

                                                            Duplicated Code

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

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

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

                                                            Tuning

                                                            This issue has a mass of 56.

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

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

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

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

                                                            Refactorings

                                                            Further Reading

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

                                                                        params.pageSize = this.options.pageSize === this.options.formatAllRows() ?
                                                                            this.options.totalRows : this.options.pageSize;
                                                            Severity: Major
                                                            Found in public/js/bootstrap-table.js and 1 other location - About 1 hr to fix
                                                            public/js/bootstrap-table.js on lines 2100..2101

                                                            Duplicated Code

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

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

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

                                                            Tuning

                                                            This issue has a mass of 56.

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

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

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

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

                                                            Refactorings

                                                            Further Reading

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

                                                                    if (style && style.css) {
                                                                        for (key in style.css) {
                                                                            csses.push(key + ': ' + style.css[key]);
                                                                        }
                                                                    }
                                                            Severity: Major
                                                            Found in public/js/bootstrap-table.js and 1 other location - About 1 hr to fix
                                                            public/js/bootstrap-table.js on lines 2349..2353

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

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

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

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

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

                                                            Refactorings

                                                            Further Reading

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

                                                                        if (style && style.css) {
                                                                            for (key in style.css) {
                                                                                csses.push(key + ': ' + style.css[key]);
                                                                            }
                                                                        }
                                                            Severity: Major
                                                            Found in public/js/bootstrap-table.js and 1 other location - About 1 hr to fix
                                                            public/js/bootstrap-table.js on lines 1711..1715

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

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

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

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

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

                                                            Refactorings

                                                            Further Reading

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

                                                                        if ($items.filter(':checked').length <= this.options.minimumCountColumns) {
                                                                            $items.filter(':checked').prop('disabled', true);
                                                                        }
                                                            Severity: Minor
                                                            Found in public/js/bootstrap-table.js and 1 other location - About 50 mins to fix
                                                            public/js/bootstrap-table.js on lines 3037..3039

                                                            Duplicated Code

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

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

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

                                                            Tuning

                                                            This issue has a mass of 51.

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

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

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

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

                                                            Refactorings

                                                            Further Reading

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

                                                                        if ($items.filter(':checked').length <= this.options.minimumCountColumns) {
                                                                            $items.filter(':checked').prop('disabled', true);
                                                                        }
                                                            Severity: Minor
                                                            Found in public/js/bootstrap-table.js and 1 other location - About 50 mins to fix
                                                            public/js/bootstrap-table.js on lines 2438..2440

                                                            Duplicated Code

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

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

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

                                                            Tuning

                                                            This issue has a mass of 51.

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

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

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

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

                                                            Refactorings

                                                            Further Reading

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

                                                                    if (this.options.cardView) {
                                                                        $icon.removeClass(this.options.icons.toggleOff);
                                                                        $icon.addClass(this.options.icons.toggleOn);
                                                                    } else {
                                                            Severity: Minor
                                                            Found in public/js/bootstrap-table.js and 1 other location - About 40 mins to fix
                                                            public/js/bootstrap-table.js on lines 3104..3107

                                                            Duplicated Code

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

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

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

                                                            Tuning

                                                            This issue has a mass of 49.

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

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

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

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

                                                            Refactorings

                                                            Further Reading

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

                                                                    } else {
                                                                        $icon.removeClass(this.options.icons.toggleOn);
                                                                        $icon.addClass(this.options.icons.toggleOff);
                                                                    }
                                                            Severity: Minor
                                                            Found in public/js/bootstrap-table.js and 1 other location - About 40 mins to fix
                                                            public/js/bootstrap-table.js on lines 3101..3104

                                                            Duplicated Code

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

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

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

                                                            Tuning

                                                            This issue has a mass of 49.

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

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

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

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

                                                            Refactorings

                                                            Further Reading

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

                                                                    this.timeoutFooter_ = setTimeout($.proxy(this.fitFooter, this),
                                                                        this.$el.is(':hidden') ? 100 : 0);
                                                            Severity: Minor
                                                            Found in public/js/bootstrap-table.js and 1 other location - About 35 mins to fix
                                                            public/js/bootstrap-table.js on lines 2229..2229

                                                            Duplicated Code

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

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

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

                                                            Tuning

                                                            This issue has a mass of 47.

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

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

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

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

                                                            Refactorings

                                                            Further Reading

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

                                                                    this.timeoutId_ = setTimeout($.proxy(this.fitHeader, this), this.$el.is(':hidden') ? 100 : 0);
                                                            Severity: Minor
                                                            Found in public/js/bootstrap-table.js and 1 other location - About 35 mins to fix
                                                            public/js/bootstrap-table.js on lines 2369..2370

                                                            Duplicated Code

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

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

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

                                                            Tuning

                                                            This issue has a mass of 47.

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

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

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

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

                                                            Refactorings

                                                            Further Reading

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

                                                                            $this.find('i').attr('class', sprintf('%s %s', that.options.iconsPrefix, that.options.icons.detailOpen));
                                                            Severity: Minor
                                                            Found in public/js/bootstrap-table.js and 1 other location - About 35 mins to fix
                                                            public/js/bootstrap-table.js on lines 1979..1979

                                                            Duplicated Code

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

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

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

                                                            Tuning

                                                            This issue has a mass of 46.

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

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

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

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

                                                            Refactorings

                                                            Further Reading

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

                                                                    if (!params.hasOwnProperty('index') ||
                                                                        !params.hasOwnProperty('field') ||
                                                                        !params.hasOwnProperty('value')) {
                                                                        return;
                                                                    }
                                                            Severity: Minor
                                                            Found in public/js/bootstrap-table.js and 1 other location - About 35 mins to fix
                                                            public/js/bootstrap-table.js on lines 2818..2822

                                                            Duplicated Code

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

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

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

                                                            Tuning

                                                            This issue has a mass of 46.

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

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

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

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

                                                            Refactorings

                                                            Further Reading

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

                                                                    if (!params.hasOwnProperty('id') ||
                                                                        !params.hasOwnProperty('field') ||
                                                                        !params.hasOwnProperty('value')) {
                                                                        return;
                                                                    }
                                                            Severity: Minor
                                                            Found in public/js/bootstrap-table.js and 1 other location - About 35 mins to fix
                                                            public/js/bootstrap-table.js on lines 2802..2806

                                                            Duplicated Code

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

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

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

                                                            Tuning

                                                            This issue has a mass of 46.

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

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

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

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

                                                            Refactorings

                                                            Further Reading

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

                                                                            $this.find('i').attr('class', sprintf('%s %s', that.options.iconsPrefix, that.options.icons.detailClose));
                                                            Severity: Minor
                                                            Found in public/js/bootstrap-table.js and 1 other location - About 35 mins to fix
                                                            public/js/bootstrap-table.js on lines 1975..1975

                                                            Duplicated Code

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

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

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

                                                            Tuning

                                                            This issue has a mass of 46.

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

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

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

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

                                                            Refactorings

                                                            Further Reading

                                                            There are no issues that match your filters.

                                                            Category
                                                            Status