SysMO-DB/seek

View on GitHub
app/assets/javascripts/modified_cytoscape.js

Summary

Maintainability
F
1 wk
Test Coverage

Function redraw has 244 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    canvas_prototype.redraw = function( forcedContext, drawAll, forcedZoom, forcedPan ) {
        var r = this;

        if( this.averageRedrawTime === undefined ){ this.averageRedrawTime = 0; }

Severity: Major
Found in app/assets/javascripts/modified_cytoscape.js - About 1 day to fix

    File modified_cytoscape.js has 563 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    /*
       Some cystoscape functions are overiden here, in order to:
       - Fix bugs
       - Change the default behavior which can not do through api or configuration
     */
    Severity: Major
    Found in app/assets/javascripts/modified_cytoscape.js - About 1 day to fix

      Function run has 186 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          $$("layout", "breadthfirst").prototype.run = function(){
              var params = this.options;
              var options = params;
      
              var cy = params.cy;
      Severity: Major
      Found in app/assets/javascripts/modified_cytoscape.js - About 7 hrs to fix

        Function roundRectangleIntersectLine has 97 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            canvas_prototype.roundRectangleIntersectLine = function(
                x, y, nodeX, nodeY, width, height, padding) {
        
                //Manually change for seek to fix that safari quits unexpectedly
                var cornerRadius = 0;
        Severity: Major
        Found in app/assets/javascripts/modified_cytoscape.js - About 3 hrs to fix

          Function roundRectangleIntersectLine has 7 arguments (exceeds 4 allowed). Consider refactoring.
          Open

                  x, y, nodeX, nodeY, width, height, padding) {
          Severity: Major
          Found in app/assets/javascripts/modified_cytoscape.js - About 50 mins to fix

            Avoid too many return statements within this function.
            Open

                            return [arcIntersections[0], arcIntersections[1]];
            Severity: Major
            Found in app/assets/javascripts/modified_cytoscape.js - About 30 mins to fix

              Avoid too many return statements within this function.
              Open

                              return [arcIntersections[0], arcIntersections[1]];
              Severity: Major
              Found in app/assets/javascripts/modified_cytoscape.js - About 30 mins to fix

                Avoid too many return statements within this function.
                Open

                                return [arcIntersections[0], arcIntersections[1]];
                Severity: Major
                Found in app/assets/javascripts/modified_cytoscape.js - About 30 mins to fix

                  Avoid too many return statements within this function.
                  Open

                                  return [arcIntersections[0], arcIntersections[1]];
                  Severity: Major
                  Found in app/assets/javascripts/modified_cytoscape.js - About 30 mins to fix

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

                                    for (var index = 0; index < elesNotInDragLayer.length; index++) {
                                        element = elesNotInDragLayer[index];
                    
                                        if (element._private.group == "nodes") {
                                            r.drawNodeText(context, element);
                    Severity: Major
                    Found in app/assets/javascripts/modified_cytoscape.js and 1 other location - About 6 hrs to fix
                    app/assets/javascripts/modified_cytoscape.js on lines 677..692

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

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

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

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

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

                    Refactorings

                    Further Reading

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

                                    for (var index = 0; index < elesInDragLayer.length; index++) {
                                        element = elesInDragLayer[index];
                    
                                        if (element._private.group == "nodes") {
                                            r.drawNodeText(context, element);
                    Severity: Major
                    Found in app/assets/javascripts/modified_cytoscape.js and 1 other location - About 6 hrs to fix
                    app/assets/javascripts/modified_cytoscape.js on lines 609..624

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

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

                            {
                                var topLeftCenterX = nodeX - halfWidth + cornerRadius;
                                var topLeftCenterY = nodeY - halfHeight + cornerRadius
                                arcIntersections = this.intersectLineCircle(
                                    x, y, nodeX, nodeY,
                    Severity: Major
                    Found in app/assets/javascripts/modified_cytoscape.js and 2 other locations - About 4 hrs to fix
                    app/assets/javascripts/modified_cytoscape.js on lines 403..416
                    app/assets/javascripts/modified_cytoscape.js on lines 419..432

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

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

                            {
                                var bottomRightCenterX = nodeX + halfWidth - cornerRadius;
                                var bottomRightCenterY = nodeY + halfHeight - cornerRadius
                                arcIntersections = this.intersectLineCircle(
                                    x, y, nodeX, nodeY,
                    Severity: Major
                    Found in app/assets/javascripts/modified_cytoscape.js and 2 other locations - About 4 hrs to fix
                    app/assets/javascripts/modified_cytoscape.js on lines 387..400
                    app/assets/javascripts/modified_cytoscape.js on lines 403..416

                    Duplicated Code

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

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

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

                    Tuning

                    This issue has a mass of 119.

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

                            {
                                var topRightCenterX = nodeX + halfWidth - cornerRadius;
                                var topRightCenterY = nodeY - halfHeight + cornerRadius
                                arcIntersections = this.intersectLineCircle(
                                    x, y, nodeX, nodeY,
                    Severity: Major
                    Found in app/assets/javascripts/modified_cytoscape.js and 2 other locations - About 4 hrs to fix
                    app/assets/javascripts/modified_cytoscape.js on lines 387..400
                    app/assets/javascripts/modified_cytoscape.js on lines 419..432

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

                    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( !elesInDragLayer || !elesNotInDragLayer ){
                                        elesInDragLayer = [];
                                        elesNotInDragLayer = [];
                    
                                        for (var index = 0; index < elements.length; index++) {
                    Severity: Major
                    Found in app/assets/javascripts/modified_cytoscape.js and 1 other location - About 4 hrs to fix
                    app/assets/javascripts/modified_cytoscape.js on lines 634..647

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

                    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( !elesInDragLayer || !elesNotInDragLayer ){
                                        elesInDragLayer = [];
                                        elesNotInDragLayer = [];
                    
                                        for (var index = 0; index < elements.length; index++) {
                    Severity: Major
                    Found in app/assets/javascripts/modified_cytoscape.js and 1 other location - About 4 hrs to fix
                    app/assets/javascripts/modified_cytoscape.js on lines 567..580

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

                    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

                            {
                                var rightStartX = nodeX + halfWidth + padding;
                                var rightStartY = nodeY - halfHeight + cornerRadius - padding;
                                var rightEndX = rightStartX;
                                var rightEndY = nodeY + halfHeight - cornerRadius + padding;
                    Severity: Major
                    Found in app/assets/javascripts/modified_cytoscape.js and 1 other location - About 3 hrs to fix
                    app/assets/javascripts/modified_cytoscape.js on lines 369..381

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

                    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

                            {
                                var bottomStartX = nodeX - halfWidth + cornerRadius - padding;
                                var bottomStartY = nodeY + halfHeight + padding;
                                var bottomEndX = nodeX + halfWidth - cornerRadius + padding;
                                var bottomEndY = bottomStartY;
                    Severity: Major
                    Found in app/assets/javascripts/modified_cytoscape.js and 1 other location - About 3 hrs to fix
                    app/assets/javascripts/modified_cytoscape.js on lines 324..336

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

                    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

                            {
                                var leftStartX = nodeX - halfWidth - padding;
                                var leftStartY = nodeY - halfHeight + cornerRadius - padding;
                                var leftEndX = leftStartX;
                                var leftEndY = nodeY + halfHeight - cornerRadius + padding;
                    Severity: Major
                    Found in app/assets/javascripts/modified_cytoscape.js and 1 other location - About 3 hrs to fix
                    app/assets/javascripts/modified_cytoscape.js on lines 339..351

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

                    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

                            {
                                var topStartX = nodeX - halfWidth + cornerRadius - padding;
                                var topStartY = nodeY - halfHeight - padding;
                                var topEndX = nodeX + halfWidth - cornerRadius + padding;
                                var topEndY = topStartY;
                    Severity: Major
                    Found in app/assets/javascripts/modified_cytoscape.js and 1 other location - About 3 hrs to fix
                    app/assets/javascripts/modified_cytoscape.js on lines 354..366

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

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

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

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

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

                    Refactorings

                    Further Reading

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

                                    for (var index = 0; index < elesInDragLayer.length; index++) {
                                        element = elesInDragLayer[index];
                    
                                        if (element._private.group == "nodes") {
                                            r.drawNode(context, element);
                    Severity: Major
                    Found in app/assets/javascripts/modified_cytoscape.js and 1 other location - About 3 hrs to fix
                    app/assets/javascripts/modified_cytoscape.js on lines 598..607

                    Duplicated Code

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

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

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

                    Tuning

                    This issue has a mass of 101.

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

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

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

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

                    Refactorings

                    Further Reading

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

                                    for (var index = 0; index < elesNotInDragLayer.length; index++) {
                                        element = elesNotInDragLayer[index];
                    
                                        if (element._private.group == "nodes") {
                                            r.drawNode(context, element);
                    Severity: Major
                    Found in app/assets/javascripts/modified_cytoscape.js and 1 other location - About 3 hrs to fix
                    app/assets/javascripts/modified_cytoscape.js on lines 667..675

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

                    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( !drawAll ){
                                        context.setTransform(1, 0, 0, 1, 0, 0);
                                        context.clearRect(0, 0, context.canvas.width, context.canvas.height);
                    
                                        context.translate(effectivePan.x, effectivePan.y);
                    Severity: Major
                    Found in app/assets/javascripts/modified_cytoscape.js and 1 other location - About 2 hrs to fix
                    app/assets/javascripts/modified_cytoscape.js on lines 704..710

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

                                        context.fillStyle = "rgba("
                                            + coreStyle["selection-box-color"].value[0] + ","
                                            + coreStyle["selection-box-color"].value[1] + ","
                                            + coreStyle["selection-box-color"].value[2] + ","
                                            + coreStyle["selection-box-opacity"].value + ")";
                    Severity: Major
                    Found in app/assets/javascripts/modified_cytoscape.js and 2 other locations - About 2 hrs to fix
                    app/assets/javascripts/modified_cytoscape.js on lines 738..742
                    app/assets/javascripts/modified_cytoscape.js on lines 756..760

                    Duplicated Code

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

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

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

                    Tuning

                    This issue has a mass of 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 3 locations. Consider refactoring.
                    Open

                                        context.fillStyle = "rgba("
                                            + coreStyle["active-bg-color"].value[0] + ","
                                            + coreStyle["active-bg-color"].value[1] + ","
                                            + coreStyle["active-bg-color"].value[2] + ","
                                            + coreStyle["active-bg-opacity"].value + ")";
                    Severity: Major
                    Found in app/assets/javascripts/modified_cytoscape.js and 2 other locations - About 2 hrs to fix
                    app/assets/javascripts/modified_cytoscape.js on lines 725..729
                    app/assets/javascripts/modified_cytoscape.js on lines 738..742

                    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

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

                                    if( !drawAll ){
                                        context.setTransform(1, 0, 0, 1, 0, 0);
                                        context.clearRect(0, 0, context.canvas.width, context.canvas.height);
                    
                                        context.translate(effectivePan.x, effectivePan.y);
                    Severity: Major
                    Found in app/assets/javascripts/modified_cytoscape.js and 1 other location - About 2 hrs to fix
                    app/assets/javascripts/modified_cytoscape.js on lines 651..657

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

                                            context.strokeStyle = "rgba("
                                                + coreStyle["selection-box-border-color"].value[0] + ","
                                                + coreStyle["selection-box-border-color"].value[1] + ","
                                                + coreStyle["selection-box-border-color"].value[2] + ","
                                                + coreStyle["selection-box-opacity"].value + ")";
                    Severity: Major
                    Found in app/assets/javascripts/modified_cytoscape.js and 2 other locations - About 2 hrs to fix
                    app/assets/javascripts/modified_cytoscape.js on lines 725..729
                    app/assets/javascripts/modified_cytoscape.js on lines 756..760

                    Duplicated Code

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

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

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

                    Tuning

                    This issue has a mass of 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 2 locations. Consider refactoring.
                    Open

                                for( var i = 0; i < subgraph.length; i++ ){
                                    var depth = id2depth[ subgraph[i].id() ];
                    
                                    if( depth !== undefined ){
                                        depths[depth].push( node );
                    Severity: Major
                    Found in app/assets/javascripts/modified_cytoscape.js and 1 other location - About 2 hrs to fix
                    app/assets/javascripts/modified_cytoscape.js on lines 76..84

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

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

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

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

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

                    Refactorings

                    Further Reading

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

                                for( var i = 0; i < neighbors.length; i++ ){
                                    var depth = id2depth[ neighbors[i].id() ];
                    
                                    if( depth !== undefined ){
                                        depths[depth].push( node );
                    Severity: Major
                    Found in app/assets/javascripts/modified_cytoscape.js and 1 other location - About 2 hrs to fix
                    app/assets/javascripts/modified_cytoscape.js on lines 99..107

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

                    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

                                            context.strokeRect(
                                                data.select[0],
                                                data.select[1],
                                                data.select[2] - data.select[0],
                                                data.select[3] - data.select[1]);
                    Severity: Major
                    Found in app/assets/javascripts/modified_cytoscape.js and 1 other location - About 1 hr to fix
                    app/assets/javascripts/modified_cytoscape.js on lines 731..735

                    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

                                        context.fillRect(
                                            data.select[0],
                                            data.select[1],
                                            data.select[2] - data.select[0],
                                            data.select[3] - data.select[1]);
                    Severity: Major
                    Found in app/assets/javascripts/modified_cytoscape.js and 1 other location - About 1 hr to fix
                    app/assets/javascripts/modified_cytoscape.js on lines 744..748

                    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

                    There are no issues that match your filters.

                    Category
                    Status