mambax7/alumni-26x

View on GitHub
media/jquery/tablesorter-master/js/widgets/widget-filter-formatter-html5.js

Summary

Maintainability
F
6 days
Test Coverage

Function html5Number has 102 lines of code (exceeds 25 allowed). Consider refactoring.
Open

        html5Number : function($cell, indx, def5Num) {
            var t, o = $.extend({
                value : 0,
                min : 0,
                max : 100,

    File widget-filter-formatter-html5.js has 325 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    /*! Widget: filter, html5 formatter functions - updated 7/17/2014 (v2.17.5) *//*
     * requires: tableSorter (FORK) 2.15+ and jQuery 1.4.3+
     *
     * html5Number (spinner)
     * html5Range (slider)

      Function html5Range has 93 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

              html5Range : function($cell, indx, def5Range) {
                  var o = $.extend({
                      value : 0,
                      min : 0,
                      max : 100,

        Function html5Color has 85 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

                html5Color: function($cell, indx, defColor) {
                    var t, o = $.extend({
                        value : '#000000',
                        disabled : false,
                        addToggle : true,

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

                      updateColor = function(v, notrigger) {
                          v = ( typeof v === 'undefined' ? $input.val() : v ).toString().replace('=', '') || o.value;
                          var chkd = true,
                              t = ' (' + v + ')';
                          if (o.addToggle) {

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

                    addCompare: function($cell, indx, options){
                        if (options.compare && $.isArray(options.compare) && options.compare.length > 1) {
                            var opt = '',
                                compareSelectClass = [ compareSelect.slice(1), ' ' + compareSelect.slice(1), '' ],
                                txt = options.cellText ? '<label class="' + compareSelectClass.join('-label') + indx + '">' + options.cellText + '</label>' : '';
            media/jquery/tablesorter-master/js/widgets/widget-filter-formatter-jui.js on lines 22..36

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

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

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

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

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

            Refactorings

            Further Reading

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

                    updateCompare : function($cell, $input, o) {
                        var val = $input.val() || '',
                            num = val.replace(/\s*?[><=]\s*?/g, ''),
                            compare = val.match(/[><=]/g) || '';
                        if (o.compare) {
            media/jquery/tablesorter-master/js/widgets/widget-filter-formatter-jui.js on lines 38..49

            Duplicated Code

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

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

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

            Tuning

            This issue has a mass of 157.

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

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

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

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

            Refactorings

            Further Reading

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

                                if (o.compare) {
                                    // add compare select
                                    tsff.addCompare($shcell, indx, o);
                                    $shcell.find(compareSelect).bind('change', function(){
                                        $cell.find(compareSelect).val( $(this).val() );
            media/jquery/tablesorter-master/js/widgets/widget-filter-formatter-html5.js on lines 160..167
            media/jquery/tablesorter-master/js/widgets/widget-filter-formatter-jui.js on lines 180..187
            media/jquery/tablesorter-master/js/widgets/widget-filter-formatter-jui.js on lines 342..349
            media/jquery/tablesorter-master/js/widgets/widget-filter-formatter-jui.js on lines 609..616

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

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

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

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

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

            Refactorings

            Further Reading

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

                                if (o.compare) {
                                    // add compare select
                                    tsff.addCompare($shcell, indx, o);
                                    $shcell.find(compareSelect).bind('change', function(){
                                        $cell.find(compareSelect).val( $(this).val() );
            media/jquery/tablesorter-master/js/widgets/widget-filter-formatter-html5.js on lines 281..288
            media/jquery/tablesorter-master/js/widgets/widget-filter-formatter-jui.js on lines 180..187
            media/jquery/tablesorter-master/js/widgets/widget-filter-formatter-jui.js on lines 342..349
            media/jquery/tablesorter-master/js/widgets/widget-filter-formatter-jui.js on lines 609..616

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

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

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

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

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

            Refactorings

            Further Reading

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

                                compare = ($.isArray(o.compare) ? $cell.find(compareSelect).val() || o.compare[ o.selected || 0] : o.compare) || '',
            media/jquery/tablesorter-master/js/widgets/widget-filter-formatter-html5.js on lines 210..210
            media/jquery/tablesorter-master/js/widgets/widget-filter-formatter-html5.js on lines 243..243
            media/jquery/tablesorter-master/js/widgets/widget-filter-formatter-jui.js on lines 86..86
            media/jquery/tablesorter-master/js/widgets/widget-filter-formatter-jui.js on lines 245..245
            media/jquery/tablesorter-master/js/widgets/widget-filter-formatter-jui.js on lines 523..523

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

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

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

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

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

            Refactorings

            Further Reading

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

                            var compare = ($.isArray(o.compare) ? $cell.find(compareSelect).val() || o.compare[ o.selected || 0] : o.compare) || '',
            media/jquery/tablesorter-master/js/widgets/widget-filter-formatter-html5.js on lines 78..78
            media/jquery/tablesorter-master/js/widgets/widget-filter-formatter-html5.js on lines 243..243
            media/jquery/tablesorter-master/js/widgets/widget-filter-formatter-jui.js on lines 86..86
            media/jquery/tablesorter-master/js/widgets/widget-filter-formatter-jui.js on lines 245..245
            media/jquery/tablesorter-master/js/widgets/widget-filter-formatter-jui.js on lines 523..523

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

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

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

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

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

            Refactorings

            Further Reading

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

                                    compare = ($.isArray(o.compare) ? $cell.find(compareSelect).val() || o.compare[ o.selected || 0] : o.compare) || '';
            media/jquery/tablesorter-master/js/widgets/widget-filter-formatter-html5.js on lines 78..78
            media/jquery/tablesorter-master/js/widgets/widget-filter-formatter-html5.js on lines 210..210
            media/jquery/tablesorter-master/js/widgets/widget-filter-formatter-jui.js on lines 86..86
            media/jquery/tablesorter-master/js/widgets/widget-filter-formatter-jui.js on lines 245..245
            media/jquery/tablesorter-master/js/widgets/widget-filter-formatter-jui.js on lines 523..523

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

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

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

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

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

            Refactorings

            Further Reading

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

                                    if ($.isArray(o.compare)) {
                                        $cell.add($shcell).find(compareSelect).val( o.compare[ o.selected || 0 ] );
                                    }
            media/jquery/tablesorter-master/js/widgets/widget-filter-formatter-jui.js on lines 193..195

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

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

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

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

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

            Refactorings

            Further Reading

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

                                if ($.isArray(o.compare)) {
                                    $cell.add($shcell).find(compareSelect).val( o.compare[ o.selected || 0 ] );
                                }
            media/jquery/tablesorter-master/js/widgets/widget-filter-formatter-jui.js on lines 320..322
            media/jquery/tablesorter-master/js/widgets/widget-filter-formatter-jui.js on lines 562..564

            Duplicated Code

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

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

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

            Tuning

            This issue has a mass of 62.

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

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

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

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

            Refactorings

            Further Reading

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

                            if (o.compare) {
                                // add compare select
                                tsff.addCompare($cell, indx, o);
                                $cell.find(compareSelect).bind('change', function(){
                                    updateRange();
            media/jquery/tablesorter-master/js/widgets/widget-filter-formatter-html5.js on lines 142..148
            media/jquery/tablesorter-master/js/widgets/widget-filter-formatter-jui.js on lines 149..155
            media/jquery/tablesorter-master/js/widgets/widget-filter-formatter-jui.js on lines 591..597

            Duplicated Code

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

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

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

            Tuning

            This issue has a mass of 59.

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

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

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

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

            Refactorings

            Further Reading

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

                            if (o.compare) {
                                // add compare select
                                tsff.addCompare($cell, indx, o);
                                $cell.find(compareSelect).bind('change', function(){
                                    updateNumber();
            media/jquery/tablesorter-master/js/widgets/widget-filter-formatter-html5.js on lines 263..269
            media/jquery/tablesorter-master/js/widgets/widget-filter-formatter-jui.js on lines 149..155
            media/jquery/tablesorter-master/js/widgets/widget-filter-formatter-jui.js on lines 591..597

            Duplicated Code

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

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

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

            Tuning

            This issue has a mass of 59.

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

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

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

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

            Refactorings

            Further Reading

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

                            $cell
                                .html('<input type="hidden"><input class="range" type="range" min="' + o.min + '" max="' + o.max + '" value="' + o.value + '" />')
                                .closest('thead').find('th[data-column=' + indx + ']')
            media/jquery/tablesorter-master/js/widgets/widget-filter-formatter-html5.js on lines 274..278

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

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

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

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

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

            Refactorings

            Further Reading

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

                                $shcell
                                    .html('<input class="range" type="range" min="' + o.min + '" max="' + o.max + '" value="' + o.value + '" />')
                                    .find('.range').bind('change', function(){
                                        updateRange( $shcell.find('.range').val() );
                                    });
            media/jquery/tablesorter-master/js/widgets/widget-filter-formatter-html5.js on lines 233..235

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

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

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

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

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

            Refactorings

            Further Reading

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

                                if (o.valueToHeader) {
                                    // add current color to the header cell
                                    $shcell.closest('thead').find('th[data-column=' + indx + ']').find('.curcolor').html(t);
                                } else {
                                    // current color to span in cell
            media/jquery/tablesorter-master/js/widgets/widget-filter-formatter-html5.js on lines 342..348

            Duplicated Code

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

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

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

            Tuning

            This issue has a mass of 49.

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

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

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

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

            Refactorings

            Further Reading

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

                            if (o.valueToHeader) {
                                // add current color to the header cell
                                $cell.closest('thead').find('th[data-column=' + indx + ']').find('.curcolor').html(t);
                            } else {
                                // current color to span in cell
            media/jquery/tablesorter-master/js/widgets/widget-filter-formatter-html5.js on lines 356..362

            Duplicated Code

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

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

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

            Tuning

            This issue has a mass of 49.

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

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

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

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

            Refactorings

            Further Reading

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

                                $shcell = c.widgetOptions.$sticky.find('.tablesorter-filter-row').children().eq(indx).empty();
            media/jquery/tablesorter-master/js/widgets/widget-filter-formatter-html5.js on lines 273..273
            media/jquery/tablesorter-master/js/widgets/widget-filter-formatter-jui.js on lines 159..159
            media/jquery/tablesorter-master/js/widgets/widget-filter-formatter-jui.js on lines 743..743

            Duplicated Code

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

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

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

            Tuning

            This issue has a mass of 45.

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

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

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

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

            Refactorings

            Further Reading

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

                                $shcell = c.widgetOptions.$sticky.find('.tablesorter-filter-row').children().eq(indx).empty();
            media/jquery/tablesorter-master/js/widgets/widget-filter-formatter-html5.js on lines 152..152
            media/jquery/tablesorter-master/js/widgets/widget-filter-formatter-jui.js on lines 159..159
            media/jquery/tablesorter-master/js/widgets/widget-filter-formatter-jui.js on lines 743..743

            Duplicated Code

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

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

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

            Tuning

            This issue has a mass of 45.

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

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

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

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

            Refactorings

            Further Reading

            There are no issues that match your filters.

            Category
            Status