estimancy/projestimate

View on GitHub
app/assets/javascripts/tablesorter.min.js

Summary

Maintainability
F
3 wks
Test Coverage

File tablesorter.min.js has 1654 lines of code (exceeds 250 allowed). Consider refactoring.
Open

/*! tableSorter (FORK) 2.16+ widgets - updated 12/22/2014 (v2.18.4)
 *
 * Column Styles
 * Column Filters
 * Column Resizing
Severity: Major
Found in app/assets/javascripts/tablesorter.min.js - About 4 days to fix

    Function findRows has 200 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

            findRows: function(table, filters, combinedFilters) {
                if (table.config.lastCombinedFilter === combinedFilters || !table.config.widgetOptions.filter_initialized) { return; }
                var len, $rows, rowIndex, tbodyIndex, $tbody, $cells, $cell, columnIndex,
                    childRow, lastSearch, hasSelect, matches, result, showRow, time, val, indx,
                    notFiltered, searchFiltered, filterMatched, excludeMatch, fxn, ffxn,
    Severity: Major
    Found in app/assets/javascripts/tablesorter.min.js - About 1 day to fix

      Function format has 138 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

              format: function(table, c, wo) {
                  // filter widget doesn't initialize on an empty table. Fixes #449
                  if ( c.$table.hasClass('hasStickyHeaders') || ($.inArray('filter', c.widgets) >= 0 && !c.$table.hasClass('hasFilters')) ) {
                      return;
                  }
      Severity: Major
      Found in app/assets/javascripts/tablesorter.min.js - About 5 hrs to fix

        Function init has 131 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

                init: function(table, c, wo) {
                    // filter language options
                    ts.language = $.extend(true, {}, {
                        to  : 'to',
                        or  : 'or',
        Severity: Major
        Found in app/assets/javascripts/tablesorter.min.js - About 5 hrs to fix

          Function format has 106 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

                  format: function(table, c, wo) {
                      if (c.$table.hasClass('hasResizable')) { return; }
                      c.$table.addClass('hasResizable');
                      ts.resizableReset(table, true); // set default widths
                      var $rows, $columns, $column, column, timer,
          Severity: Major
          Found in app/assets/javascripts/tablesorter.min.js - About 4 hrs to fix

            Consider simplifying this complex logical expression.
            Open

                                if (searchFiltered) {
                                    // cycle through all filters; include last (columnIndex + 1 = match any column). Fixes #669
                                    for (indx = 0; indx < columnIndex + 1; indx++) {
                                        val = filters[indx] || '';
                                        // break out of loop if we've already determined not to search filtered rows
            Severity: Critical
            Found in app/assets/javascripts/tablesorter.min.js - About 3 hrs to fix

              Function format has 67 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                      format: function(table, c, wo) {
                          var i, time, classes, $header, $icon, $tfoot, $h, oldtheme, oldremove,
                              themesAll = ts.themes,
                              $table = c.$table,
                              $headers = c.$headers,
              Severity: Major
              Found in app/assets/javascripts/tablesorter.min.js - About 2 hrs to fix

                Function buildRow has 51 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                        buildRow: function(table, c, wo) {
                            var col, column, $header, buildSelect, disabled, name, ffxn,
                            // c.columns defined in computeThIndexes()
                                columns = c.columns,
                                arry = $.isArray(wo.filter_cellFilter),
                Severity: Major
                Found in app/assets/javascripts/tablesorter.min.js - About 2 hrs to fix

                  Function getFilters has 51 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      ts.getFilters = function(table, getRaw, setFilters, skipFirst) {
                          var i, $filters, $column, cols,
                              filters = false,
                              c = table ? $(table)[0].config : '',
                              wo = c ? c.widgetOptions : '';
                  Severity: Major
                  Found in app/assets/javascripts/tablesorter.min.js - About 2 hrs to fix

                    Function getOptionSource has 50 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                            getOptionSource: function(table, column, onlyAvail) {
                                var cts,
                                    c = table.config,
                                    wo = c.widgetOptions,
                                    parsed = [],
                    Severity: Minor
                    Found in app/assets/javascripts/tablesorter.min.js - About 2 hrs to fix

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

                          ts.storage = function(table, key, value, options) {
                              table = $(table)[0];
                              var cookieIndex, cookies, date,
                                  hasLocalStorage = false,
                                  values = {},
                      Severity: Minor
                      Found in app/assets/javascripts/tablesorter.min.js - About 1 hr to fix

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

                                bindSearch: function(table, $el, internal) {
                                    table = $(table)[0];
                                    $el = $($el); // allow passing a selector string
                                    if (!$el.length) { return; }
                                    var c = table.config,
                        Severity: Minor
                        Found in app/assets/javascripts/tablesorter.min.js - About 1 hr to fix

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

                                  format: function(table, c, wo) {
                                      var $tbody, tbodyIndex, $rows, rows, $row, $cells, remove, indx,
                                          $table = c.$table,
                                          $tbodies = c.$tbodies,
                                          sortList = c.sortList,
                          Severity: Minor
                          Found in app/assets/javascripts/tablesorter.min.js - About 1 hr to fix

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

                                    buildSelect: function(table, column, arry, updating, onlyAvail) {
                                        table = $(table)[0];
                                        column = parseInt(column, 10);
                                        if (!table.config.cache || $.isEmptyObject(table.config.cache)) { return; }
                                        var indx, val, txt, t, $filters, $filter,
                            Severity: Minor
                            Found in app/assets/javascripts/tablesorter.min.js - About 1 hr to fix

                              Function addHeaderResizeEvent has 36 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                  ts.addHeaderResizeEvent = function(table, disable, settings) {
                                      table = $(table)[0]; // make sure we're usig a dom element
                                      var headers,
                                          defaults = {
                                              timer : 250
                              Severity: Minor
                              Found in app/assets/javascripts/tablesorter.min.js - About 1 hr to fix

                                Function checkFilters has 36 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                        checkFilters: function(table, filter, skipFirst) {
                                            var c = table.config,
                                                wo = c.widgetOptions,
                                                filterArray = $.isArray(filter),
                                                filters = (filterArray) ? filter : ts.getFilters(table, true),
                                Severity: Minor
                                Found in app/assets/javascripts/tablesorter.min.js - About 1 hr to fix

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

                                          multipleColumns: function( c, $input ) {
                                              // look for multiple columns "1-3,4-6,8" in data-column
                                              var ranges, singles, indx,
                                                  wo = c.widgetOptions,
                                              // only target "all" column inputs on initialization
                                  Severity: Minor
                                  Found in app/assets/javascripts/tablesorter.min.js - About 1 hr to fix

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

                                            format: function(table, c, wo, init) {
                                                var stored, time,
                                                    $table = c.$table,
                                                    saveSort = wo.saveSort !== false, // make saveSort active/inactive; default to true
                                                    sortList = { "sortList" : c.sortList };
                                    Severity: Minor
                                    Found in app/assets/javascripts/tablesorter.min.js - About 1 hr to fix

                                      Consider simplifying this complex logical expression.
                                      Open

                                                          } else if ( this.value !== '' && (
                                                              // liveSearch can contain a min value length; ignore arrow and meta keys, but allow backspace
                                                              ( typeof wo.filter_liveSearch === 'number' && this.value.length < wo.filter_liveSearch ) ||
                                                                  // let return & backspace continue on, but ignore arrows & non-valid characters
                                                                  ( event.which !== 13 && event.which !== 8 && ( event.which < 32 || (event.which >= 37 && event.which <= 40) ) ) ) ) {
                                      Severity: Critical
                                      Found in app/assets/javascripts/tablesorter.min.js - About 1 hr to fix

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

                                                hideFilters: function(table, c) {
                                                    var $filterRow, $filterRow2, timer;
                                                    $(table)
                                                        .find('.' + ts.css.filterRow)
                                                        .addClass('hideme')
                                        Severity: Minor
                                        Found in app/assets/javascripts/tablesorter.min.js - About 1 hr to fix

                                          Consider simplifying this complex logical expression.
                                          Open

                                                              if ((wo.filter_$anyMatch && wo.filter_$anyMatch.length) || filters[c.columns]) {
                                                                  data.anyMatchFlag = true;
                                                                  data.anyMatchFilter = wo.filter_$anyMatch && ts.filter.getLatestSearch( wo.filter_$anyMatch ).val() || filters[c.columns] || '';
                                                                  if (c.sortLocaleCompare) {
                                                                      // replace accents
                                          Severity: Major
                                          Found in app/assets/javascripts/tablesorter.min.js - About 1 hr to fix

                                            Consider simplifying this complex logical expression.
                                            Open

                                                            if ( ts.filter.regex.toTest.test(data.iFilter) ) {
                                                                var result, tmp,
                                                                    table = c.table,
                                                                    index = data.index,
                                                                    parsed = data.parsed[index],
                                            Severity: Major
                                            Found in app/assets/javascripts/tablesorter.min.js - About 1 hr to fix

                                              Avoid deeply nested control flow statements.
                                              Open

                                                                              if ($.inArray(type, noAnyMatch) < 0) {
                                                                                  matches = typeFunction( c, data );
                                                                                  if (matches !== null) {
                                                                                      filterMatched = matches;
                                                                                      return false;
                                              Severity: Major
                                              Found in app/assets/javascripts/tablesorter.min.js - About 45 mins to fix

                                                Avoid deeply nested control flow statements.
                                                Open

                                                                        if (i === c.columns && $column.length) {
                                                                            wo.filter_$anyMatch = $column;
                                                                        }
                                                Severity: Major
                                                Found in app/assets/javascripts/tablesorter.min.js - About 45 mins to fix

                                                  Avoid deeply nested control flow statements.
                                                  Open

                                                                              if (filterMatched !== null) {
                                                                                  showRow = filterMatched;
                                                                              } else {
                                                                                  if (wo.filter_startsWith) {
                                                                                      showRow = false;
                                                  Severity: Major
                                                  Found in app/assets/javascripts/tablesorter.min.js - About 45 mins to fix

                                                    Avoid deeply nested control flow statements.
                                                    Open

                                                                                if (data.filter) {
                                                                                    data.cache = data.cacheArray[columnIndex];
                                                                                    // check if column data should be from the cell or from parsed data
                                                                                    if (wo.filter_useParsedData || data.parsed[columnIndex]) {
                                                                                        data.exact = data.cache;
                                                    Severity: Major
                                                    Found in app/assets/javascripts/tablesorter.min.js - About 45 mins to fix

                                                      Avoid deeply nested control flow statements.
                                                      Open

                                                                                  for (string in fxn) {
                                                                                      if (typeof string === 'string') {
                                                                                          options += options === '' ?
                                                                                              '<option value="">' + ($header.data('placeholder') || $header.attr('data-placeholder') || wo.filter_placeholder.select || '') + '</option>' : '';
                                                                                          val = string;
                                                      Severity: Major
                                                      Found in app/assets/javascripts/tablesorter.min.js - About 45 mins to fix

                                                        Avoid deeply nested control flow statements.
                                                        Open

                                                                                if ($.isArray(setFilters)) {
                                                                                    // skip first (latest input) to maintain cursor position while typing
                                                                                    if (skipFirst) { $column.slice(1); }
                                                                                    if (i === c.columns) {
                                                                                        // prevent data-column="all" from filling data-column="0,1" (etc)
                                                        Severity: Major
                                                        Found in app/assets/javascripts/tablesorter.min.js - About 45 mins to fix

                                                          Avoid deeply nested control flow statements.
                                                          Open

                                                                                      if (!searchFiltered) { indx = columnIndex; }
                                                          Severity: Major
                                                          Found in app/assets/javascripts/tablesorter.min.js - About 45 mins to fix

                                                            Avoid deeply nested control flow statements.
                                                            Open

                                                                                        if (cell) {
                                                                                            arry.push( $.trim( cell.textContent || cell.innerText || $(cell).text() ) );
                                                                                        }
                                                            Severity: Major
                                                            Found in app/assets/javascripts/tablesorter.min.js - About 45 mins to fix

                                                              Avoid deeply nested control flow statements.
                                                              Open

                                                                                              for (indx = 1; indx < len; indx++) {
                                                                                                  // secondary, tertiary, etc sort column classes
                                                                                                  $cells.eq(sortList[indx][0]).addClass( css[indx] || css[last] );
                                                                                              }
                                                              Severity: Major
                                                              Found in app/assets/javascripts/tablesorter.min.js - About 45 mins to fix

                                                                Avoid deeply nested control flow statements.
                                                                Open

                                                                                                if ( $.inArray(i, columnIndex) > -1 ) {
                                                                                                    var txt;
                                                                                                    if (data.parsed[i]) {
                                                                                                        txt = data.cacheArray[i];
                                                                                                    } else {
                                                                Severity: Major
                                                                Found in app/assets/javascripts/tablesorter.min.js - About 45 mins to fix

                                                                  Consider simplifying this complex logical expression.
                                                                  Open

                                                                                  if (combinedFilters === '' || wo.filter_serversideFiltering) {
                                                                                      $rows.removeClass(wo.filter_filteredRow).not('.' + c.cssChildRow).show();
                                                                                  } else {
                                                                                      // filter out child rows
                                                                                      $rows = $rows.not('.' + c.cssChildRow);
                                                                  Severity: Major
                                                                  Found in app/assets/javascripts/tablesorter.min.js - About 40 mins to fix

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

                                                                            buildSelect: function(table, column, arry, updating, onlyAvail) {
                                                                    Severity: Minor
                                                                    Found in app/assets/javascripts/tablesorter.min.js - About 35 mins to fix

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

                                                                              parseFilter: function(c, filter, column, parsed, forceParse){
                                                                      Severity: Minor
                                                                      Found in app/assets/javascripts/tablesorter.min.js - About 35 mins to fix

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

                                                                            ts.addWidget({
                                                                                id: 'saveSort',
                                                                                priority: 20,
                                                                                options: {
                                                                                    saveSort : true
                                                                        Severity: Major
                                                                        Found in app/assets/javascripts/tablesorter.min.js and 1 other location - About 3 days to fix
                                                                        app/assets/javascripts/pager.js on lines 2840..2895

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

                                                                        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

                                                                                remove: function(table, c, wo) {
                                                                                    var tbodyIndex, $tbody,
                                                                                        $tbodies = c.$tbodies,
                                                                                        remove = (wo.columns || [ "primary", "secondary", "tertiary" ]).join(' ');
                                                                                    c.$headers.removeClass(remove);
                                                                        Severity: Major
                                                                        Found in app/assets/javascripts/tablesorter.min.js and 1 other location - About 1 day to fix
                                                                        app/assets/javascripts/pager.js on lines 2000..2013

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

                                                                        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

                                                                                        $rows.each(function() {
                                                                                            $row = $(this);
                                                                                            if (this.style.display !== 'none') {
                                                                                                // remove all columns class names
                                                                                                $cells = $row.children().removeClass(remove);
                                                                        Severity: Major
                                                                        Found in app/assets/javascripts/tablesorter.min.js and 1 other location - About 1 day to fix
                                                                        app/assets/javascripts/pager.js on lines 1958..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 197.

                                                                        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 ((value || value === '') && window.JSON && JSON.hasOwnProperty('stringify')) {
                                                                                    // add unique identifiers = url pathname > table ID/index on page > data
                                                                                    if (!values[url]) {
                                                                                        values[url] = {};
                                                                                    }
                                                                        Severity: Major
                                                                        Found in app/assets/javascripts/tablesorter.min.js and 1 other location - About 6 hrs to fix
                                                                        app/assets/javascripts/pager.js on lines 1781..1797

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

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

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

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

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

                                                                        Refactorings

                                                                        Further Reading

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

                                                                                    for (tbodyIndex = 0; tbodyIndex < $tbodies.length; tbodyIndex++ ) {
                                                                                        $tbody = ts.processTbody(table, $tbodies.eq(tbodyIndex), true); // remove tbody
                                                                                        $tbody.children().removeClass(wo.filter_filteredRow).show();
                                                                                        ts.processTbody(table, $tbody, false); // restore tbody
                                                                                    }
                                                                        Severity: Major
                                                                        Found in app/assets/javascripts/tablesorter.min.js and 1 other location - About 3 hrs to fix
                                                                        app/assets/javascripts/pager.js on lines 2502..2506

                                                                        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 ( buildFilter && (buildFilter.parent().length === 0 ||
                                                                                                    (buildFilter.parent().length && buildFilter.parent()[0] !== c.$filters[column])) ) {
                                                                                                    c.$filters.eq(column).append(buildFilter);
                                                                                                }
                                                                        Severity: Major
                                                                        Found in app/assets/javascripts/tablesorter.min.js and 1 other location - About 2 hrs to fix
                                                                        app/assets/javascripts/pager.js on lines 2339..2341

                                                                        Duplicated Code

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

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

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

                                                                        Tuning

                                                                        This issue has a mass of 93.

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

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

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

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

                                                                        Refactorings

                                                                        Further Reading

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

                                                                                                    $.each(ts.filter.types, function(type, typeFunction) {
                                                                                                        if ($.inArray(type, noAnyMatch) < 0) {
                                                                                                            matches = typeFunction( c, data );
                                                                                                            if (matches !== null) {
                                                                                                                filterMatched = matches;
                                                                        Severity: Major
                                                                        Found in app/assets/javascripts/tablesorter.min.js and 1 other location - About 2 hrs to fix
                                                                        app/assets/javascripts/tablesorter.min.js on lines 1313..1321

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

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

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

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

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

                                                                        Refactorings

                                                                        Further Reading

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

                                                                                                            $.each(ts.filter.types, function(type, typeFunction) {
                                                                                                                if ($.inArray(type, excludeMatch) < 0) {
                                                                                                                    matches = typeFunction( c, data );
                                                                                                                    if (matches !== null) {
                                                                                                                        filterMatched = matches;
                                                                        Severity: Major
                                                                        Found in app/assets/javascripts/tablesorter.min.js and 1 other location - About 2 hrs to fix
                                                                        app/assets/javascripts/tablesorter.min.js on lines 1233..1241

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

                                                                        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 (storedSizes) {
                                                                                        for (column in storedSizes) {
                                                                                            if (!isNaN(column) && column < c.$headers.length) {
                                                                                                c.$headers.eq(column).width(storedSizes[column]); // set saved resizable widths
                                                                                            }
                                                                        Severity: Major
                                                                        Found in app/assets/javascripts/tablesorter.min.js and 1 other location - About 2 hrs to fix
                                                                        app/assets/javascripts/pager.js on lines 2744..2750

                                                                        Duplicated Code

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

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

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

                                                                        Tuning

                                                                        This issue has a mass of 76.

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

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

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

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

                                                                        Refactorings

                                                                        Further Reading

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

                                                                                        if (len) {
                                                                                            for (indx = 0; indx < len; indx++) {
                                                                                                // add primary. secondary, tertiary, etc sort column classes
                                                                                                $rows.filter('[data-column="' + sortList[indx][0] + '"]').addClass(css[indx] || css[last]);
                                                                                            }
                                                                        Severity: Major
                                                                        Found in app/assets/javascripts/tablesorter.min.js and 1 other location - About 1 hr to fix
                                                                        app/assets/javascripts/pager.js on lines 1988..1993

                                                                        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

                                                                                if ("localStorage" in window) {
                                                                                    try {
                                                                                        window.localStorage.setItem('_tmptest', 'temp');
                                                                                        hasLocalStorage = true;
                                                                                        window.localStorage.removeItem('_tmptest');
                                                                        Severity: Major
                                                                        Found in app/assets/javascripts/tablesorter.min.js and 1 other location - About 1 hr to fix
                                                                        app/assets/javascripts/pager.js on lines 1763..1769

                                                                        Duplicated Code

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

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

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

                                                                        Tuning

                                                                        This issue has a mass of 67.

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

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

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

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

                                                                        Refactorings

                                                                        Further Reading

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

                                                                                            result = ( parsed || c.parsers[index].type === 'numeric' ) && !isNaN(range1) && !isNaN(range2) ? data.cache :
                                                                                                isNaN(data.iExact) ? ts.formatFloat( data.iExact.replace(ts.filter.regex.nondigit, ''), table) :
                                                                                                    ts.formatFloat( data.iExact, table );
                                                                        Severity: Major
                                                                        Found in app/assets/javascripts/tablesorter.min.js and 1 other location - About 1 hr to fix
                                                                        app/assets/javascripts/tablesorter.min.js on lines 466..468

                                                                        Duplicated Code

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

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

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

                                                                        Tuning

                                                                        This issue has a mass of 63.

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

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

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

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

                                                                        Refactorings

                                                                        Further Reading

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

                                                                                            cachedValue = ( parsed || parser.type === 'numeric' ) && !isNaN(query) && typeof data.cache !== 'undefined' ? data.cache :
                                                                                                isNaN(data.iExact) ? ts.formatFloat( data.iExact.replace(ts.filter.regex.nondigit, ''), table) :
                                                                                                    ts.formatFloat( data.iExact, table );
                                                                        Severity: Major
                                                                        Found in app/assets/javascripts/tablesorter.min.js and 1 other location - About 1 hr to fix
                                                                        app/assets/javascripts/tablesorter.min.js on lines 537..539

                                                                        Duplicated Code

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

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

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

                                                                        Tuning

                                                                        This issue has a mass of 63.

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

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

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

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

                                                                        Refactorings

                                                                        Further Reading

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

                                                                                    c.$table
                                                                                        .removeClass('hasResizable')
                                                                                        .children('thead')
                                                                                        .unbind('mouseup.tsresize mouseleave.tsresize contextmenu.tsresize')
                                                                                        .children('tr').children()
                                                                        Severity: Major
                                                                        Found in app/assets/javascripts/tablesorter.min.js and 1 other location - About 1 hr to fix
                                                                        app/assets/javascripts/pager.js on lines 2819..2826

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

                                                                        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

                                                                                                range2 = ts.formatFloat( ts.filter.parseFilter(c, query[1].replace(ts.filter.regex.nondigit, ''), index, parsed), table );
                                                                        Severity: Minor
                                                                        Found in app/assets/javascripts/tablesorter.min.js and 1 other location - About 55 mins to fix
                                                                        app/assets/javascripts/tablesorter.min.js on lines 528..528

                                                                        Duplicated Code

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

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

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

                                                                        Tuning

                                                                        This issue has a mass of 54.

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

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

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

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

                                                                        Refactorings

                                                                        Further Reading

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

                                                                                                range1 = ts.formatFloat( ts.filter.parseFilter(c, query[0].replace(ts.filter.regex.nondigit, ''), index, parsed), table ),
                                                                        Severity: Minor
                                                                        Found in app/assets/javascripts/tablesorter.min.js and 1 other location - About 55 mins to fix
                                                                        app/assets/javascripts/tablesorter.min.js on lines 529..529

                                                                        Duplicated Code

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

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

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

                                                                        Tuning

                                                                        This issue has a mass of 54.

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

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

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

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

                                                                        Refactorings

                                                                        Further Reading

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

                                                                                                    c.$table.find('thead').find('select.' + ts.css.filter + '[data-column="' + column + '"]').append(options);
                                                                        Severity: Minor
                                                                        Found in app/assets/javascripts/tablesorter.min.js and 1 other location - About 45 mins to fix
                                                                        app/assets/javascripts/tablesorter.min.js on lines 1476..1476

                                                                        Duplicated Code

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

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

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

                                                                        Tuning

                                                                        This issue has a mass of 50.

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

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

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

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

                                                                        Refactorings

                                                                        Further Reading

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

                                                                                                if (buildFilter && buildFilter.length === 0) {
                                                                                                    buildFilter = c.$filters.eq(column).children('input');
                                                                                                }
                                                                        Severity: Minor
                                                                        Found in app/assets/javascripts/tablesorter.min.js and 1 other location - About 45 mins to fix
                                                                        app/assets/javascripts/pager.js on lines 2337..2337

                                                                        Duplicated Code

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

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

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

                                                                        Tuning

                                                                        This issue has a mass of 50.

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

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

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

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

                                                                        Refactorings

                                                                        Further Reading

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

                                                                                    $headers
                                                                                        .unbind('mouseenter.tsuitheme mouseleave.tsuitheme') // remove hover
                                                                                        .removeClass(themes.hover + ' ' + remove + ' ' + themes.active)
                                                                                        .find('.' + ts.css.filterRow)
                                                                        Severity: Minor
                                                                        Found in app/assets/javascripts/tablesorter.min.js and 1 other location - About 45 mins to fix
                                                                        app/assets/javascripts/pager.js on lines 1920..1923

                                                                        Duplicated Code

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

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

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

                                                                        Tuning

                                                                        This issue has a mass of 50.

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

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

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

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

                                                                        Refactorings

                                                                        Further Reading

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

                                                                                        currentValue = c.$table.find('thead').find('select.' + ts.css.filter + '[data-column="' + column + '"]').val();
                                                                        Severity: Minor
                                                                        Found in app/assets/javascripts/tablesorter.min.js and 1 other location - About 45 mins to fix
                                                                        app/assets/javascripts/tablesorter.min.js on lines 692..692

                                                                        Duplicated Code

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

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

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

                                                                        Tuning

                                                                        This issue has a mass of 50.

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

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

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

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

                                                                        Refactorings

                                                                        Further Reading

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

                                                                                    if (wo.filter_$externalFilters) {
                                                                                        $filters = $filters && $filters.length ? $filters.add(wo.filter_$externalFilters) : wo.filter_$externalFilters;
                                                                                    }
                                                                        Severity: Minor
                                                                        Found in app/assets/javascripts/tablesorter.min.js and 1 other location - About 40 mins to fix
                                                                        app/assets/javascripts/tablesorter.min.js on lines 1504..1506

                                                                        Duplicated Code

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

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

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

                                                                        Tuning

                                                                        This issue has a mass of 48.

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

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

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

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

                                                                        Refactorings

                                                                        Further Reading

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

                                                                                    if (wo.filter_$externalFilters) {
                                                                                        $filters = $filters && $filters.length ? $filters.add(wo.filter_$externalFilters) : wo.filter_$externalFilters;
                                                                                    }
                                                                        Severity: Minor
                                                                        Found in app/assets/javascripts/tablesorter.min.js and 1 other location - About 40 mins to fix
                                                                        app/assets/javascripts/tablesorter.min.js on lines 1549..1551

                                                                        Duplicated Code

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

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

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

                                                                        Tuning

                                                                        This issue has a mass of 48.

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

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

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

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

                                                                        Refactorings

                                                                        Further Reading

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

                                                                                                result = c.parsers[index].format('' + query[0], table, c.$headers.eq(index), index);
                                                                        Severity: Minor
                                                                        Found in app/assets/javascripts/tablesorter.min.js and 1 other location - About 35 mins to fix
                                                                        app/assets/javascripts/tablesorter.min.js on lines 534..534

                                                                        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

                                                                                                result = c.parsers[index].format('' + query[1], table, c.$headers.eq(index), index);
                                                                        Severity: Minor
                                                                        Found in app/assets/javascripts/tablesorter.min.js and 1 other location - About 35 mins to fix
                                                                        app/assets/javascripts/tablesorter.min.js on lines 532..532

                                                                        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

                                                                                                                '<option value="">' + ($header.data('placeholder') || $header.attr('data-placeholder') || wo.filter_placeholder.select || '') + '</option>' : '';
                                                                        Severity: Minor
                                                                        Found in app/assets/javascripts/tablesorter.min.js and 1 other location - About 30 mins to fix
                                                                        app/assets/javascripts/tablesorter.min.js on lines 1474..1474

                                                                        Duplicated Code

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

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

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

                                                                        Tuning

                                                                        This issue has a mass of 45.

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

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

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

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

                                                                        Refactorings

                                                                        Further Reading

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

                                                                                            if (txt.indexOf(wo.filter_selectSourceSeparator) >= 0) {
                                                                                                t = txt.split(wo.filter_selectSourceSeparator);
                                                                                                val = t[0];
                                                                                                txt = t[1];
                                                                                            }
                                                                        Severity: Minor
                                                                        Found in app/assets/javascripts/tablesorter.min.js and 1 other location - About 30 mins to fix
                                                                        app/assets/javascripts/tablesorter.min.js on lines 684..688

                                                                        Duplicated Code

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

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

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

                                                                        Tuning

                                                                        This issue has a mass of 45.

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

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

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

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

                                                                        Refactorings

                                                                        Further Reading

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

                                                                                        options = '<option value="">' + ( node.data('placeholder') || node.attr('data-placeholder') || wo.filter_placeholder.select || '' ) + '</option>',
                                                                        Severity: Minor
                                                                        Found in app/assets/javascripts/tablesorter.min.js and 1 other location - About 30 mins to fix
                                                                        app/assets/javascripts/tablesorter.min.js on lines 681..681

                                                                        Duplicated Code

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

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

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

                                                                        Tuning

                                                                        This issue has a mass of 45.

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

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

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

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

                                                                        Refactorings

                                                                        Further Reading

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

                                                                                                            if (string.indexOf(wo.filter_selectSourceSeparator) >= 0) {
                                                                                                                val = string.split(wo.filter_selectSourceSeparator);
                                                                                                                txt = val[1];
                                                                                                                val = val[0];
                                                                                                            }
                                                                        Severity: Minor
                                                                        Found in app/assets/javascripts/tablesorter.min.js and 1 other location - About 30 mins to fix
                                                                        app/assets/javascripts/tablesorter.min.js on lines 1490..1494

                                                                        Duplicated Code

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

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

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

                                                                        Tuning

                                                                        This issue has a mass of 45.

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

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

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

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

                                                                        Refactorings

                                                                        Further Reading

                                                                        There are no issues that match your filters.

                                                                        Category
                                                                        Status