diffux/diffux

View on GitHub
bower_components/jquery/src/manipulation.js

Summary

Maintainability
F
3 wks
Test Coverage

File manipulation.js has 412 lines of code (exceeds 250 allowed). Consider refactoring.
Open

define([
    "./core",
    "./var/concat",
    "./var/push",
    "./core/access",
Severity: Minor
Found in bower_components/jquery/src/manipulation.js - About 5 hrs to fix

    Function domManip has 58 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        domManip: function( args, callback ) {
    
            // Flatten any nested arrays
            args = concat.apply( [], args );
    
    
    Severity: Major
    Found in bower_components/jquery/src/manipulation.js - About 2 hrs to fix

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

          buildFragment: function( elems, context, scripts, selection ) {
              var elem, tmp, tag, wrap, contains, j,
                  fragment = context.createDocumentFragment(),
                  nodes = [],
                  i = 0,
      Severity: Minor
      Found in bower_components/jquery/src/manipulation.js - About 1 hr to fix

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

            clone: function( elem, dataAndEvents, deepDataAndEvents ) {
                var i, l, srcElements, destElements,
                    clone = elem.cloneNode( true ),
                    inPage = jQuery.contains( elem.ownerDocument, elem );
        
        
        Severity: Minor
        Found in bower_components/jquery/src/manipulation.js - About 1 hr to fix

          Avoid deeply nested control flow statements.
          Open

                                  for ( type in data.events ) {
                                      if ( special[ type ] ) {
                                          jQuery.event.remove( elem, type );
          
                                      // This is a shortcut to avoid jQuery.event.remove's overhead
          Severity: Major
          Found in bower_components/jquery/src/manipulation.js - About 45 mins to fix

            Avoid deeply nested control flow statements.
            Open

                                    if ( rscriptType.test( node.type || "" ) &&
                                        !data_priv.access( node, "globalEval" ) && jQuery.contains( doc, node ) ) {
            
                                        if ( node.src ) {
                                            // Optional AJAX dependency, but won't run scripts if not present
            Severity: Major
            Found in bower_components/jquery/src/manipulation.js - About 45 mins to fix

              Avoid deeply nested control flow statements.
              Open

                                      if ( hasScripts ) {
                                          // Support: QtWebKit
                                          // jQuery.merge because push.apply(_, arraylike) throws
                                          jQuery.merge( scripts, getAll( node, "script" ) );
                                      }
              Severity: Major
              Found in bower_components/jquery/src/manipulation.js - About 45 mins to fix

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

                jQuery.fn.extend({
                    text: function( value ) {
                        return access( this, function( value ) {
                            return value === undefined ?
                                jQuery.text( this ) :
                Severity: Major
                Found in bower_components/jquery/src/manipulation.js and 1 other location - About 1 wk to fix
                bower_components/jquery/dist/jquery.js on lines 5204..5445

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

                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

                jQuery.extend({
                    clone: function( elem, dataAndEvents, deepDataAndEvents ) {
                        var i, l, srcElements, destElements,
                            clone = elem.cloneNode( true ),
                            inPage = jQuery.contains( elem.ownerDocument, elem );
                Severity: Major
                Found in bower_components/jquery/src/manipulation.js and 1 other location - About 1 wk to fix
                bower_components/jquery/dist/jquery.js on lines 5042..5202

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

                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

                function cloneCopyEvent( src, dest ) {
                    var i, l, type, pdataOld, pdataCur, udataOld, udataCur, events;
                
                    if ( dest.nodeType !== 1 ) {
                        return;
                Severity: Major
                Found in bower_components/jquery/src/manipulation.js and 1 other location - About 1 day to fix
                bower_components/jquery/dist/jquery.js on lines 4984..5016

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

                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

                jQuery.each({
                    appendTo: "append",
                    prependTo: "prepend",
                    insertBefore: "before",
                    insertAfter: "after",
                Severity: Major
                Found in bower_components/jquery/src/manipulation.js and 1 other location - About 1 day to fix
                bower_components/jquery/dist/jquery.js on lines 5447..5472

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

                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

                function fixInput( src, dest ) {
                    var nodeName = dest.nodeName.toLowerCase();
                
                    // Fails to persist the checked state of a cloned checkbox or radio button.
                    if ( nodeName === "input" && rcheckableType.test( src.type ) ) {
                Severity: Major
                Found in bower_components/jquery/src/manipulation.js and 1 other location - About 3 hrs to fix
                bower_components/jquery/dist/jquery.js on lines 5029..5040

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

                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

                var
                    rxhtmlTag = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,
                    rtagName = /<([\w:]+)/,
                    rhtml = /<|&#?\w+;/,
                    rnoInnerhtml = /<(?:script|style|link)/i,
                Severity: Major
                Found in bower_components/jquery/src/manipulation.js and 1 other location - About 3 hrs to fix
                bower_components/jquery/dist/jquery.js on lines 4913..4936

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

                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

                function getAll( context, tag ) {
                    var ret = context.getElementsByTagName ? context.getElementsByTagName( tag || "*" ) :
                            context.querySelectorAll ? context.querySelectorAll( tag || "*" ) :
                            [];
                
                
                Severity: Major
                Found in bower_components/jquery/src/manipulation.js and 1 other location - About 3 hrs to fix
                bower_components/jquery/dist/jquery.js on lines 5018..5026

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

                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

                function manipulationTarget( elem, content ) {
                    return jQuery.nodeName( elem, "table" ) &&
                        jQuery.nodeName( content.nodeType !== 11 ? content : content.firstChild, "tr" ) ?
                
                        elem.getElementsByTagName("tbody")[0] ||
                Severity: Major
                Found in bower_components/jquery/src/manipulation.js and 1 other location - About 3 hrs to fix
                bower_components/jquery/dist/jquery.js on lines 4946..4953

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

                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

                function setGlobalEval( elems, refElements ) {
                    var i = 0,
                        l = elems.length;
                
                    for ( ; i < l; i++ ) {
                Severity: Major
                Found in bower_components/jquery/src/manipulation.js and 1 other location - About 2 hrs to fix
                bower_components/jquery/dist/jquery.js on lines 4973..4982

                Duplicated Code

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

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

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

                Tuning

                This issue has a mass of 79.

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

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

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

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

                Refactorings

                Further Reading

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

                function restoreScript( elem ) {
                    var match = rscriptTypeMasked.exec( elem.type );
                
                    if ( match ) {
                        elem.type = match[ 1 ];
                Severity: Major
                Found in bower_components/jquery/src/manipulation.js and 1 other location - About 1 hr to fix
                bower_components/jquery/dist/jquery.js on lines 4960..4970

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

                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

                function disableScript( elem ) {
                    elem.type = (elem.getAttribute("type") !== null) + "/" + elem.type;
                    return elem;
                }
                Severity: Minor
                Found in bower_components/jquery/src/manipulation.js and 1 other location - About 40 mins to fix
                bower_components/jquery/dist/jquery.js on lines 4956..4959

                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

                There are no issues that match your filters.

                Category
                Status