mambax7/alumni-26x

View on GitHub
media/jquery/tablesorter-master/js/jquery.tablesorter.combined.js

Summary

Maintainability
F
1 yr
Test Coverage

File jquery.tablesorter.combined.js has 4851 lines of code (exceeds 250 allowed). Consider refactoring.
Open

/*** This file is dynamically generated ***
█████▄ ▄████▄   █████▄ ▄████▄ ██████   ███████▄ ▄████▄ █████▄ ██ ██████ ██  ██
██  ██ ██  ██   ██  ██ ██  ██   ██     ██ ██ ██ ██  ██ ██  ██ ██ ██▄▄   ██▄▄██
██  ██ ██  ██   ██  ██ ██  ██   ██     ██ ██ ██ ██  ██ ██  ██ ██ ██▀▀    ▀▀▀██
█████▀ ▀████▀   ██  ██ ▀████▀   ██     ██ ██ ██ ▀████▀ █████▀ ██ ██     █████▀
Severity: Major
Found in media/jquery/tablesorter-master/js/jquery.tablesorter.combined.js - About 2 wks to fix

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

            findRows: function( table, filters, currentFilters ) {
                if (
                    tsf.equalFilters(table.config, table.config.lastSearch, currentFilters) ||
                    !table.config.widgetOptions.filter_initialized
                ) {
    Severity: Major
    Found in media/jquery/tablesorter-master/js/jquery.tablesorter.combined.js - About 1 day to fix

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

              init: function( table ) {
                  // filter language options
                  ts.language = $.extend( true, {}, {
                      to  : 'to',
                      or  : 'or',
      Severity: Major
      Found in media/jquery/tablesorter-master/js/jquery.tablesorter.combined.js - About 7 hrs to fix

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

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

          Function buildCache has 128 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

                  buildCache : function( c, callback, $tbodies ) {
                      var cache, val, txt, rowIndex, colIndex, tbodyIndex, $tbody, $row,
                          cols, $cells, cell, cacheTime, totalRows, rowData, prevRowData,
                          colMax, span, cacheIndex, hasParser, max, len, index,
                          table = c.table,
          Severity: Major
          Found in media/jquery/tablesorter-master/js/jquery.tablesorter.combined.js - About 5 hrs to fix

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

                    initSort : function( c, cell, event ) {
                        if ( c.table.isUpdating ) {
                            // let any updates complete before initializing a sort
                            return setTimeout( function(){
                                ts.initSort( c, cell, event );
            Severity: Major
            Found in media/jquery/tablesorter-master/js/jquery.tablesorter.combined.js - About 4 hrs to fix

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

                      processRow: function( c, data, vars ) {
                          var result, filterMatched,
                              fxn, ffxn, txt,
                              wo = c.widgetOptions,
                              showRow = true,
              Severity: Major
              Found in media/jquery/tablesorter-master/js/jquery.tablesorter.combined.js - About 4 hrs to fix

                Function setup has 100 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                        setup : function( table, c ) {
                            // if no thead or tbody, or tablesorter is already present, quit
                            if ( !table || !table.tHead || table.tBodies.length === 0 || table.hasInitialized === true ) {
                                if ( c.debug ) {
                                    if ( table.hasInitialized ) {
                Severity: Major
                Found in media/jquery/tablesorter-master/js/jquery.tablesorter.combined.js - About 4 hrs to fix

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

                          format: function(table, c, wo) {
                              var i, tmp, hdr, icon, time, $header, $icon, $tfoot, $h, oldtheme, oldremove, oldIconRmv, hasOldTheme,
                                  themesAll = ts.themes,
                                  $table = c.$table.add( $( c.namespace + '_extra_table' ) ),
                                  $headers = c.$headers.add( $( c.namespace + '_extra_headers' ) ),
                  Severity: Major
                  Found in media/jquery/tablesorter-master/js/jquery.tablesorter.combined.js - About 4 hrs to fix

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

                            bindMethods : function( c ) {
                                var $table = c.$table,
                                    namespace = c.namespace,
                                    events = ( 'sortReset update updateRows updateAll updateHeaders addRows updateCell updateComplete ' +
                                        'sorton appendCache updateCache applyWidgetId applyWidgets refreshWidgets destroy mouseup ' +
                    Severity: Major
                    Found in media/jquery/tablesorter-master/js/jquery.tablesorter.combined.js - About 3 hrs to fix

                      Function setupParsers has 83 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                              setupParsers : function( c, $tbodies ) {
                                  var rows, list, span, max, colIndex, indx, header, configHeaders,
                                      noParser, parser, extractor, time, tbody, len,
                                      table = c.table,
                                      tbodyIndex = 0,
                      Severity: Major
                      Found in media/jquery/tablesorter-master/js/jquery.tablesorter.combined.js - About 3 hrs to fix

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

                                buildHeaders : function( c ) {
                                    var $temp, icon, timer, indx;
                                    c.headerList = [];
                                    c.headerContent = [];
                                    c.sortVars = [];
                        Severity: Major
                        Found in media/jquery/tablesorter-master/js/jquery.tablesorter.combined.js - About 3 hrs to fix

                          Consider simplifying this complex logical expression.
                          Open

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

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

                                    buildSelect: function( table, column, arry, updating, onlyAvail ) {
                                        table = $( table )[0];
                                        column = parseInt( column, 10 );
                                        if ( !table.config.cache || $.isEmptyObject( table.config.cache ) ) {
                                            return;
                            Severity: Major
                            Found in media/jquery/tablesorter-master/js/jquery.tablesorter.combined.js - About 2 hrs to fix

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

                                      buildRow: function( table, c, wo ) {
                                          var $filter, col, column, $header, makeSelect, disabled, name, ffxn, tmp,
                                              // c.columns defined in computeThIndexes()
                                              cellFilter = wo.filter_cellFilter,
                                              columns = c.columns,
                              Severity: Major
                              Found in media/jquery/tablesorter-master/js/jquery.tablesorter.combined.js - About 2 hrs to fix

                                Function setHeadersCss has 70 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                        setHeadersCss : function( c ) {
                                            var indx, column,
                                                list = c.sortList,
                                                len = list.length,
                                                none = ts.css.sortNone + ' ' + c.cssNone,
                                Severity: Major
                                Found in media/jquery/tablesorter-master/js/jquery.tablesorter.combined.js - About 2 hrs to fix

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

                                          bindSearch: function( table, $el, internal ) {
                                              table = $( table )[0];
                                              $el = $( $el ); // allow passing a selector string
                                              if ( !$el.length ) { return; }
                                              var tmp,
                                  Severity: Major
                                  Found in media/jquery/tablesorter-master/js/jquery.tablesorter.combined.js - About 2 hrs to fix

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

                                            bindEvents : function( table, $headers, core ) {
                                                table = $( table )[ 0 ];
                                                var tmp,
                                                    c = table.config,
                                                    namespace = c.namespace,
                                    Severity: Major
                                    Found in media/jquery/tablesorter-master/js/jquery.tablesorter.combined.js - About 2 hrs to fix

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

                                              multisort : function( c ) { /*jshint loopfunc:true */
                                                  var tbodyIndex, sortTime, colMax, rows, tmp,
                                                      table = c.table,
                                                      sorter = [],
                                                      dir = 0,
                                      Severity: Major
                                      Found in media/jquery/tablesorter-master/js/jquery.tablesorter.combined.js - About 2 hrs to fix

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

                                                addRows : function( c, $row, resort, callback ) {
                                                    var txt, val, tbodyIndex, rowIndex, rows, cellIndex, len, order,
                                                        cacheIndex, rowData, cells, cell, span,
                                                        // allow passing a row string if only one non-info tbody exists in the table
                                                        valid = typeof $row === 'string' && c.$tbodies.length === 1 && /<tr/.test( $row || '' ),
                                        Severity: Major
                                        Found in media/jquery/tablesorter-master/js/jquery.tablesorter.combined.js - About 2 hrs to fix

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

                                              ts.storage = function(table, key, value, options) {
                                                  table = $(table)[0];
                                                  var cookieIndex, cookies, date,
                                                      hasStorage = false,
                                                      values = {},
                                          Severity: Major
                                          Found in media/jquery/tablesorter-master/js/jquery.tablesorter.combined.js - About 2 hrs to fix

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

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

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

                                                      bindings : function( c, wo ) {
                                                          var namespace = c.namespace + 'tsresize';
                                                          wo.$resizable_container.children().bind( 'mousedown', function( event ) {
                                                              // save header cell and mouse position
                                                              var column,
                                              Severity: Major
                                              Found in media/jquery/tablesorter-master/js/jquery.tablesorter.combined.js - About 2 hrs to fix

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

                                                        processOptions: function( table, column, arry ) {
                                                            if ( !$.isArray( arry ) ) {
                                                                return false;
                                                            }
                                                            table = $( table )[0];
                                                Severity: Major
                                                Found in media/jquery/tablesorter-master/js/jquery.tablesorter.combined.js - About 2 hrs to fix

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

                                                          applyWidget : function( table, init, callback ) {
                                                              table = $( table )[ 0 ]; // in case this is called externally
                                                              var indx, len, names, widget, time,
                                                                  c = table.config,
                                                                  widgets = [];
                                                  Severity: Major
                                                  Found in media/jquery/tablesorter-master/js/jquery.tablesorter.combined.js - About 2 hrs to fix

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

                                                            updateCell : function( c, cell, resort, callback ) {
                                                                // updateCell for child rows is a mess - we'll ignore them for now
                                                                // eventually I'll break out the "update" row cache code to make everything consistent
                                                                if ( $( cell ).closest( 'tr' ).hasClass( c.cssChildRow ) ) {
                                                                    console.warn('Tablesorter Warning! "updateCell" for child row content has been disabled, use "update" instead');
                                                    Severity: Major
                                                    Found in media/jquery/tablesorter-master/js/jquery.tablesorter.combined.js - About 2 hrs to fix

                                                      Consider simplifying this complex logical expression.
                                                      Open

                                                                  if (!$table.hasClass('tablesorter-' + theme) || c.theme !== c.appliedTheme || !wo.uitheme_applied) {
                                                                      wo.uitheme_applied = true;
                                                                      oldtheme = themesAll[c.appliedTheme] || {};
                                                                      hasOldTheme = !$.isEmptyObject(oldtheme);
                                                                      oldremove =  hasOldTheme ? [ oldtheme.sortNone, oldtheme.sortDesc, oldtheme.sortAsc, oldtheme.active ].join( ' ' ) : '';
                                                      Severity: Critical
                                                      Found in media/jquery/tablesorter-master/js/jquery.tablesorter.combined.js - About 2 hrs to fix

                                                        Consider simplifying this complex logical expression.
                                                        Open

                                                                        if ( table.config.widgetOptions.filter_initialized &&
                                                                            // immediate search if user presses enter
                                                                            ( event.which === tskeyCodes.enter ||
                                                                                // immediate search if a "search" or "blur" is triggered on the input
                                                                                ( eventType === 'search' || eventType === 'blur' ) ||
                                                        Severity: Critical
                                                        Found in media/jquery/tablesorter-master/js/jquery.tablesorter.combined.js - About 2 hrs to fix

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

                                                                  init : function( c, wo ) {
                                                                      if ( c.$table.hasClass( 'hasResizable' ) ) { return; }
                                                                      c.$table.addClass( 'hasResizable' );
                                                          
                                                                      var noResize, $header, column, storedSizes, tmp,
                                                          Severity: Minor
                                                          Found in media/jquery/tablesorter-master/js/jquery.tablesorter.combined.js - About 2 hrs to fix

                                                            Function $headers has 48 lines of code (exceeds 25 allowed). Consider refactoring.
                                                            Open

                                                                        c.$headers = $( $.map( c.$table.find( c.selectorHeaders ), function( elem, index ) {
                                                                            var configHeaders, header, column, template, tmp,
                                                                                $elem = $( elem );
                                                                            // ignore cell (don't add it to c.$headers) if row has ignoreRow class
                                                                            if ( ts.getClosest( $elem, 'tr' ).hasClass( c.cssIgnoreRow ) ) { return; }
                                                            Severity: Minor
                                                            Found in media/jquery/tablesorter-master/js/jquery.tablesorter.combined.js - About 1 hr to fix

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

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

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

                                                                        updateHeaderSortCount : function( c, list ) {
                                                                            var col, dir, group, indx, primary, temp, val, order,
                                                                                sortList = list || c.sortList,
                                                                                len = sortList.length;
                                                                            c.sortList = [];
                                                                Severity: Minor
                                                                Found in media/jquery/tablesorter-master/js/jquery.tablesorter.combined.js - About 1 hr to fix

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

                                                                          getColumnText : function( table, column, callback, rowFilter ) {
                                                                              table = $( table )[0];
                                                                              var tbodyIndex, rowIndex, cache, row, tbodyLen, rowLen, raw, parsed, $cell, result,
                                                                                  hasCallback = typeof callback === 'function',
                                                                                  allColumns = column === 'all',
                                                                  Severity: Minor
                                                                  Found in media/jquery/tablesorter-master/js/jquery.tablesorter.combined.js - About 1 hr to fix

                                                                    Function destroy has 42 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                    Open

                                                                            destroy : function( table, removeClasses, callback ) {
                                                                                table = $( table )[ 0 ];
                                                                                if ( !table.hasInitialized ) { return; }
                                                                                // remove all widgets
                                                                                ts.removeWidget( table, true, false );
                                                                    Severity: Minor
                                                                    Found in media/jquery/tablesorter-master/js/jquery.tablesorter.combined.js - About 1 hr to fix

                                                                      Function findRange has 40 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                      Open

                                                                              findRange: function( c, val, ignoreRanges ) {
                                                                                  // look for multiple columns '1-3,4-6,8' in data-column
                                                                                  var temp, ranges, range, start, end, singles, i, indx, len,
                                                                                      columns = [];
                                                                                  if ( /^[0-9]+$/.test( val ) ) {
                                                                      Severity: Minor
                                                                      Found in media/jquery/tablesorter-master/js/jquery.tablesorter.combined.js - About 1 hr to fix

                                                                        Function appendCache has 40 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                        Open

                                                                                appendCache : function( c, init ) {
                                                                                    var parsed, totalRows, $tbody, $curTbody, rowIndex, tbodyIndex, appendTime,
                                                                                        table = c.table,
                                                                                        wo = c.widgetOptions,
                                                                                        $tbodies = c.$tbodies,
                                                                        Severity: Minor
                                                                        Found in media/jquery/tablesorter-master/js/jquery.tablesorter.combined.js - About 1 hr to fix

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

                                                                                  computeColumnIndex : function( $rows, c ) {
                                                                                      var i, j, k, l, cell, cells, rowIndex, rowSpan, colSpan, firstAvailCol,
                                                                                          // total columns has been calculated, use it to set the matrixrow
                                                                                          columns = c && c.columns || 0,
                                                                                          matrix = [],
                                                                          Severity: Minor
                                                                          Found in media/jquery/tablesorter-master/js/jquery.tablesorter.combined.js - About 1 hr to fix

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

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

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

                                                                                      applyWidgetId : function( table, id, init ) {
                                                                                          table = $(table)[0];
                                                                                          var applied, time, name,
                                                                                              c = table.config,
                                                                                              wo = c.widgetOptions,
                                                                              Severity: Minor
                                                                              Found in media/jquery/tablesorter-master/js/jquery.tablesorter.combined.js - About 1 hr to fix

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

                                                                                        getOptions: function( table, column, onlyAvail ) {
                                                                                            table = $( table )[0];
                                                                                            var rowIndex, tbodyIndex, len, row, cache, indx, child, childLen,
                                                                                                c = table.config,
                                                                                                wo = c.widgetOptions,
                                                                                Severity: Minor
                                                                                Found in media/jquery/tablesorter-master/js/jquery.tablesorter.combined.js - About 1 hr to fix

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

                                                                                      ts.addHeaderResizeEvent = function(table, disable, settings) {
                                                                                          table = $(table)[0]; // make sure we're using a dom element
                                                                                          if ( !table.config ) { return; }
                                                                                          var defaults = {
                                                                                                  timer : 250
                                                                                  Severity: Minor
                                                                                  Found in media/jquery/tablesorter-master/js/jquery.tablesorter.combined.js - About 1 hr to fix

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

                                                                                                    scrollSticky = function( resizing ) {
                                                                                                        if (!$table.is(':visible')) { return; } // fixes #278
                                                                                                        // Detect nested tables - fixes #724
                                                                                                        nestedStickyTop = $nestedSticky.length ? $nestedSticky.offset().top - $yScroll.scrollTop() + $nestedSticky.height() : 0;
                                                                                                        var tmp,
                                                                                    Severity: Minor
                                                                                    Found in media/jquery/tablesorter-master/js/jquery.tablesorter.combined.js - About 1 hr to fix

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

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

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

                                                                                                setHandlePosition : function( c, wo ) {
                                                                                                    var startPosition,
                                                                                                        tableHeight = c.$table.height(),
                                                                                                        $handles = wo.$resizable_container.children(),
                                                                                                        handleCenter = Math.floor( $handles.width() / 2 );
                                                                                        Severity: Minor
                                                                                        Found in media/jquery/tablesorter-master/js/jquery.tablesorter.combined.js - About 1 hr to fix

                                                                                          Consider simplifying this complex logical expression.
                                                                                          Open

                                                                                                          } else if ( this.value !== '' && (
                                                                                                              // liveSearch can contain a min value length; ignore arrow and meta keys, but allow backspace
                                                                                                              ( typeof liveSearch === 'number' && this.value.length < liveSearch ) ||
                                                                                                              // let return & backspace continue on, but ignore arrows & non-valid characters
                                                                                                              ( event.which !== tskeyCodes.enter && event.which !== tskeyCodes.backSpace &&
                                                                                          Severity: Critical
                                                                                          Found in media/jquery/tablesorter-master/js/jquery.tablesorter.combined.js - About 1 hr to fix

                                                                                            Consider simplifying this complex logical expression.
                                                                                            Open

                                                                                                            if ( ( tsfRegex.orTest.test( data.iFilter ) || tsfRegex.orSplit.test( data.filter ) ) &&
                                                                                                                // this test for regex has potential to slow down the overall search
                                                                                                                !tsfRegex.regex.test( data.filter ) ) {
                                                                                                                var indx, filterMatched, query, regex,
                                                                                                                    // duplicate data but split filter
                                                                                            Severity: Critical
                                                                                            Found in media/jquery/tablesorter-master/js/jquery.tablesorter.combined.js - About 1 hr to fix

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

                                                                                                      removeWidget : function( table, name, refreshing ) {
                                                                                                          table = $( table )[ 0 ];
                                                                                                          var index, widget, indx, len,
                                                                                                              c = table.config;
                                                                                                          // if name === true, add all widgets from $.tablesorter.widgets
                                                                                              Severity: Minor
                                                                                              Found in media/jquery/tablesorter-master/js/jquery.tablesorter.combined.js - About 1 hr to fix

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

                                                                                                            operators: function( c, data ) {
                                                                                                                // ignore empty strings... because '' < 10 is true
                                                                                                                if ( tsfRegex.operTest.test( data.iFilter ) && data.iExact !== '' ) {
                                                                                                                    var cachedValue, result, txt,
                                                                                                                        table = c.table,
                                                                                                Severity: Minor
                                                                                                Found in media/jquery/tablesorter-master/js/jquery.tablesorter.combined.js - About 1 hr to fix

                                                                                                  Function detectParserForColumn has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                                  Open

                                                                                                          detectParserForColumn : function( c, rows, rowIndex, cellIndex ) {
                                                                                                              var cur, $node, row,
                                                                                                                  indx = ts.parsers.length,
                                                                                                                  node = false,
                                                                                                                  nodeValue = '',
                                                                                                  Severity: Minor
                                                                                                  Found in media/jquery/tablesorter-master/js/jquery.tablesorter.combined.js - About 1 hr to fix

                                                                                                    Function mouseMove has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                                    Open

                                                                                                            mouseMove : function( c, wo, event ) {
                                                                                                                if ( wo.resizable_vars.mouseXPosition === 0 || !wo.resizable_vars.$target ) { return; }
                                                                                                                // resize columns
                                                                                                                var column,
                                                                                                                    total = 0,
                                                                                                    Severity: Minor
                                                                                                    Found in media/jquery/tablesorter-master/js/jquery.tablesorter.combined.js - About 1 hr to fix

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

                                                                                                                  range : function( c, data ) {
                                                                                                                      if ( tsfRegex.toTest.test( data.iFilter ) ) {
                                                                                                                          var result, tmp, range1, range2,
                                                                                                                              table = c.table,
                                                                                                                              index = data.index,
                                                                                                      Severity: Minor
                                                                                                      Found in media/jquery/tablesorter-master/js/jquery.tablesorter.combined.js - About 1 hr to fix

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

                                                                                                                filterInitComplete: function( c ) {
                                                                                                                    var indx, len,
                                                                                                                        wo = c.widgetOptions,
                                                                                                                        count = 0,
                                                                                                                        completed = function() {
                                                                                                        Severity: Minor
                                                                                                        Found in media/jquery/tablesorter-master/js/jquery.tablesorter.combined.js - About 1 hr to fix

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

                                                                                                                  hideFilters: function( c, $table ) {
                                                                                                                      var timer;
                                                                                                                      ( $table || c.$table )
                                                                                                                          .find( '.' + tscss.filterRow )
                                                                                                                          .addClass( tscss.filterRowHide )
                                                                                                          Severity: Minor
                                                                                                          Found in media/jquery/tablesorter-master/js/jquery.tablesorter.combined.js - About 1 hr to fix

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

                                                                                                                        and : function( c, data, vars ) {
                                                                                                                            if ( tsfRegex.andTest.test( data.filter ) ) {
                                                                                                                                var indx, filterMatched, result, query, regex,
                                                                                                                                    // duplicate data but split filter
                                                                                                                                    data2 = $.extend( {}, data ),
                                                                                                            Severity: Minor
                                                                                                            Found in media/jquery/tablesorter-master/js/jquery.tablesorter.combined.js - About 1 hr to fix

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

                                                                                                                  ts.resizableReset = function( table, refreshing ) {
                                                                                                                      $( table ).each(function(){
                                                                                                                          var index, $t,
                                                                                                                              c = this.config,
                                                                                                                              wo = c && c.widgetOptions,
                                                                                                              Severity: Minor
                                                                                                              Found in media/jquery/tablesorter-master/js/jquery.tablesorter.combined.js - About 1 hr to fix

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

                                                                                                                        sortNatural : function( a, b ) {
                                                                                                                            if ( a === b ) { return 0; }
                                                                                                                            a = a.toString();
                                                                                                                            b = b.toString();
                                                                                                                            var aNum, bNum, aFloat, bFloat, indx, max,
                                                                                                                Severity: Minor
                                                                                                                Found in media/jquery/tablesorter-master/js/jquery.tablesorter.combined.js - About 1 hr to fix

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

                                                                                                                          getOptionSource: function( table, column, onlyAvail ) {
                                                                                                                              table = $( table )[0];
                                                                                                                              var c = table.config,
                                                                                                                                  wo = c.widgetOptions,
                                                                                                                                  arry = false,
                                                                                                                  Severity: Minor
                                                                                                                  Found in media/jquery/tablesorter-master/js/jquery.tablesorter.combined.js - About 1 hr to fix

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

                                                                                                                                    setWidth = function($orig, $clone){
                                                                                                                                        var index, width, border, $cell, $this,
                                                                                                                                            $cells = $orig.filter(':visible'),
                                                                                                                                            len = $cells.length;
                                                                                                                                        for ( index = 0; index < len; index++ ) {
                                                                                                                    Severity: Minor
                                                                                                                    Found in media/jquery/tablesorter-master/js/jquery.tablesorter.combined.js - About 1 hr to fix

                                                                                                                      Consider simplifying this complex logical expression.
                                                                                                                      Open

                                                                                                                                      if ( ( ( e.which || e.button ) !== 1 && !type.match( ' ' + c.pointerClick + ' | sort | keyup ' ) ) ||
                                                                                                                                          // allow pressing enter
                                                                                                                                          ( type === ' keyup ' && e.which !== ts.keyCodes.enter ) ||
                                                                                                                                          // allow triggering a click event (e.which is undefined) & ignore physical clicks
                                                                                                                                          ( type.match( ' ' + c.pointerClick + ' ' ) && typeof e.which !== 'undefined' ) ) {
                                                                                                                      Severity: Major
                                                                                                                      Found in media/jquery/tablesorter-master/js/jquery.tablesorter.combined.js - About 1 hr to fix

                                                                                                                        Consider simplifying this complex logical expression.
                                                                                                                        Open

                                                                                                                                    if ( validColumn && c.$headerIndexed[ column ].hasClass( 'filter-select-nosort' ) ) {
                                                                                                                                        // unsorted select options
                                                                                                                                        return arry;
                                                                                                                                    } else {
                                                                                                                                        len = arry.length;
                                                                                                                        Severity: Major
                                                                                                                        Found in media/jquery/tablesorter-master/js/jquery.tablesorter.combined.js - About 1 hr to fix

                                                                                                                          Function sortNumericDesc has 6 arguments (exceeds 4 allowed). Consider refactoring.
                                                                                                                          Open

                                                                                                                                  sortNumericDesc : function( a, b, num, max, col, c ) {
                                                                                                                          Severity: Minor
                                                                                                                          Found in media/jquery/tablesorter-master/js/jquery.tablesorter.combined.js - About 45 mins to fix

                                                                                                                            Function sortNumericAsc has 6 arguments (exceeds 4 allowed). Consider refactoring.
                                                                                                                            Open

                                                                                                                                    sortNumericAsc : function( a, b, num, max, col, c ) {
                                                                                                                            Severity: Minor
                                                                                                                            Found in media/jquery/tablesorter-master/js/jquery.tablesorter.combined.js - About 45 mins to fix

                                                                                                                              Avoid deeply nested control flow statements.
                                                                                                                              Open

                                                                                                                                                          if ( !extractor ) {
                                                                                                                                                              // For now, maybe detect someday
                                                                                                                                                              extractor = false;
                                                                                                                                                          }
                                                                                                                              Severity: Major
                                                                                                                              Found in media/jquery/tablesorter-master/js/jquery.tablesorter.combined.js - About 45 mins to fix

                                                                                                                                Avoid deeply nested control flow statements.
                                                                                                                                Open

                                                                                                                                                            if ( hasParser && ( parsers[ cacheIndex ].type || '' ).toLowerCase() === 'numeric' ) {
                                                                                                                                                                // determine column max value (ignore sign)
                                                                                                                                                                colMax[ cacheIndex ] = Math.max( Math.abs( txt ) || 0, colMax[ cacheIndex ] || 0 );
                                                                                                                                                            }
                                                                                                                                Severity: Major
                                                                                                                                Found in media/jquery/tablesorter-master/js/jquery.tablesorter.combined.js - About 45 mins to fix

                                                                                                                                  Avoid deeply nested control flow statements.
                                                                                                                                  Open

                                                                                                                                                              if ( tmp[1] === 2 ) {
                                                                                                                                                                  c.sortList.splice( indx, 1 );
                                                                                                                                                                  c.sortVars[ col ].count = -1;
                                                                                                                                                              }
                                                                                                                                  Severity: Major
                                                                                                                                  Found in media/jquery/tablesorter-master/js/jquery.tablesorter.combined.js - About 45 mins to fix

                                                                                                                                    Avoid deeply nested control flow statements.
                                                                                                                                    Open

                                                                                                                                                                if ( fxn ) {
                                                                                                                                                                    // updating so the extra options are appended
                                                                                                                                                                    tsf.buildSelect( c.table, column, '', true, $header.hasClass( wo.filter_onlyAvail ) );
                                                                                                                                                                }
                                                                                                                                    Severity: Major
                                                                                                                                    Found in media/jquery/tablesorter-master/js/jquery.tablesorter.combined.js - About 45 mins to fix

                                                                                                                                      Avoid deeply nested control flow statements.
                                                                                                                                      Open

                                                                                                                                                                  if ( buildFilter && ( buildFilter.parent().length === 0 ||
                                                                                                                                                                      ( buildFilter.parent().length && buildFilter.parent()[0] !== $filter[0] ) ) ) {
                                                                                                                                                                      $filter.append( buildFilter );
                                                                                                                                                                  }
                                                                                                                                      Severity: Major
                                                                                                                                      Found in media/jquery/tablesorter-master/js/jquery.tablesorter.combined.js - About 45 mins to fix

                                                                                                                                        Avoid deeply nested control flow statements.
                                                                                                                                        Open

                                                                                                                                                                    if ( !hasParser && c.debug ) {
                                                                                                                                                                        console.warn( 'No parser found for row: ' + rowIndex + ', column: ' + colIndex +
                                                                                                                                                                            '; cell containing: "' + $(cell).text() + '"; does it have a header?' );
                                                                                                                                                                    }
                                                                                                                                        Severity: Major
                                                                                                                                        Found in media/jquery/tablesorter-master/js/jquery.tablesorter.combined.js - About 45 mins to fix

                                                                                                                                          Avoid deeply nested control flow statements.
                                                                                                                                          Open

                                                                                                                                                                      if ( !$sorted[ column ].sortDisabled ) {
                                                                                                                                                                          updateColumnSort( $sorted.eq( column ) , list[ indx ][ 1 ] );
                                                                                                                                                                      }
                                                                                                                                          Severity: Major
                                                                                                                                          Found in media/jquery/tablesorter-master/js/jquery.tablesorter.combined.js - About 45 mins to fix

                                                                                                                                            Avoid deeply nested control flow statements.
                                                                                                                                            Open

                                                                                                                                                                        for ( indx = 1; indx < childLen; indx++ ) {
                                                                                                                                                                            child =  cache.normalized[ rowIndex ][ c.columns ].$row.eq( indx ).children().eq( column );
                                                                                                                                                                            arry[ arry.length ] = '' + ts.getElementText( c, child, column );
                                                                                                                                                                        }
                                                                                                                                            Severity: Major
                                                                                                                                            Found in media/jquery/tablesorter-master/js/jquery.tablesorter.combined.js - About 45 mins to fix

                                                                                                                                              Avoid deeply nested control flow statements.
                                                                                                                                              Open

                                                                                                                                                                          if ( !parser ) {
                                                                                                                                                                              parser = ts.detectParserForColumn( c, rows, -1, colIndex );
                                                                                                                                                                          }
                                                                                                                                              Severity: Major
                                                                                                                                              Found in media/jquery/tablesorter-master/js/jquery.tablesorter.combined.js - About 45 mins to fix

                                                                                                                                                Avoid deeply nested control flow statements.
                                                                                                                                                Open

                                                                                                                                                                            if ( c.debug ) {
                                                                                                                                                                                debug[ '(' + colIndex + ') ' + header.text() ] = {
                                                                                                                                                                                    parser : parser.id,
                                                                                                                                                                                    extractor : extractor ? extractor.id : 'none',
                                                                                                                                                                                    string : c.strings[ colIndex ],
                                                                                                                                                Severity: Major
                                                                                                                                                Found in media/jquery/tablesorter-master/js/jquery.tablesorter.combined.js - About 45 mins to fix

                                                                                                                                                  Avoid deeply nested control flow statements.
                                                                                                                                                  Open

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

                                                                                                                                                    Avoid deeply nested control flow statements.
                                                                                                                                                    Open

                                                                                                                                                                                if ( noParser ) {
                                                                                                                                                                                    parser = ts.getParserById( 'no-parser' );
                                                                                                                                                                                }
                                                                                                                                                    Severity: Major
                                                                                                                                                    Found in media/jquery/tablesorter-master/js/jquery.tablesorter.combined.js - About 45 mins to fix

                                                                                                                                                      Avoid deeply nested control flow statements.
                                                                                                                                                      Open

                                                                                                                                                                                  if ( fxn === true ) {
                                                                                                                                                                                      // default selector uses exact match unless 'filter-match' class is found
                                                                                                                                                                                      result = data.isMatch ?
                                                                                                                                                                                          // data.iExact may be a number
                                                                                                                                                                                          ( '' + data.iExact ).search( data.iFilter ) >= 0 :
                                                                                                                                                      Severity: Major
                                                                                                                                                      Found in media/jquery/tablesorter-master/js/jquery.tablesorter.combined.js - About 45 mins to fix

                                                                                                                                                        Avoid deeply nested control flow statements.
                                                                                                                                                        Open

                                                                                                                                                                                    for ( indx = 0; indx < childRow.length; indx++ ) {
                                                                                                                                                                                        txt += ' ' + childRow[indx].join( ' ' ) || '';
                                                                                                                                                                                    }
                                                                                                                                                        Severity: Major
                                                                                                                                                        Found in media/jquery/tablesorter-master/js/jquery.tablesorter.combined.js - About 45 mins to fix

                                                                                                                                                          Avoid deeply nested control flow statements.
                                                                                                                                                          Open

                                                                                                                                                                                      if ( span > 0 ) {
                                                                                                                                                                                          colIndex += span;
                                                                                                                                                                                          max += span;
                                                                                                                                                                                          while ( span + 1 > 0 ) {
                                                                                                                                                                                              // set colspan columns to use the same parsers & extractors
                                                                                                                                                          Severity: Major
                                                                                                                                                          Found in media/jquery/tablesorter-master/js/jquery.tablesorter.combined.js - About 45 mins to fix

                                                                                                                                                            Avoid deeply nested control flow statements.
                                                                                                                                                            Open

                                                                                                                                                                                        if ( temp ) {
                                                                                                                                                                                            tmp = c.sortList[ 0 ][ 1 ];
                                                                                                                                                                                            switch ( temp[ 0 ] ) {
                                                                                                                                                                                                case 'd' :
                                                                                                                                                                                                    dir = 1;
                                                                                                                                                            Severity: Major
                                                                                                                                                            Found in media/jquery/tablesorter-master/js/jquery.tablesorter.combined.js - About 45 mins to fix

                                                                                                                                                              Avoid deeply nested control flow statements.
                                                                                                                                                              Open

                                                                                                                                                                                          if ( wo.filter_childByColumn ) {
                                                                                                                                                                                              if ( !wo.filter_childWithSibs ) {
                                                                                                                                                                                                  // hide all child rows
                                                                                                                                                                                                  childRow.addClass( wo.filter_filteredRow );
                                                                                                                                                                                                  // if only showing resulting child row, only include parent
                                                                                                                                                              Severity: Major
                                                                                                                                                              Found in media/jquery/tablesorter-master/js/jquery.tablesorter.combined.js - About 45 mins to fix

                                                                                                                                                                Avoid deeply nested control flow statements.
                                                                                                                                                                Open

                                                                                                                                                                                            for ( indx = 0; indx < childLen; indx++ ) {
                                                                                                                                                                                                arry[ arry.length ] = '' + cache.normalized[ rowIndex ][ c.columns ].child[ indx ][ column ];
                                                                                                                                                                                            }
                                                                                                                                                                Severity: Major
                                                                                                                                                                Found in media/jquery/tablesorter-master/js/jquery.tablesorter.combined.js - About 45 mins to fix

                                                                                                                                                                  Avoid deeply nested control flow statements.
                                                                                                                                                                  Open

                                                                                                                                                                                              if ( span > 0 ) {
                                                                                                                                                                                                  index = 0;
                                                                                                                                                                                                  while ( index <= span ) {
                                                                                                                                                                                                      // duplicate text (or not) to spanned columns
                                                                                                                                                                                                      // instead of setting duplicate span to empty string, use textExtraction to try to get a value
                                                                                                                                                                  Severity: Major
                                                                                                                                                                  Found in media/jquery/tablesorter-master/js/jquery.tablesorter.combined.js - About 45 mins to fix

                                                                                                                                                                    Avoid deeply nested control flow statements.
                                                                                                                                                                    Open

                                                                                                                                                                                                for ( indx = 1; indx < th.colSpan; indx++ ) {
                                                                                                                                                                                                    c.sortList[ c.sortList.length ] = [ col + indx, dir ];
                                                                                                                                                                                                    // update count on columns in colSpan
                                                                                                                                                                                                    c.sortVars[ col + indx ].count = $.inArray( dir, order );
                                                                                                                                                                                                }
                                                                                                                                                                    Severity: Major
                                                                                                                                                                    Found in media/jquery/tablesorter-master/js/jquery.tablesorter.combined.js - About 45 mins to fix

                                                                                                                                                                      Avoid deeply nested control flow statements.
                                                                                                                                                                      Open

                                                                                                                                                                                                  if ( injected ) {
                                                                                                                                                                                                      data.anyMatchFilter = query.join( ' && ' );
                                                                                                                                                                                                  }
                                                                                                                                                                      Severity: Major
                                                                                                                                                                      Found in media/jquery/tablesorter-master/js/jquery.tablesorter.combined.js - About 45 mins to fix

                                                                                                                                                                        Avoid deeply nested control flow statements.
                                                                                                                                                                        Open

                                                                                                                                                                                                    if ( cell ) {
                                                                                                                                                                                                        prevRowData.child[ len ][ colIndex ] = ts.getParsedText( c, cell, colIndex );
                                                                                                                                                                                                        span = $cells[ colIndex ].colSpan - 1;
                                                                                                                                                                                                        if ( span > 0 ) {
                                                                                                                                                                                                            cacheIndex += span;
                                                                                                                                                                        Severity: Major
                                                                                                                                                                        Found in media/jquery/tablesorter-master/js/jquery.tablesorter.combined.js - About 45 mins to fix

                                                                                                                                                                          Avoid deeply nested control flow statements.
                                                                                                                                                                          Open

                                                                                                                                                                                                      for ( string in fxn ) {
                                                                                                                                                                                                          if ( typeof string === 'string' ) {
                                                                                                                                                                                                              options += options === '' ?
                                                                                                                                                                                                                  '<option value="">' +
                                                                                                                                                                                                                      ( $header.data( 'placeholder' ) ||
                                                                                                                                                                          Severity: Major
                                                                                                                                                                          Found in media/jquery/tablesorter-master/js/jquery.tablesorter.combined.js - About 45 mins to fix

                                                                                                                                                                            Avoid deeply nested control flow statements.
                                                                                                                                                                            Open

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

                                                                                                                                                                              Avoid deeply nested control flow statements.
                                                                                                                                                                              Open

                                                                                                                                                                                                          if ( buildFilter && buildFilter.length === 0 ) {
                                                                                                                                                                                                              buildFilter = $filter.children( 'input' );
                                                                                                                                                                                                          }
                                                                                                                                                                              Severity: Major
                                                                                                                                                                              Found in media/jquery/tablesorter-master/js/jquery.tablesorter.combined.js - About 45 mins to fix

                                                                                                                                                                                Avoid deeply nested control flow statements.
                                                                                                                                                                                Open

                                                                                                                                                                                                            if ( option.hasOwnProperty( val ) && val !== 'text' ) {
                                                                                                                                                                                                                options += ' ' + val + '="' + option[ val ] + '"';
                                                                                                                                                                                                            }
                                                                                                                                                                                Severity: Major
                                                                                                                                                                                Found in media/jquery/tablesorter-master/js/jquery.tablesorter.combined.js - About 45 mins to fix

                                                                                                                                                                                  Avoid deeply nested control flow statements.
                                                                                                                                                                                  Open

                                                                                                                                                                                                          if ( $.isArray( setFilters ) ) {
                                                                                                                                                                                                              // skip first ( latest input ) to maintain cursor position while typing
                                                                                                                                                                                                              if ( skipFirst && $column.length > 1 ) {
                                                                                                                                                                                                                  $column = $column.slice( 1 );
                                                                                                                                                                                                              }
                                                                                                                                                                                  Severity: Major
                                                                                                                                                                                  Found in media/jquery/tablesorter-master/js/jquery.tablesorter.combined.js - About 45 mins to fix

                                                                                                                                                                                    Avoid deeply nested control flow statements.
                                                                                                                                                                                    Open

                                                                                                                                                                                                                if ( $.inArray( setting, ignore ) < 0 && typ === 'undefined' ) {
                                                                                                                                                                                                                    console.warn( 'Tablesorter Warning! "table.config.' + setting + '.' + setting2 + '" option not recognized' );
                                                                                                                                                                                                                }
                                                                                                                                                                                    Severity: Major
                                                                                                                                                                                    Found in media/jquery/tablesorter-master/js/jquery.tablesorter.combined.js - About 45 mins to fix

                                                                                                                                                                                      Avoid deeply nested control flow statements.
                                                                                                                                                                                      Open

                                                                                                                                                                                                              if ( txt.indexOf( wo.filter_selectSourceSeparator ) >= 0 ) {
                                                                                                                                                                                                                  t = txt.split( wo.filter_selectSourceSeparator );
                                                                                                                                                                                                                  val = t[0];
                                                                                                                                                                                                                  txt = t[1];
                                                                                                                                                                                                              }
                                                                                                                                                                                      Severity: Major
                                                                                                                                                                                      Found in media/jquery/tablesorter-master/js/jquery.tablesorter.combined.js - About 45 mins to fix

                                                                                                                                                                                        Avoid deeply nested control flow statements.
                                                                                                                                                                                        Open

                                                                                                                                                                                                                    for ( indx = 0; indx < query.length; indx++ ) {
                                                                                                                                                                                                                        res = query[ indx ].split( ':' );
                                                                                                                                                                                                                        if ( res.length > 1 ) {
                                                                                                                                                                                                                            // make the column a one-based index ( non-developers start counting from one :P )
                                                                                                                                                                                                                            if ( isNaN( res[0] ) ) {
                                                                                                                                                                                        Severity: Major
                                                                                                                                                                                        Found in media/jquery/tablesorter-master/js/jquery.tablesorter.combined.js - About 45 mins to fix

                                                                                                                                                                                          Avoid deeply nested control flow statements.
                                                                                                                                                                                          Open

                                                                                                                                                                                                                      if ( !searchFiltered ) { indx = columnIndex; }
                                                                                                                                                                                          Severity: Major
                                                                                                                                                                                          Found in media/jquery/tablesorter-master/js/jquery.tablesorter.combined.js - About 45 mins to fix

                                                                                                                                                                                            Consider simplifying this complex logical expression.
                                                                                                                                                                                            Open

                                                                                                                                                                                                                    if ( header && header.length ) {
                                                                                                                                                                                                                        // get column indexed table cell; adding true parameter fixes #1362 but
                                                                                                                                                                                                                        // it would break backwards compatibility...
                                                                                                                                                                                                                        configHeaders = ts.getColumnData( table, c.headers, colIndex ); // , true );
                                                                                                                                                                                                                        // get column parser/extractor
                                                                                                                                                                                            Severity: Major
                                                                                                                                                                                            Found in media/jquery/tablesorter-master/js/jquery.tablesorter.combined.js - About 40 mins to fix

                                                                                                                                                                                              Consider simplifying this complex logical expression.
                                                                                                                                                                                              Open

                                                                                                                                                                                                              if ( $header && $header.length ) {
                                                                                                                                                                                                                  // $filter = c.$filters.filter( '[data-column="' + column + '"]' );
                                                                                                                                                                                                                  $filter = tsf.getColumnElm( c, c.$filters, column );
                                                                                                                                                                                                                  ffxn = ts.getColumnData( table, wo.filter_functions, column );
                                                                                                                                                                                                                  makeSelect = ( wo.filter_functions && ffxn && typeof ffxn !== 'function' ) ||
                                                                                                                                                                                              Severity: Major
                                                                                                                                                                                              Found in media/jquery/tablesorter-master/js/jquery.tablesorter.combined.js - About 40 mins to fix

                                                                                                                                                                                                Consider simplifying this complex logical expression.
                                                                                                                                                                                                Open

                                                                                                                                                                                                        if ( ( getRaw !== true && wo && !wo.filter_columnFilters ) ||
                                                                                                                                                                                                            // setFilters called, but last search is exactly the same as the current
                                                                                                                                                                                                            // fixes issue #733 & #903 where calling update causes the input values to reset
                                                                                                                                                                                                            ( $.isArray(setFilters) && tsf.equalFilters(c, setFilters, c.lastSearch) )
                                                                                                                                                                                                        ) {
                                                                                                                                                                                                Severity: Major
                                                                                                                                                                                                Found in media/jquery/tablesorter-master/js/jquery.tablesorter.combined.js - About 40 mins to fix

                                                                                                                                                                                                  Consider simplifying this complex logical expression.
                                                                                                                                                                                                  Open

                                                                                                                                                                                                                  if ( tsfRegex.toTest.test( data.iFilter ) ) {
                                                                                                                                                                                                                      var result, tmp, range1, range2,
                                                                                                                                                                                                                          table = c.table,
                                                                                                                                                                                                                          index = data.index,
                                                                                                                                                                                                                          parsed = data.parsed[index],
                                                                                                                                                                                                  Severity: Major
                                                                                                                                                                                                  Found in media/jquery/tablesorter-master/js/jquery.tablesorter.combined.js - About 40 mins to fix

                                                                                                                                                                                                    Consider simplifying this complex logical expression.
                                                                                                                                                                                                    Open

                                                                                                                                                                                                                        if ( ( wo.filter_$anyMatch && wo.filter_$anyMatch.length ) ||
                                                                                                                                                                                                                            typeof filters[c.columns] !== 'undefined' ) {
                                                                                                                                                                                                                            data.anyMatchFlag = true;
                                                                                                                                                                                                                            data.anyMatchFilter = '' + (
                                                                                                                                                                                                                                filters[ c.columns ] ||
                                                                                                                                                                                                    Severity: Major
                                                                                                                                                                                                    Found in media/jquery/tablesorter-master/js/jquery.tablesorter.combined.js - About 40 mins to fix

                                                                                                                                                                                                      Consider simplifying this complex logical expression.
                                                                                                                                                                                                      Open

                                                                                                                                                                                                                      if ( tsfRegex.andTest.test( data.filter ) ) {
                                                                                                                                                                                                                          var indx, filterMatched, result, query, regex,
                                                                                                                                                                                                                              // duplicate data but split filter
                                                                                                                                                                                                                              data2 = $.extend( {}, data ),
                                                                                                                                                                                                                              filter = data.filter.split( tsfRegex.andSplit ),
                                                                                                                                                                                                      Severity: Major
                                                                                                                                                                                                      Found in media/jquery/tablesorter-master/js/jquery.tablesorter.combined.js - About 40 mins to fix

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

                                                                                                                                                                                                                getColumnData : function( table, obj, indx, getCell, $headers ) {
                                                                                                                                                                                                        Severity: Minor
                                                                                                                                                                                                        Found in media/jquery/tablesorter-master/js/jquery.tablesorter.combined.js - About 35 mins to fix

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

                                                                                                                                                                                                                  buildSelect: function( table, column, arry, updating, onlyAvail ) {
                                                                                                                                                                                                          Severity: Minor
                                                                                                                                                                                                          Found in media/jquery/tablesorter-master/js/jquery.tablesorter.combined.js - About 35 mins to fix

                                                                                                                                                                                                            Avoid too many return statements within this function.
                                                                                                                                                                                                            Open

                                                                                                                                                                                                                        return $.trim( $node[ 0 ].textContent || $node.text() );
                                                                                                                                                                                                            Severity: Major
                                                                                                                                                                                                            Found in media/jquery/tablesorter-master/js/jquery.tablesorter.combined.js - About 30 mins to fix

                                                                                                                                                                                                              Avoid too many return statements within this function.
                                                                                                                                                                                                              Open

                                                                                                                                                                                                                          return 0;
                                                                                                                                                                                                              Severity: Major
                                                                                                                                                                                                              Found in media/jquery/tablesorter-master/js/jquery.tablesorter.combined.js - About 30 mins to fix

                                                                                                                                                                                                                Avoid too many return statements within this function.
                                                                                                                                                                                                                Open

                                                                                                                                                                                                                                if ( aFloat < bFloat ) { return -1; }
                                                                                                                                                                                                                Severity: Major
                                                                                                                                                                                                                Found in media/jquery/tablesorter-master/js/jquery.tablesorter.combined.js - About 30 mins to fix

                                                                                                                                                                                                                  Avoid too many return statements within this function.
                                                                                                                                                                                                                  Open

                                                                                                                                                                                                                                      return $.trim( tmp( $node[ 0 ], c.table, cellIndex ) );
                                                                                                                                                                                                                  Severity: Major
                                                                                                                                                                                                                  Found in media/jquery/tablesorter-master/js/jquery.tablesorter.combined.js - About 30 mins to fix

                                                                                                                                                                                                                    Avoid too many return statements within this function.
                                                                                                                                                                                                                    Open

                                                                                                                                                                                                                                    if ( aFloat > bFloat ) { return 1; }
                                                                                                                                                                                                                    Severity: Major
                                                                                                                                                                                                                    Found in media/jquery/tablesorter-master/js/jquery.tablesorter.combined.js - About 30 mins to fix

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

                                                                                                                                                                                                                      (function(factory) {
                                                                                                                                                                                                                          if (typeof define === 'function' && define.amd) {
                                                                                                                                                                                                                              define(['jquery'], factory);
                                                                                                                                                                                                                          } else if (typeof module === 'object' && typeof module.exports === 'object') {
                                                                                                                                                                                                                              module.exports = factory(require('jquery'));
                                                                                                                                                                                                                      media/jquery/tablesorter-master/dist/js/jquery.tablesorter.combined.js on lines 3..6024

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

                                                                                                                                                                                                                      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