mambax7/alumni-26x

View on GitHub
media/jquery/tablesorter-master/js/widgets/widget-pager.js

Summary

Maintainability
F
1 mo
Test Coverage

File widget-pager.js has 1105 lines of code (exceeds 250 allowed). Consider refactoring.
Open

/*! Widget: Pager - updated 5/24/2017 (v2.28.11) */
/* Requires tablesorter v2.8+ and jQuery 1.7+
 * by Rob Garrison
 */
/*jshint browser:true, jquery:true, unused:false */
Severity: Major
Found in media/jquery/tablesorter-master/js/widgets/widget-pager.js - About 2 days to fix

    Function bindEvents has 140 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

            bindEvents: function( c ) {
                var ctrls, fxn, tmp,
                    p = c.pager,
                    wo = c.widgetOptions,
                    namespace = c.namespace + 'pager',
    Severity: Major
    Found in media/jquery/tablesorter-master/js/widgets/widget-pager.js - About 5 hrs to fix

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

              renderAjax: function( data, c, xhr, settings, exception ) {
                  var table = c.table,
                      p = c.pager,
                      wo = c.widgetOptions;
                  // process data
      Severity: Major
      Found in media/jquery/tablesorter-master/js/widgets/widget-pager.js - About 4 hrs to fix

        Function updatePageDisplay has 87 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

                updatePageDisplay: function( c, completed ) {
                    if ( c.pager && c.pager.initializing ) { return; }
                    var s, t, $out, options, indx, len, output,
                        table = c.table,
                        wo = c.widgetOptions,
        Severity: Major
        Found in media/jquery/tablesorter-master/js/widgets/widget-pager.js - About 3 hrs to fix

          Consider simplifying this complex logical expression.
          Open

                      if ( l.page === p.page && l.size === p.size && l.totalRows === p.totalRows &&
                          ( l.currentFilters || [] ).join( ',' ) === ( p.currentFilters || [] ).join( ',' ) &&
                          // check for ajax url changes see #730
                          ( l.ajaxUrl || '' ) === ( p.ajaxObject.url || '' ) &&
                          // & ajax url option changes (dynamically add/remove/rename sort & filter parameters)
          Severity: Critical
          Found in media/jquery/tablesorter-master/js/widgets/widget-pager.js - About 3 hrs to fix

            Function moveToPage has 61 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                    moveToPage: function( c, p, pageMoved ) {
                        if ( p.isDisabled ) { return; }
                        if ( pageMoved !== false && p.initialized && $.isEmptyObject( c.cache ) ) {
                            return tsp.updateCache( c );
                        }
            Severity: Major
            Found in media/jquery/tablesorter-master/js/widgets/widget-pager.js - About 2 hrs to fix

              Function showError has 60 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  ts.showError = function( table, xhr, settings, exception ) {
                      var $row,
                          $table = $( table ),
                          c = $table[ 0 ].config,
                          wo = c && c.widgetOptions,
              Severity: Major
              Found in media/jquery/tablesorter-master/js/widgets/widget-pager.js - About 2 hrs to fix

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

                        init: function( table ) {
                            // check if tablesorter has initialized
                            if ( table.hasInitialized && table.config.pager && table.config.pager.initialized ) { return; }
                            var t,
                                c = table.config,
                Severity: Major
                Found in media/jquery/tablesorter-master/js/widgets/widget-pager.js - About 2 hrs to fix

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

                          renderTable: function( c, rows ) {
                              var $tb, index, count, added,
                                  table = c.table,
                                  p = c.pager,
                                  wo = c.widgetOptions,
                  Severity: Major
                  Found in media/jquery/tablesorter-master/js/widgets/widget-pager.js - About 2 hrs to fix

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

                            hideRows: function( c ) {
                                if ( !c.widgetOptions.pager_ajaxUrl ) {
                                    var tbodyIndex, rowIndex, $rows, len, lastIndex,
                                        table = c.table,
                                        p = c.pager,
                    Severity: Minor
                    Found in media/jquery/tablesorter-master/js/widgets/widget-pager.js - About 1 hr to fix

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

                              buildPageSelect: function( c, p ) {
                                  // Filter the options page number link array if it's larger than 'pager_maxOptionSize'
                                  // as large page set links will slow the browser on large dom inserts
                                  var i, centralFocusSize, focusOptionPages, insertIndex, optionLength, focusLength,
                                      wo = c.widgetOptions,
                      Severity: Minor
                      Found in media/jquery/tablesorter-master/js/widgets/widget-pager.js - About 1 hr to fix

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

                                getAjaxUrl: function( c ) {
                                    var indx, len,
                                        p = c.pager,
                                        wo = c.widgetOptions,
                                        url = wo.pager_ajaxUrl ? wo.pager_ajaxUrl
                        Severity: Minor
                        Found in media/jquery/tablesorter-master/js/widgets/widget-pager.js - About 1 hr to fix

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

                                  showAllRows: function( c ) {
                                      var index, $controls, len,
                                          table = c.table,
                                          p = c.pager,
                                          wo = c.widgetOptions;
                          Severity: Minor
                          Found in media/jquery/tablesorter-master/js/widgets/widget-pager.js - About 1 hr to fix

                            Consider simplifying this complex logical expression.
                            Open

                                            if ( typeof wo.pager_output === 'function' ) {
                                                s = wo.pager_output( table, p );
                                            } else {
                                                output = $out
                                                    // get output template from data-pager-output or data-pager-output-filtered
                            Severity: Critical
                            Found in media/jquery/tablesorter-master/js/widgets/widget-pager.js - About 1 hr to fix

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

                                      getAjax: function( c ) {
                                          var counter,
                                              url = tsp.getAjaxUrl( c ),
                                              $doc = $( document ),
                                              namespace = c.namespace + 'pager',
                              Severity: Minor
                              Found in media/jquery/tablesorter-master/js/widgets/widget-pager.js - About 1 hr to fix

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

                                        enablePager: function( c, triggered ) {
                                            var info, size,
                                                table = c.table,
                                                p = c.pager,
                                                wo = c.widgetOptions,
                                Severity: Minor
                                Found in media/jquery/tablesorter-master/js/widgets/widget-pager.js - About 1 hr to fix

                                  Consider simplifying this complex logical expression.
                                  Open

                                              if ( wo.pager_savePages && ts.storage ) {
                                                  t = ts.storage( table, wo.pager_storageKey ) || {}; // fixes #387
                                                  p.page = ( isNaN( t.page ) ? p.page : t.page ) || p.setPage || 0;
                                                  p.size = t.size === 'all' ? t.size : ( isNaN( t.size ) ? p.size : t.size ) || p.setSize || 10;
                                                  tsp.setPageSize( c, p.size );
                                  Severity: Major
                                  Found in media/jquery/tablesorter-master/js/widgets/widget-pager.js - About 1 hr to fix

                                    Avoid deeply nested control flow statements.
                                    Open

                                                                if ( $h.find( '.' + ts.css.icon ).length ) {
                                                                    icon = $h.find( '.' + ts.css.icon ).clone( true );
                                                                    $h.find( '.' + ts.css.headerIn ).html( th[ j ] ).append( icon );
                                                                    if ( hsh && $sh.length ) {
                                                                        icon = $sh.eq( j ).find( '.' + ts.css.icon ).clone( true );
                                    Severity: Major
                                    Found in media/jquery/tablesorter-master/js/widgets/widget-pager.js - About 45 mins to fix

                                      Avoid deeply nested control flow statements.
                                      Open

                                                              for ( i = 0; i < l; i++ ) {
                                                                  tds += '<tr>';
                                                                  for ( j = 0; j < d[i].length; j++ ) {
                                                                      // build tbody cells; watch for data containing HTML markup - see #434
                                                                      tds += /^\s*<td/.test( d[ i ][ j ] ) ? $.trim( d[ i ][ j ] ) : '<td>' + d[ i ][ j ] + '</td>';
                                      Severity: Major
                                      Found in media/jquery/tablesorter-master/js/widgets/widget-pager.js - About 45 mins to fix

                                        Avoid deeply nested control flow statements.
                                        Open

                                                                if ( wo.pager_processAjaxOnInit ) {
                                                                    c.$tbodies.eq( 0 ).html( tds );
                                                                }
                                        Severity: Major
                                        Found in media/jquery/tablesorter-master/js/widgets/widget-pager.js - About 45 mins to fix

                                          Avoid deeply nested control flow statements.
                                          Open

                                                                      if ( size === start && $rows[ rowIndex ].className.match( c.cssChildRow ) ) {
                                                                          // hide child rows @ start of pager (if already visible)
                                                                          $rows[ rowIndex ].style.display = 'none';
                                                                      } else {
                                                                          $rows[ rowIndex ].style.display = ( size >= start && size < end ) ? '' : 'none';
                                          Severity: Major
                                          Found in media/jquery/tablesorter-master/js/widgets/widget-pager.js - About 45 mins to fix

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

                                                    renderAjax: function( data, c, xhr, settings, exception ) {
                                            Severity: Minor
                                            Found in media/jquery/tablesorter-master/js/widgets/widget-pager.js - About 35 mins to fix

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

                                                  ts.showError = function( table, xhr, settings, exception ) {
                                                      var $row,
                                                          $table = $( table ),
                                                          c = $table[ 0 ].config,
                                                          wo = c && c.widgetOptions,
                                              Severity: Major
                                              Found in media/jquery/tablesorter-master/js/widgets/widget-pager.js and 1 other location - About 3 days to fix
                                              media/jquery/tablesorter-master/addons/pager/jquery.tablesorter.pager.js on lines 1189..1258

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

                                              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 ( typeof wo.pager_output === 'function' ) {
                                                                  s = wo.pager_output( table, p );
                                                              } else {
                                                                  output = $out
                                                                      // get output template from data-pager-output or data-pager-output-filtered
                                              Severity: Major
                                              Found in media/jquery/tablesorter-master/js/widgets/widget-pager.js and 1 other location - About 2 days to fix
                                              media/jquery/tablesorter-master/addons/pager/jquery.tablesorter.pager.js on lines 196..224

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

                                              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 ( largeCollection ) {
                                                              focusOptionPages = [];
                                                              // don't allow central focus size to be > 5 on either side of current page
                                                              centralFocusSize = Math.max( Math.floor( wo.pager_maxOptionSize / skipSetSize ) - 1, 5 );
                                              
                                              
                                              Severity: Major
                                              Found in media/jquery/tablesorter-master/js/widgets/widget-pager.js and 1 other location - About 1 day to fix
                                              media/jquery/tablesorter-master/addons/pager/jquery.tablesorter.pager.js on lines 283..312

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

                                              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 ( rowIndex = 0; rowIndex < len; rowIndex++ ) {
                                                                      if ( !p.regexFiltered.test( $rows[ rowIndex ].className ) ) {
                                                                          if ( size === start && $rows[ rowIndex ].className.match( c.cssChildRow ) ) {
                                                                              // hide child rows @ start of pager (if already visible)
                                                                              $rows[ rowIndex ].style.display = 'none';
                                              Severity: Major
                                              Found in media/jquery/tablesorter-master/js/widgets/widget-pager.js and 1 other location - About 1 day to fix
                                              media/jquery/tablesorter-master/addons/pager/jquery.tablesorter.pager.js on lines 373..391

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

                                              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 ( !$.isArray( result ) ) {
                                                                      p.ajaxData = result;
                                                                      c.totalRows = p.totalRows = result.total;
                                                                      c.filteredRows = p.filteredRows = typeof result.filteredRows !== 'undefined' ?
                                                                          result.filteredRows :
                                              Severity: Major
                                              Found in media/jquery/tablesorter-master/js/widgets/widget-pager.js and 1 other location - About 1 day to fix
                                              media/jquery/tablesorter-master/addons/pager/jquery.tablesorter.pager.js on lines 442..459

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

                                              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 ( wo.pager_fixedHeight && !p.isDisabled ) {
                                                              h = $.data( table, 'pagerSavedHeight' );
                                                              if ( h ) {
                                                                  bs = 0;
                                                                  if ( $(table).css('border-spacing').split(' ').length > 1 ) {
                                              Severity: Major
                                              Found in media/jquery/tablesorter-master/js/widgets/widget-pager.js and 1 other location - About 1 day to fix
                                              media/jquery/tablesorter-master/addons/pager/jquery.tablesorter.pager.js on lines 328..343

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

                                              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 ( hasFilters && !p.ajax ) {
                                                              if ( $.isEmptyObject( c.cache ) ) {
                                                                  // delayInit: true so nothing is in the cache
                                                                  p.filteredRows = p.totalRows = c.$tbodies.eq( 0 )
                                                                      .children( 'tr' )
                                              Severity: Major
                                              Found in media/jquery/tablesorter-master/js/widgets/widget-pager.js and 1 other location - About 1 day to fix
                                              media/jquery/tablesorter-master/addons/pager/jquery.tablesorter.pager.js on lines 157..171

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

                                              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 ( d instanceof jQuery ) {
                                                                      if ( wo.pager_processAjaxOnInit ) {
                                                                          // append jQuery object
                                                                          c.$tbodies.eq( 0 ).empty();
                                                                          c.$tbodies.eq( 0 ).append( d );
                                              Severity: Major
                                              Found in media/jquery/tablesorter-master/js/widgets/widget-pager.js and 1 other location - About 1 day to fix
                                              media/jquery/tablesorter-master/addons/pager/jquery.tablesorter.pager.js on lines 461..481

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

                                              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.pager_removeRows ) {
                                                              tsp.hideRows( c );
                                                          } else {
                                                              ts.clearTableBody( table );
                                                              $tb = ts.processTbody( table, c.$tbodies.eq(0), true );
                                              Severity: Major
                                              Found in media/jquery/tablesorter-master/js/widgets/widget-pager.js and 1 other location - About 1 day to fix
                                              media/jquery/tablesorter-master/addons/pager/jquery.tablesorter.pager.js on lines 656..678

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

                                              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 ( $h.find( '.' + ts.css.icon ).length ) {
                                                                              icon = $h.find( '.' + ts.css.icon ).clone( true );
                                                                              $h.find( '.' + ts.css.headerIn ).html( th[ j ] ).append( icon );
                                                                              if ( hsh && $sh.length ) {
                                                                                  icon = $sh.eq( j ).find( '.' + ts.css.icon ).clone( true );
                                              Severity: Major
                                              Found in media/jquery/tablesorter-master/js/widgets/widget-pager.js and 1 other location - About 7 hrs to fix
                                              media/jquery/tablesorter-master/addons/pager/jquery.tablesorter.pager.js on lines 496..510

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

                                              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 ( l.page === p.page && l.size === p.size && l.totalRows === p.totalRows &&
                                                              ( l.currentFilters || [] ).join( ',' ) === ( p.currentFilters || [] ).join( ',' ) &&
                                                              // check for ajax url changes see #730
                                                              ( l.ajaxUrl || '' ) === ( p.ajaxObject.url || '' ) &&
                                                              // & ajax url option changes (dynamically add/remove/rename sort & filter parameters)
                                              Severity: Major
                                              Found in media/jquery/tablesorter-master/js/widgets/widget-pager.js and 1 other location - About 7 hrs to fix
                                              media/jquery/tablesorter-master/addons/pager/jquery.tablesorter.pager.js on lines 754..760

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

                                              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 ( $out.length ) {
                                                                  $out[ ($out[ 0 ].nodeName === 'INPUT' ) ? 'val' : 'html' ]( s );
                                                                  // rebind startRow/page inputs
                                                                  $out
                                                                      .find( '.ts-startRow, .ts-page' )
                                              Severity: Major
                                              Found in media/jquery/tablesorter-master/js/widgets/widget-pager.js and 1 other location - About 6 hrs to fix
                                              media/jquery/tablesorter-master/addons/pager/jquery.tablesorter.pager.js on lines 236..244

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

                                              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 ( filterCol ) {
                                                              filterCol = filterCol[ 1 ];
                                                              len = filterList.length;
                                                              for ( indx = 0; indx < len; indx++ ) {
                                                                  if ( filterList[ indx ] ) {
                                              Severity: Major
                                              Found in media/jquery/tablesorter-master/js/widgets/widget-pager.js and 1 other location - About 5 hrs to fix
                                              media/jquery/tablesorter-master/addons/pager/jquery.tablesorter.pager.js on lines 608..619

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

                                              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 ( sortCol ) {
                                                              sortCol = sortCol[ 1 ];
                                                              len = sortList.length;
                                                              for ( indx = 0; indx < len; indx++ ) {
                                                                  arry[ arry.length ] = sortCol + '[' + sortList[ indx ][ 0 ] + ']=' + sortList[ indx ][ 1 ];
                                              Severity: Major
                                              Found in media/jquery/tablesorter-master/js/widgets/widget-pager.js and 1 other location - About 5 hrs to fix
                                              media/jquery/tablesorter-master/addons/pager/jquery.tablesorter.pager.js on lines 598..607

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

                                              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 ( p.initialized && completed !== false ) {
                                                              if ( c.debug ) {
                                                                  console.log( 'Pager: Triggering pagerComplete' );
                                                              }
                                                              c.$table.triggerHandler( 'pagerComplete', c );
                                              Severity: Major
                                              Found in media/jquery/tablesorter-master/js/widgets/widget-pager.js and 1 other location - About 4 hrs to fix
                                              media/jquery/tablesorter-master/addons/pager/jquery.tablesorter.pager.js on lines 248..260

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

                                              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 ( lastIndex > 0 && $rows[ lastIndex ].className.match( ts.css.cssHasChild ) ) {
                                                                      while ( ++lastIndex < len && $rows[ lastIndex ].className.match( c.cssChildRow ) ) {
                                                                          $rows[ lastIndex ].style.display = '';
                                                                      }
                                                                  }
                                              Severity: Major
                                              Found in media/jquery/tablesorter-master/js/widgets/widget-pager.js and 1 other location - About 3 hrs to fix
                                              media/jquery/tablesorter-master/addons/pager/jquery.tablesorter.pager.js on lines 393..397

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

                                              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 (ts.filter.equalFilters) {
                                                                      filtersEqual = ts.filter.equalFilters(c, c.lastSearch, p.currentFilters);
                                                                  } else {
                                                                      // will miss filter changes of the same value in a different column, see #1363
                                                                      filtersEqual = ( c.lastSearch || [] ).join( '' ) !== ( p.currentFilters || [] ).join( '' );
                                              Severity: Major
                                              Found in media/jquery/tablesorter-master/js/widgets/widget-pager.js and 1 other location - About 3 hrs to fix
                                              media/jquery/tablesorter-master/addons/pager/jquery.tablesorter.pager.js on lines 982..987

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

                                              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 ( exception ) {
                                                                  if ( c.debug ) {
                                                                      console.error( 'Pager: >> Ajax Error', xhr, settings, exception );
                                                                  }
                                                                  ts.showError( table, xhr, settings, exception );
                                              Severity: Major
                                              Found in media/jquery/tablesorter-master/js/widgets/widget-pager.js and 1 other location - About 2 hrs to fix
                                              media/jquery/tablesorter-master/addons/pager/jquery.tablesorter.pager.js on lines 433..514

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

                                              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

                                                              url = wo.pager_ajaxUrl ? wo.pager_ajaxUrl
                                                                  // allow using '{page+1}' in the url string to switch to a non-zero based index
                                                                  .replace( /\{page([\-+]\d+)?\}/, function( s, n ) { return p.page + ( n ? parseInt( n, 10 ) : 0 ); })
                                                                  // this will pass "all" to server when size is set to "all"
                                                                  .replace( /\{size\}/g, p.size ) : '',
                                              Severity: Major
                                              Found in media/jquery/tablesorter-master/js/widgets/widget-pager.js and 1 other location - About 2 hrs to fix
                                              media/jquery/tablesorter-master/addons/pager/jquery.tablesorter.pager.js on lines 588..592

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

                                              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

                                                          p.regexRows = new RegExp( '(' + ( wo.filter_filteredRow || 'filtered' ) + '|' +
                                                              c.selectorRemove.slice( 1 ) + '|' + c.cssChildRow + ')' );
                                              Severity: Major
                                              Found in media/jquery/tablesorter-master/js/widgets/widget-pager.js and 1 other location - About 1 hr to fix
                                              media/jquery/tablesorter-master/addons/pager/jquery.tablesorter.pager.js on lines 969..969

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

                                              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

                                                              p.size = t.size === 'all' ? t.size : ( isNaN( t.size ) ? p.size : t.size ) || p.setSize || 10;
                                              Severity: Major
                                              Found in media/jquery/tablesorter-master/js/widgets/widget-pager.js and 1 other location - About 1 hr to fix
                                              media/jquery/tablesorter-master/addons/pager/jquery.tablesorter.pager.js on lines 965..965

                                              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

                                                          optionPages = $.grep( optionPages, function( value, indx ) {
                                                              return $.inArray( value, optionPages ) === indx;
                                                          })
                                                          .sort( function( a, b ) {
                                                              return a - b;
                                              Severity: Major
                                              Found in media/jquery/tablesorter-master/js/widgets/widget-pager.js and 1 other location - About 1 hr to fix
                                              media/jquery/tablesorter-master/addons/pager/jquery.tablesorter.pager.js on lines 315..318

                                              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

                                                                  if ( e.type === 'pagerUpdate' ) {
                                                                      num = typeof num === 'undefined' ? p.page + 1 : num;
                                                                      p.last.page = true;
                                                                  }
                                              Severity: Major
                                              Found in media/jquery/tablesorter-master/js/widgets/widget-pager.js and 1 other location - About 1 hr to fix
                                              media/jquery/tablesorter-master/addons/pager/jquery.tablesorter.pager.js on lines 1051..1054

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

                                              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

                                                              p.$container
                                                                  .find( s.next + ',' + s.last )
                                                                  .toggleClass( wo.pager_css.disabled, last )
                                                                  .prop( 'aria-disabled', last );
                                              Severity: Major
                                              Found in media/jquery/tablesorter-master/js/widgets/widget-pager.js and 1 other location - About 1 hr to fix
                                              media/jquery/tablesorter-master/js/widgets/widget-pager.js on lines 413..416

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

                                              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

                                                              p.$container
                                                                  .find( s.first + ',' + s.prev )
                                                                  .toggleClass( wo.pager_css.disabled, first )
                                                                  .prop( 'aria-disabled', first );
                                              Severity: Major
                                              Found in media/jquery/tablesorter-master/js/widgets/widget-pager.js and 1 other location - About 1 hr to fix
                                              media/jquery/tablesorter-master/js/widgets/widget-pager.js on lines 417..420

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

                                              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 ( index = 0; index < p.totalRows; index++ ) {
                                                                      rows[ rows.length ] = normalized[ index ][ c.columns ].$row;
                                                                  }
                                              Severity: Major
                                              Found in media/jquery/tablesorter-master/js/widgets/widget-pager.js and 1 other location - About 1 hr to fix
                                              media/jquery/tablesorter-master/addons/pager/jquery.tablesorter.pager.js on lines 728..730

                                              Duplicated Code

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

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

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

                                              Tuning

                                              This issue has a mass of 56.

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

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

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

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

                                              Refactorings

                                              Further Reading

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

                                                              p.startRow = t ? sz * p.page + 1 : ( p.filteredRows === 0 ? 0 : sz * p.page + 1 );
                                              Severity: Major
                                              Found in media/jquery/tablesorter-master/js/widgets/widget-pager.js and 1 other location - About 1 hr to fix
                                              media/jquery/tablesorter-master/addons/pager/jquery.tablesorter.pager.js on lines 191..191

                                              Duplicated Code

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

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

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

                                              Tuning

                                              This issue has a mass of 55.

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

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

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

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

                                              Refactorings

                                              Further Reading

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

                                                                  for ( indx = 0; indx < len; indx++ ) {
                                                                      t += '<option value="' + options[ indx ] + '">' + options[ indx ] + '</option>';
                                                                  }
                                              Severity: Minor
                                              Found in media/jquery/tablesorter-master/js/widgets/widget-pager.js and 1 other location - About 55 mins to fix
                                              media/jquery/tablesorter-master/addons/pager/jquery.tablesorter.pager.js on lines 230..232

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

                                                                  p.totalRows = typeof tmp.total !== 'undefined' ? tmp.total :
                                                                      ( c.debug ? console.error('Pager: no initial total page set!') || 0 : 0 );
                                              Severity: Major
                                              Found in media/jquery/tablesorter-master/js/widgets/widget-pager.js and 3 other locations - About 55 mins to fix
                                              media/jquery/tablesorter-master/addons/pager/jquery.tablesorter.pager.js on lines 778..779
                                              media/jquery/tablesorter-master/addons/pager/jquery.tablesorter.pager.js on lines 780..781
                                              media/jquery/tablesorter-master/js/widgets/widget-pager.js on lines 1118..1119

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

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

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

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

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

                                              Refactorings

                                              Further Reading

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

                                                                  p.filteredRows = typeof tmp.filtered !== 'undefined' ? tmp.filtered :
                                                                      ( c.debug ? console.error('Pager: no initial filtered page set!') || 0 : 0 );
                                              Severity: Major
                                              Found in media/jquery/tablesorter-master/js/widgets/widget-pager.js and 3 other locations - About 55 mins to fix
                                              media/jquery/tablesorter-master/addons/pager/jquery.tablesorter.pager.js on lines 778..779
                                              media/jquery/tablesorter-master/addons/pager/jquery.tablesorter.pager.js on lines 780..781
                                              media/jquery/tablesorter-master/js/widgets/widget-pager.js on lines 1116..1117

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

                                              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 ( !$b.children( 'tr:visible' ).length ) {
                                                              $b.append( '<tr class="pagerSavedHeightSpacer ' + c.selectorRemove.slice( 1 ) + '"><td>&nbsp</td></tr>' );
                                                          }
                                              Severity: Minor
                                              Found in media/jquery/tablesorter-master/js/widgets/widget-pager.js and 1 other location - About 50 mins to fix
                                              media/jquery/tablesorter-master/addons/pager/jquery.tablesorter.pager.js on lines 351..353

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

                                              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 ( e.type === 'filterStart' && wo.pager_pageReset !== false && !filtersEqual ) {
                                                                      p.page = wo.pager_pageReset; // fixes #456 & #565
                                                                  }
                                              Severity: Minor
                                              Found in media/jquery/tablesorter-master/js/widgets/widget-pager.js and 1 other location - About 50 mins to fix
                                              media/jquery/tablesorter-master/addons/pager/jquery.tablesorter.pager.js on lines 989..991

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

                                              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

                                                              p.totalRows = wo.pager_countChildRows ? c.$tbodies.eq( 0 ).children( 'tr' ).length : rows.length;
                                              Severity: Minor
                                              Found in media/jquery/tablesorter-master/js/widgets/widget-pager.js and 1 other location - About 40 mins to fix
                                              media/jquery/tablesorter-master/addons/pager/jquery.tablesorter.pager.js on lines 1168..1168

                                              Duplicated Code

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

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

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

                                              Tuning

                                              This issue has a mass of 49.

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

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

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

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

                                              Refactorings

                                              Further Reading

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

                                                                  p.totalRows = $rows.length -
                                                                      ( wo.pager_countChildRows ? 0 : $rows.filter( '.' + c.cssChildRow ).length );
                                              Severity: Minor
                                              Found in media/jquery/tablesorter-master/js/widgets/widget-pager.js and 1 other location - About 40 mins to fix
                                              media/jquery/tablesorter-master/addons/pager/jquery.tablesorter.pager.js on lines 1028..1028

                                              Duplicated Code

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

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

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

                                              Tuning

                                              This issue has a mass of 49.

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

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

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

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

                                              Refactorings

                                              Further Reading

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

                                                          for ( i = optionPagesStartPage; i <= pg; ) {
                                                              optionPages[ optionPages.length ] = i;
                                                              i = i + ( largeCollection ? skipSetSize : 1 );
                                                          }
                                              Severity: Minor
                                              Found in media/jquery/tablesorter-master/js/widgets/widget-pager.js and 1 other location - About 40 mins to fix
                                              media/jquery/tablesorter-master/addons/pager/jquery.tablesorter.pager.js on lines 278..281

                                              Duplicated Code

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

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

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

                                              Tuning

                                              This issue has a mass of 49.

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

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

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

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

                                              Refactorings

                                              Further Reading

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

                                                                      if ( c.delayInit && c.rowsCopy && c.rowsCopy.length === 0 ) {
                                                                          // make sure we have a copy of all table rows once the cache has been built
                                                                          tsp.updateCache( c );
                                                                      }
                                              Severity: Minor
                                              Found in media/jquery/tablesorter-master/js/widgets/widget-pager.js and 1 other location - About 40 mins to fix
                                              media/jquery/tablesorter-master/js/widgets/widget-pager.js on lines 301..304

                                              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

                                                                  if ( $rows.length && c.rowsCopy && c.rowsCopy.length === 0 ) {
                                                                      // make a copy of all table rows once the cache has been built
                                                                      tsp.updateCache( c );
                                                                  }
                                              Severity: Minor
                                              Found in media/jquery/tablesorter-master/js/widgets/widget-pager.js and 1 other location - About 40 mins to fix
                                              media/jquery/tablesorter-master/js/widgets/widget-pager.js on lines 271..274

                                              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

                                                          l.currentFilters = ( l.currentFilters || [] ).join( '' ) === '' ? [] : l.currentFilters;
                                              Severity: Minor
                                              Found in media/jquery/tablesorter-master/js/widgets/widget-pager.js and 1 other location - About 35 mins to fix
                                              media/jquery/tablesorter-master/addons/pager/jquery.tablesorter.pager.js on lines 751..751

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

                                                                  p.totalPages = p.size === 'all' ? 1 : Math.ceil( p.totalRows / p.size );
                                              Severity: Major
                                              Found in media/jquery/tablesorter-master/js/widgets/widget-pager.js and 7 other locations - About 30 mins to fix
                                              media/jquery/tablesorter-master/addons/pager/jquery.tablesorter.pager.js on lines 837..837
                                              media/jquery/tablesorter-master/addons/pager/jquery.tablesorter.pager.js on lines 838..838
                                              media/jquery/tablesorter-master/addons/pager/jquery.tablesorter.pager.js on lines 1029..1029
                                              media/jquery/tablesorter-master/addons/pager/jquery.tablesorter.pager.js on lines 1170..1170
                                              media/jquery/tablesorter-master/js/widgets/widget-pager.js on lines 1181..1181
                                              media/jquery/tablesorter-master/js/widgets/widget-pager.js on lines 1182..1182
                                              media/jquery/tablesorter-master/js/widgets/widget-pager.js on lines 1286..1286

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

                                                              p.totalPages = p.size === 'all' ? 1 : Math.ceil( p.totalRows / p.size );
                                              Severity: Major
                                              Found in media/jquery/tablesorter-master/js/widgets/widget-pager.js and 7 other locations - About 30 mins to fix
                                              media/jquery/tablesorter-master/addons/pager/jquery.tablesorter.pager.js on lines 837..837
                                              media/jquery/tablesorter-master/addons/pager/jquery.tablesorter.pager.js on lines 838..838
                                              media/jquery/tablesorter-master/addons/pager/jquery.tablesorter.pager.js on lines 1029..1029
                                              media/jquery/tablesorter-master/addons/pager/jquery.tablesorter.pager.js on lines 1170..1170
                                              media/jquery/tablesorter-master/js/widgets/widget-pager.js on lines 300..300
                                              media/jquery/tablesorter-master/js/widgets/widget-pager.js on lines 1181..1181
                                              media/jquery/tablesorter-master/js/widgets/widget-pager.js on lines 1182..1182

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

                                                          p.filteredPages = p.size === 'all' ? 1 : Math.ceil( p.filteredRows / p.size );
                                              Severity: Major
                                              Found in media/jquery/tablesorter-master/js/widgets/widget-pager.js and 7 other locations - About 30 mins to fix
                                              media/jquery/tablesorter-master/addons/pager/jquery.tablesorter.pager.js on lines 837..837
                                              media/jquery/tablesorter-master/addons/pager/jquery.tablesorter.pager.js on lines 838..838
                                              media/jquery/tablesorter-master/addons/pager/jquery.tablesorter.pager.js on lines 1029..1029
                                              media/jquery/tablesorter-master/addons/pager/jquery.tablesorter.pager.js on lines 1170..1170
                                              media/jquery/tablesorter-master/js/widgets/widget-pager.js on lines 300..300
                                              media/jquery/tablesorter-master/js/widgets/widget-pager.js on lines 1181..1181
                                              media/jquery/tablesorter-master/js/widgets/widget-pager.js on lines 1286..1286

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

                                                          p.totalPages = p.size === 'all' ? 1 : Math.ceil( p.totalRows / p.size );
                                              Severity: Major
                                              Found in media/jquery/tablesorter-master/js/widgets/widget-pager.js and 7 other locations - About 30 mins to fix
                                              media/jquery/tablesorter-master/addons/pager/jquery.tablesorter.pager.js on lines 837..837
                                              media/jquery/tablesorter-master/addons/pager/jquery.tablesorter.pager.js on lines 838..838
                                              media/jquery/tablesorter-master/addons/pager/jquery.tablesorter.pager.js on lines 1029..1029
                                              media/jquery/tablesorter-master/addons/pager/jquery.tablesorter.pager.js on lines 1170..1170
                                              media/jquery/tablesorter-master/js/widgets/widget-pager.js on lines 300..300
                                              media/jquery/tablesorter-master/js/widgets/widget-pager.js on lines 1182..1182
                                              media/jquery/tablesorter-master/js/widgets/widget-pager.js on lines 1286..1286

                                              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

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

                                                              if ( !p.ajax && table.isUpdating ) {
                                                                  if ( c.debug ) {
                                                                      console.log( 'Pager: Triggering updateComplete' );
                                                                  }
                                                                  c.$table.triggerHandler( 'updateComplete', [ table, true ] );
                                              Severity: Minor
                                              Found in media/jquery/tablesorter-master/js/widgets/widget-pager.js and 1 other location - About 30 mins to fix
                                              media/jquery/tablesorter-master/js/widgets/widget-pager.js on lines 999..1004

                                              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

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

                                                          if ( table.isUpdating ) {
                                                              if ( c.debug ) {
                                                                  console.log( 'Pager: Triggering updateComplete' );
                                                              }
                                                              c.$table.triggerHandler( 'updateComplete', [ table, true ] );
                                              Severity: Minor
                                              Found in media/jquery/tablesorter-master/js/widgets/widget-pager.js and 1 other location - About 30 mins to fix
                                              media/jquery/tablesorter-master/js/widgets/widget-pager.js on lines 1134..1139

                                              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

                                                          p.currentFilters = ( p.currentFilters || [] ).join( '' ) === '' ? [] : p.currentFilters;
                                              Severity: Minor
                                              Found in media/jquery/tablesorter-master/js/widgets/widget-pager.js and 1 other location - About 30 mins to fix
                                              media/jquery/tablesorter-master/addons/pager/jquery.tablesorter.pager.js on lines 752..752

                                              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