adobe/brackets

View on GitHub

Showing 1,809 of 3,294 total issues

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

                it("should not prevent default on right arrow at the start of the text field", function () {
                    testPreventDefault({
                        color:     "#8e8247",
                        item:      "$colorValue",
                        selection: [0, 0],
Severity: Major
Found in src/extensions/default/InlineColorEditor/unittests.js and 7 other locations - About 55 mins to fix
src/extensions/default/InlineColorEditor/unittests.js on lines 1236..1244
src/extensions/default/InlineColorEditor/unittests.js on lines 1245..1253
src/extensions/default/InlineColorEditor/unittests.js on lines 1254..1262
src/extensions/default/InlineColorEditor/unittests.js on lines 1263..1271
src/extensions/default/InlineColorEditor/unittests.js on lines 1281..1289
src/extensions/default/InlineColorEditor/unittests.js on lines 1290..1298
src/extensions/default/InlineColorEditor/unittests.js on lines 1299..1307

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

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

                runs(function () {
                    nodeConnection.domains.staticServer.getServer(path, 0)
                        .done(function (info) {
                            serverInfo = info;
                        });
Severity: Major
Found in src/extensions/default/StaticServer/unittests.js and 8 other locations - About 55 mins to fix
src/extensions/default/StaticServer/unittests.js on lines 89..94
src/extensions/default/StaticServer/unittests.js on lines 111..116
src/extensions/default/StaticServer/unittests.js on lines 158..163
src/extensions/default/StaticServer/unittests.js on lines 257..262
src/extensions/default/StaticServer/unittests.js on lines 363..368
src/extensions/default/StaticServer/unittests.js on lines 410..415
src/extensions/default/StaticServer/unittests.js on lines 472..477
src/extensions/default/StaticServer/unittests.js on lines 528..533

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

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

                runs(function () {
                    nodeConnection.domains.staticServer.getServer(path, 0)
                        .done(function (info) {
                            serverInfo = info;
                        });
Severity: Major
Found in src/extensions/default/StaticServer/unittests.js and 8 other locations - About 55 mins to fix
src/extensions/default/StaticServer/unittests.js on lines 111..116
src/extensions/default/StaticServer/unittests.js on lines 158..163
src/extensions/default/StaticServer/unittests.js on lines 257..262
src/extensions/default/StaticServer/unittests.js on lines 313..318
src/extensions/default/StaticServer/unittests.js on lines 363..368
src/extensions/default/StaticServer/unittests.js on lines 410..415
src/extensions/default/StaticServer/unittests.js on lines 472..477
src/extensions/default/StaticServer/unittests.js on lines 528..533

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

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

                it("should not prevent default on left arrow in the middle of the text field", function () {
                    testPreventDefault({
                        color:     "#8e8247",
                        item:      "$colorValue",
                        selection: [3, 3],
Severity: Major
Found in src/extensions/default/InlineColorEditor/unittests.js and 7 other locations - About 55 mins to fix
src/extensions/default/InlineColorEditor/unittests.js on lines 1236..1244
src/extensions/default/InlineColorEditor/unittests.js on lines 1254..1262
src/extensions/default/InlineColorEditor/unittests.js on lines 1263..1271
src/extensions/default/InlineColorEditor/unittests.js on lines 1272..1280
src/extensions/default/InlineColorEditor/unittests.js on lines 1281..1289
src/extensions/default/InlineColorEditor/unittests.js on lines 1290..1298
src/extensions/default/InlineColorEditor/unittests.js on lines 1299..1307

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

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

                it("should prevent default on right arrow at the end of the text field", function () {
                    testPreventDefault({
                        color:     "#8e8247",
                        item:      "$colorValue",
                        selection: [7, 7],
Severity: Major
Found in src/extensions/default/InlineColorEditor/unittests.js and 7 other locations - About 55 mins to fix
src/extensions/default/InlineColorEditor/unittests.js on lines 1236..1244
src/extensions/default/InlineColorEditor/unittests.js on lines 1245..1253
src/extensions/default/InlineColorEditor/unittests.js on lines 1254..1262
src/extensions/default/InlineColorEditor/unittests.js on lines 1263..1271
src/extensions/default/InlineColorEditor/unittests.js on lines 1272..1280
src/extensions/default/InlineColorEditor/unittests.js on lines 1281..1289
src/extensions/default/InlineColorEditor/unittests.js on lines 1299..1307

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

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

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

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

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

Refactorings

Further Reading

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

        bezierEditor._cubicBezierCoords = bezierEditor.bezierCanvas
            .offsetsToCoordinates(bezierEditor.P1)
            .concat(bezierEditor.bezierCanvas.offsetsToCoordinates(bezierEditor.P2));
src/extensions/default/InlineTimingFunctionEditor/BezierCurveEditor.js on lines 271..273
src/extensions/default/InlineTimingFunctionEditor/BezierCurveEditor.js on lines 482..484

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

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

                runs(function () {
                    nodeConnection.domains.staticServer.getServer(path, 0)
                        .done(function (info) {
                            serverInfo = info;
                        });
Severity: Major
Found in src/extensions/default/StaticServer/unittests.js and 8 other locations - About 55 mins to fix
src/extensions/default/StaticServer/unittests.js on lines 89..94
src/extensions/default/StaticServer/unittests.js on lines 111..116
src/extensions/default/StaticServer/unittests.js on lines 158..163
src/extensions/default/StaticServer/unittests.js on lines 257..262
src/extensions/default/StaticServer/unittests.js on lines 313..318
src/extensions/default/StaticServer/unittests.js on lines 363..368
src/extensions/default/StaticServer/unittests.js on lines 410..415
src/extensions/default/StaticServer/unittests.js on lines 528..533

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

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

                it("should not prevent default on right arrow with a range selection", function () {
                    testPreventDefault({
                        color:     "#8e8247",
                        item:      "$colorValue",
                        selection: [0, 7],
Severity: Major
Found in src/extensions/default/InlineColorEditor/unittests.js and 7 other locations - About 55 mins to fix
src/extensions/default/InlineColorEditor/unittests.js on lines 1236..1244
src/extensions/default/InlineColorEditor/unittests.js on lines 1245..1253
src/extensions/default/InlineColorEditor/unittests.js on lines 1254..1262
src/extensions/default/InlineColorEditor/unittests.js on lines 1263..1271
src/extensions/default/InlineColorEditor/unittests.js on lines 1272..1280
src/extensions/default/InlineColorEditor/unittests.js on lines 1281..1289
src/extensions/default/InlineColorEditor/unittests.js on lines 1290..1298

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

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

                runs(function () {
                    nodeConnection.domains.staticServer.getServer(path, 0)
                        .done(function (info) {
                            serverInfo = info;
                        });
Severity: Major
Found in src/extensions/default/StaticServer/unittests.js and 8 other locations - About 55 mins to fix
src/extensions/default/StaticServer/unittests.js on lines 89..94
src/extensions/default/StaticServer/unittests.js on lines 111..116
src/extensions/default/StaticServer/unittests.js on lines 158..163
src/extensions/default/StaticServer/unittests.js on lines 313..318
src/extensions/default/StaticServer/unittests.js on lines 363..368
src/extensions/default/StaticServer/unittests.js on lines 410..415
src/extensions/default/StaticServer/unittests.js on lines 472..477
src/extensions/default/StaticServer/unittests.js on lines 528..533

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

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

                it("should not prevent default on left arrow with a range selection", function () {
                    testPreventDefault({
                        color:     "#8e8247",
                        item:      "$colorValue",
                        selection: [0, 7],
Severity: Major
Found in src/extensions/default/InlineColorEditor/unittests.js and 7 other locations - About 55 mins to fix
src/extensions/default/InlineColorEditor/unittests.js on lines 1236..1244
src/extensions/default/InlineColorEditor/unittests.js on lines 1245..1253
src/extensions/default/InlineColorEditor/unittests.js on lines 1254..1262
src/extensions/default/InlineColorEditor/unittests.js on lines 1272..1280
src/extensions/default/InlineColorEditor/unittests.js on lines 1281..1289
src/extensions/default/InlineColorEditor/unittests.js on lines 1290..1298
src/extensions/default/InlineColorEditor/unittests.js on lines 1299..1307

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

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

                it("should not prevent default on right arrow in the middle of the text field", function () {
                    testPreventDefault({
                        color:     "#8e8247",
                        item:      "$colorValue",
                        selection: [3, 3],
Severity: Major
Found in src/extensions/default/InlineColorEditor/unittests.js and 7 other locations - About 55 mins to fix
src/extensions/default/InlineColorEditor/unittests.js on lines 1236..1244
src/extensions/default/InlineColorEditor/unittests.js on lines 1245..1253
src/extensions/default/InlineColorEditor/unittests.js on lines 1254..1262
src/extensions/default/InlineColorEditor/unittests.js on lines 1263..1271
src/extensions/default/InlineColorEditor/unittests.js on lines 1272..1280
src/extensions/default/InlineColorEditor/unittests.js on lines 1290..1298
src/extensions/default/InlineColorEditor/unittests.js on lines 1299..1307

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

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

                runs(function () {
                    nodeConnection.domains.staticServer.getServer(path, 0)
                        .done(function (info) {
                            serverInfo = info;
                        });
Severity: Major
Found in src/extensions/default/StaticServer/unittests.js and 8 other locations - About 55 mins to fix
src/extensions/default/StaticServer/unittests.js on lines 89..94
src/extensions/default/StaticServer/unittests.js on lines 111..116
src/extensions/default/StaticServer/unittests.js on lines 158..163
src/extensions/default/StaticServer/unittests.js on lines 257..262
src/extensions/default/StaticServer/unittests.js on lines 313..318
src/extensions/default/StaticServer/unittests.js on lines 363..368
src/extensions/default/StaticServer/unittests.js on lines 472..477
src/extensions/default/StaticServer/unittests.js on lines 528..533

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

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

                it("should not prevent default on left arrow at the end of the text field", function () {
                    testPreventDefault({
                        color:     "#8e8247",
                        item:      "$colorValue",
                        selection: [7, 7],
Severity: Major
Found in src/extensions/default/InlineColorEditor/unittests.js and 7 other locations - About 55 mins to fix
src/extensions/default/InlineColorEditor/unittests.js on lines 1236..1244
src/extensions/default/InlineColorEditor/unittests.js on lines 1245..1253
src/extensions/default/InlineColorEditor/unittests.js on lines 1263..1271
src/extensions/default/InlineColorEditor/unittests.js on lines 1272..1280
src/extensions/default/InlineColorEditor/unittests.js on lines 1281..1289
src/extensions/default/InlineColorEditor/unittests.js on lines 1290..1298
src/extensions/default/InlineColorEditor/unittests.js on lines 1299..1307

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

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

                runs(function () {
                    nodeConnection.domains.staticServer.getServer(path, 0)
                        .done(function (info) {
                            serverInfo = info;
                        });
Severity: Major
Found in src/extensions/default/StaticServer/unittests.js and 8 other locations - About 55 mins to fix
src/extensions/default/StaticServer/unittests.js on lines 89..94
src/extensions/default/StaticServer/unittests.js on lines 111..116
src/extensions/default/StaticServer/unittests.js on lines 158..163
src/extensions/default/StaticServer/unittests.js on lines 257..262
src/extensions/default/StaticServer/unittests.js on lines 313..318
src/extensions/default/StaticServer/unittests.js on lines 410..415
src/extensions/default/StaticServer/unittests.js on lines 472..477
src/extensions/default/StaticServer/unittests.js on lines 528..533

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

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

                it("should prevent default on left arrow at the start of the text field", function () {
                    testPreventDefault({
                        color:     "#8e8247",
                        item:      "$colorValue",
                        selection: [0, 0],
Severity: Major
Found in src/extensions/default/InlineColorEditor/unittests.js and 7 other locations - About 55 mins to fix
src/extensions/default/InlineColorEditor/unittests.js on lines 1245..1253
src/extensions/default/InlineColorEditor/unittests.js on lines 1254..1262
src/extensions/default/InlineColorEditor/unittests.js on lines 1263..1271
src/extensions/default/InlineColorEditor/unittests.js on lines 1272..1280
src/extensions/default/InlineColorEditor/unittests.js on lines 1281..1289
src/extensions/default/InlineColorEditor/unittests.js on lines 1290..1298
src/extensions/default/InlineColorEditor/unittests.js on lines 1299..1307

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

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

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

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

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

Refactorings

Further Reading

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

            bezierEditor._cubicBezierCoords = bezierEditor.bezierCanvas
                .offsetsToCoordinates(bezierEditor.P1)
                .concat(bezierEditor.bezierCanvas.offsetsToCoordinates(bezierEditor.P2));
src/extensions/default/InlineTimingFunctionEditor/BezierCurveEditor.js on lines 271..273
src/extensions/default/InlineTimingFunctionEditor/BezierCurveEditor.js on lines 327..329

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

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

                runs(function () {
                    nodeConnection.domains.staticServer.getServer(path, 0)
                        .done(function (info) {
                            serverInfo = info;
                        });
Severity: Major
Found in src/extensions/default/StaticServer/unittests.js and 8 other locations - About 55 mins to fix
src/extensions/default/StaticServer/unittests.js on lines 89..94
src/extensions/default/StaticServer/unittests.js on lines 111..116
src/extensions/default/StaticServer/unittests.js on lines 158..163
src/extensions/default/StaticServer/unittests.js on lines 257..262
src/extensions/default/StaticServer/unittests.js on lines 313..318
src/extensions/default/StaticServer/unittests.js on lines 363..368
src/extensions/default/StaticServer/unittests.js on lines 410..415
src/extensions/default/StaticServer/unittests.js on lines 472..477

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

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

                runs(function () {
                    nodeConnection.domains.staticServer.getServer(path, 54321)
                        .done(function (info) {
                            serverInfo = info;
                        });
Severity: Major
Found in src/extensions/default/StaticServer/unittests.js and 8 other locations - About 55 mins to fix
src/extensions/default/StaticServer/unittests.js on lines 89..94
src/extensions/default/StaticServer/unittests.js on lines 158..163
src/extensions/default/StaticServer/unittests.js on lines 257..262
src/extensions/default/StaticServer/unittests.js on lines 313..318
src/extensions/default/StaticServer/unittests.js on lines 363..368
src/extensions/default/StaticServer/unittests.js on lines 410..415
src/extensions/default/StaticServer/unittests.js on lines 472..477
src/extensions/default/StaticServer/unittests.js on lines 528..533

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

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

                runs(function () {
                    nodeConnection.domains.staticServer.getServer(path, 0)
                        .done(function (info) {
                            serverInfo = info;
                        });
Severity: Major
Found in src/extensions/default/StaticServer/unittests.js and 8 other locations - About 55 mins to fix
src/extensions/default/StaticServer/unittests.js on lines 89..94
src/extensions/default/StaticServer/unittests.js on lines 111..116
src/extensions/default/StaticServer/unittests.js on lines 257..262
src/extensions/default/StaticServer/unittests.js on lines 313..318
src/extensions/default/StaticServer/unittests.js on lines 363..368
src/extensions/default/StaticServer/unittests.js on lines 410..415
src/extensions/default/StaticServer/unittests.js on lines 472..477
src/extensions/default/StaticServer/unittests.js on lines 528..533

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

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

        } else {
            var selectionDetails = RefactoringUtils.normalizeText(selectedText, startIndex, endIndex);
            selectedText = selectionDetails.text;
            startIndex = selectionDetails.start;
            endIndex = selectionDetails.end;
Severity: Minor
Found in src/extensions/default/JavaScriptRefactoring/WrapSelection.js and 1 other location - About 55 mins to fix
src/extensions/default/JavaScriptRefactoring/WrapSelection.js on lines 241..246

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

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