brynary/rack-bug

View on GitHub

Showing 86 of 86 total issues

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

            event.pageX = event.clientX + (doc && doc.scrollLeft || body && body.scrollLeft || 0) - (doc.clientLeft || 0);
Severity: Major
Found in lib/rack/bug/public/__rack_bug__/jquery-1.3.2.js and 1 other location - About 1 hr to fix
lib/rack/bug/public/__rack_bug__/jquery-1.3.2.js on lines 2742..2742

Duplicated Code

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

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

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

Tuning

This issue has a mass of 55.

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

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

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

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

Refactorings

Further Reading

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

            event.pageY = event.clientY + (doc && doc.scrollTop || body && body.scrollTop || 0) - (doc.clientTop || 0);
Severity: Major
Found in lib/rack/bug/public/__rack_bug__/jquery-1.3.2.js and 1 other location - About 1 hr to fix
lib/rack/bug/public/__rack_bug__/jquery-1.3.2.js on lines 2741..2741

Duplicated Code

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

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

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

Tuning

This issue has a mass of 55.

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

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

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

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

Refactorings

Further Reading

Avoid deeply nested control flow statements.
Open

                            if ( !jQuery.event.special[type] || jQuery.event.special[type].teardown.call(elem, namespaces) === false ) {
                                if (elem.removeEventListener)
                                    elem.removeEventListener(type, jQuery.data(elem, "handle"), false);
                                else if (elem.detachEvent)
                                    elem.detachEvent("on" + type, jQuery.data(elem, "handle"));
Severity: Major
Found in lib/rack/bug/public/__rack_bug__/jquery-1.3.2.js - About 45 mins to fix

    Avoid deeply nested control flow statements.
    Open

                            if ( option.selected ) {
                                // Get the specifc value for the option
                                value = jQuery(option).val();
    
                                // We don't need an array for one selects
    Severity: Major
    Found in lib/rack/bug/public/__rack_bug__/jquery-1.3.2.js - About 45 mins to fix

      Avoid deeply nested control flow statements.
      Open

                          if ( !anyFound ) {
                              return [];
                          }
      Severity: Major
      Found in lib/rack/bug/public/__rack_bug__/jquery-1.3.2.js - About 45 mins to fix

        Avoid deeply nested control flow statements.
        Open

                            if ( results[i] === results[i-1] ) {
                                results.splice(i--, 1);
                            }
        Severity: Major
        Found in lib/rack/bug/public/__rack_bug__/jquery-1.3.2.js - About 45 mins to fix

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

          function dirCheck( dir, cur, doneName, checkSet, nodeCheck, isXML ) {
          Severity: Minor
          Found in lib/rack/bug/public/__rack_bug__/jquery-1.3.2.js - About 45 mins to fix

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

                    ATTR: function(match, curLoop, inplace, result, not, isXML){
            Severity: Minor
            Found in lib/rack/bug/public/__rack_bug__/jquery-1.3.2.js - About 45 mins to fix

              Avoid deeply nested control flow statements.
              Open

                                      if ( display === "none" )
                                          display = "block";
              Severity: Major
              Found in lib/rack/bug/public/__rack_bug__/jquery-1.3.2.js - About 45 mins to fix

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

                        CLASS: function(match, curLoop, inplace, result, not, isXML){
                Severity: Minor
                Found in lib/rack/bug/public/__rack_bug__/jquery-1.3.2.js - About 45 mins to fix

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

                  function dirNodeCheck( dir, cur, doneName, checkSet, nodeCheck, isXML ) {
                  Severity: Minor
                  Found in lib/rack/bug/public/__rack_bug__/jquery-1.3.2.js - About 45 mins to fix

                    Avoid deeply nested control flow statements.
                    Open

                                        if ( !match ) {
                                            anyFound = found = true;
                                        } else if ( match === true ) {
                                            continue;
                                        }
                    Severity: Major
                    Found in lib/rack/bug/public/__rack_bug__/jquery-1.3.2.js - About 45 mins to fix

                      Avoid deeply nested control flow statements.
                      Open

                                          for ( var i = 0; (item = curLoop[i]) != null; i++ ) {
                                              if ( item ) {
                                                  found = filter( item, match, i, curLoop );
                                                  var pass = not ^ !!found;
                      
                      
                      Severity: Major
                      Found in lib/rack/bug/public/__rack_bug__/jquery-1.3.2.js - About 45 mins to fix

                        Avoid deeply nested control flow statements.
                        Open

                                            if ( typeof cur !== "string" ) {
                                                if ( elem === cur ) {
                                                    match = true;
                                                    break;
                                                }
                        Severity: Major
                        Found in lib/rack/bug/public/__rack_bug__/jquery-1.3.2.js - About 45 mins to fix

                          Avoid deeply nested control flow statements.
                          Open

                                              if ( !isXML ) {
                                                  elem.sizcache = doneName;
                                                  elem.sizset = i;
                                              }
                          Severity: Major
                          Found in lib/rack/bug/public/__rack_bug__/jquery-1.3.2.js - About 45 mins to fix

                            Avoid deeply nested control flow statements.
                            Open

                                                if ( !inplace ) {
                                                    curLoop = result;
                                                }
                            Severity: Major
                            Found in lib/rack/bug/public/__rack_bug__/jquery-1.3.2.js - About 45 mins to fix

                              Avoid deeply nested control flow statements.
                              Open

                                                          for ( var handle in events[type] )
                                                              // Handle the removal of namespaced events
                                                              if ( namespace.test(events[type][handle].type) )
                                                                  delete events[type][handle];
                              Severity: Major
                              Found in lib/rack/bug/public/__rack_bug__/jquery-1.3.2.js - About 45 mins to fix

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

                                                    this.selected = (jQuery.inArray( this.value, values ) >= 0 ||
                                                        jQuery.inArray( this.text, values ) >= 0);
                                Severity: Minor
                                Found in lib/rack/bug/public/__rack_bug__/jquery-1.3.2.js and 1 other location - About 40 mins to fix
                                lib/rack/bug/public/__rack_bug__/jquery-1.3.2.js on lines 464..465

                                Duplicated Code

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

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

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

                                Tuning

                                This issue has a mass of 49.

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

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

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

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

                                Refactorings

                                Further Reading

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

                                                this.checked = (jQuery.inArray(this.value, value) >= 0 ||
                                                    jQuery.inArray(this.name, value) >= 0);
                                Severity: Minor
                                Found in lib/rack/bug/public/__rack_bug__/jquery-1.3.2.js and 1 other location - About 40 mins to fix
                                lib/rack/bug/public/__rack_bug__/jquery-1.3.2.js on lines 471..472

                                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

                                Consider simplifying this complex logical expression.
                                Open

                                        if ( s.dataType == "script" && type == "GET" && parts
                                            && ( parts[1] && parts[1] != location.protocol || parts[2] != location.host )){
                                
                                            var head = document.getElementsByTagName("head")[0];
                                            var script = document.createElement("script");
                                Severity: Major
                                Found in lib/rack/bug/public/__rack_bug__/jquery-1.3.2.js - About 40 mins to fix
                                  Severity
                                  Category
                                  Status
                                  Source
                                  Language