neyric/wireit

View on GitHub

Showing 318 of 497 total issues

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

                {
                    position:[40,110],
                    "xtype":"Y.Container", 
                    title: "input",
                    width: 100,
Severity: Major
Found in sandbox/layer-container/layer-container.js and 1 other location - About 3 hrs to fix
sandbox/layer-container/layer-container.js on lines 91..100

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

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

                {
                    position:[20,30],
                    "xtype":"Y.Container", 
                    title: "input",
                    width: 100,
Severity: Major
Found in sandbox/layer-container/layer-container.js and 1 other location - About 3 hrs to fix
sandbox/layer-container/layer-container.js on lines 101..110

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

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

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

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

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

Refactorings

Further Reading

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

            {
                   name: "XOR",
                config: {
                       type: "XorGate", 
                       imageUrl: "images/gate_xor.png",
Severity: Major
Found in app-examples/logic-gates/logic-gates.js and 3 other locations - About 2 hrs to fix
app-examples/logic-gates/logic-gates.js on lines 11..22
app-examples/logic-gates/logic-gates.js on lines 23..34
app-examples/logic-gates/logic-gates.js on lines 46..57

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

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

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

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

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

Refactorings

Further Reading

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

            {
                   name: "NAND",
                config: {
                       type: "NandGate", 
                       imageUrl: "images/gate_nand.png",
Severity: Major
Found in app-examples/logic-gates/logic-gates.js and 3 other locations - About 2 hrs to fix
app-examples/logic-gates/logic-gates.js on lines 11..22
app-examples/logic-gates/logic-gates.js on lines 23..34
app-examples/logic-gates/logic-gates.js on lines 58..69

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

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

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

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

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

Refactorings

Further Reading

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

            {
                name: "OR",
                config: {
                    type: "OrGate",
                    imageUrl: 'images/gate_or.png',
Severity: Major
Found in app-examples/logic-gates/logic-gates.js and 3 other locations - About 2 hrs to fix
app-examples/logic-gates/logic-gates.js on lines 11..22
app-examples/logic-gates/logic-gates.js on lines 46..57
app-examples/logic-gates/logic-gates.js on lines 58..69

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

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

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

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

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

Refactorings

Further Reading

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

            {
                name: "AND",
                config: {
                    type: "AndGate",
                    imageUrl: "images/gate_and.png",
Severity: Major
Found in app-examples/logic-gates/logic-gates.js and 3 other locations - About 2 hrs to fix
app-examples/logic-gates/logic-gates.js on lines 23..34
app-examples/logic-gates/logic-gates.js on lines 46..57
app-examples/logic-gates/logic-gates.js on lines 58..69

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

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

    collapse: function()
    {
    if (this.containers.length > 0)
    {
        var layer = this.containers[0].layer
Severity: Major
Found in sandbox/grouping/examples/WiringEditor/embedded.js and 1 other location - About 2 hrs to fix
sandbox/grouping/examples/WiringEditor/embedded.js on lines 41..53

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

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

    expand: function()
    {
    if (this.containers.length > 0)
    {
        var layer = this.containers[0].layer
Severity: Major
Found in sandbox/grouping/examples/WiringEditor/embedded.js and 1 other location - About 2 hrs to fix
sandbox/grouping/examples/WiringEditor/embedded.js on lines 26..39

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

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 ExecutionFrame = function(wiringConfig, frameLevel, parentFrame, parentIndex) {
   
   // save the initial config
   this.wiringConfig = wiringConfig;
   
Severity: Major
Found in sandbox/jsBox/ExecutionFrame.js and 1 other location - About 2 hrs to fix
sandbox/grouping/examples/sawire/ExecutionFrame.js on lines 8..21

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

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(t1[1] == t2[1]) {
             var o = (t1[0] > t2[0]) ? 1 : -1;
             x1 = t2[0]+o*dlug;
             x2 = x1;
             y1 -= d;
sandbox/wireit-rightsquarearrow-wire/wireit-rightsquarearrow-wire.js on lines 136..142

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

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 ExecutionFrame = function(wiringConfig, frameLevel, parentFrame, parentIndex) {
   
   // save the initial config
   this.wiringConfig = wiringConfig;
   
Severity: Major
Found in sandbox/grouping/examples/sawire/ExecutionFrame.js and 1 other location - About 2 hrs to fix
sandbox/jsBox/ExecutionFrame.js on lines 8..21

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

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(t1[1] == t2[1]) {
             var o = (t1[0] > t2[0]) ? 1 : -1;
             x1 = t2[0]+o*dlug;
             x2 = x1;
             y1 -= d;
sandbox/wireit-leftsquarearrow-wire/wireit-leftsquarearrow-wire.js on lines 143..149

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

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 (directions.up)
        elem.scrollTop = Math.max(0, elem.scrollTop-this.scrollAmount);
        else if (directions.down)
        elem.scrollTop = Math.min(elem.scrollHeight, elem.scrollTop+this.scrollAmount);
Severity: Major
Found in sandbox/grouping/js/RubberBand.js and 1 other location - About 2 hrs to fix
sandbox/grouping/js/RubberBand.js on lines 100..103

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

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 (directions.left)
        elem.scrollLeft = Math.max(0, elem.scrollLeft-this.scrollAmount);
        else if (directions.right)
        elem.scrollLeft = Math.min(elem.scrollWidth, elem.scrollLeft+this.scrollAmount);
Severity: Major
Found in sandbox/grouping/js/RubberBand.js and 1 other location - About 2 hrs to fix
sandbox/grouping/js/RubberBand.js on lines 105..108

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

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

        {
            "name": "Group",
            "category": "artifact",
            "container": {
              "xtype":"Y.ImageContainer", 
Severity: Major
Found in sandbox/editor-examples/BPMN-editor/bpmn-2.0.js and 6 other locations - About 2 hrs to fix
sandbox/editor-examples/BPMN-editor/bpmn-2.0.js on lines 175..187
sandbox/editor-examples/BPMN-editor/bpmn-2.0.js on lines 253..265
sandbox/editor-examples/BPMN-editor/bpmn-2.0.js on lines 313..325
sandbox/editor-examples/BPMN-editor/bpmn-2.0.js on lines 457..469
sandbox/editor-examples/BPMN-editor/bpmn-2.0.js on lines 614..626
sandbox/editor-examples/BPMN-editor/bpmn-2.0.js on lines 716..728

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

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

        {
            "name": "Data Object",
            "category": "dataobject",
            "container": {
              "xtype":"Y.ImageContainer", 
Severity: Major
Found in sandbox/editor-examples/BPMN-editor/bpmn-2.0.js and 6 other locations - About 2 hrs to fix
sandbox/editor-examples/BPMN-editor/bpmn-2.0.js on lines 175..187
sandbox/editor-examples/BPMN-editor/bpmn-2.0.js on lines 221..233
sandbox/editor-examples/BPMN-editor/bpmn-2.0.js on lines 313..325
sandbox/editor-examples/BPMN-editor/bpmn-2.0.js on lines 457..469
sandbox/editor-examples/BPMN-editor/bpmn-2.0.js on lines 614..626
sandbox/editor-examples/BPMN-editor/bpmn-2.0.js on lines 716..728

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

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

        {
            "name": "Pool",
            "category": "swimlane",
            "container": {
              "xtype":"Y.ImageContainer", 
Severity: Major
Found in sandbox/editor-examples/BPMN-editor/bpmn-2.0.js and 6 other locations - About 2 hrs to fix
sandbox/editor-examples/BPMN-editor/bpmn-2.0.js on lines 221..233
sandbox/editor-examples/BPMN-editor/bpmn-2.0.js on lines 253..265
sandbox/editor-examples/BPMN-editor/bpmn-2.0.js on lines 313..325
sandbox/editor-examples/BPMN-editor/bpmn-2.0.js on lines 457..469
sandbox/editor-examples/BPMN-editor/bpmn-2.0.js on lines 614..626
sandbox/editor-examples/BPMN-editor/bpmn-2.0.js on lines 716..728

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

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

        {
            "name": "Intermediate Message Event",
            "category": "catching",
            "container": {
              "xtype":"Y.ImageContainer", 
Severity: Major
Found in sandbox/editor-examples/BPMN-editor/bpmn-2.0.js and 6 other locations - About 2 hrs to fix
sandbox/editor-examples/BPMN-editor/bpmn-2.0.js on lines 175..187
sandbox/editor-examples/BPMN-editor/bpmn-2.0.js on lines 221..233
sandbox/editor-examples/BPMN-editor/bpmn-2.0.js on lines 253..265
sandbox/editor-examples/BPMN-editor/bpmn-2.0.js on lines 313..325
sandbox/editor-examples/BPMN-editor/bpmn-2.0.js on lines 614..626
sandbox/editor-examples/BPMN-editor/bpmn-2.0.js on lines 716..728

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

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 gI in this.groups)
        {
        var go = {};
        go.group = this.groups[gI].group;
        go.overrides = overrides.groupOverrides[gI];
Severity: Major
Found in sandbox/grouping/js/Group.js and 1 other location - About 2 hrs to fix
sandbox/grouping/js/Group.js on lines 466..473

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

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

        {
            "name": "Start Event",
            "category": "startevent",
            "container": {
              "xtype":"Y.ImageContainer", 
Severity: Major
Found in sandbox/editor-examples/BPMN-editor/bpmn-2.0.js and 6 other locations - About 2 hrs to fix
sandbox/editor-examples/BPMN-editor/bpmn-2.0.js on lines 175..187
sandbox/editor-examples/BPMN-editor/bpmn-2.0.js on lines 221..233
sandbox/editor-examples/BPMN-editor/bpmn-2.0.js on lines 253..265
sandbox/editor-examples/BPMN-editor/bpmn-2.0.js on lines 457..469
sandbox/editor-examples/BPMN-editor/bpmn-2.0.js on lines 614..626
sandbox/editor-examples/BPMN-editor/bpmn-2.0.js on lines 716..728

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

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

Severity
Category
Status
Source
Language