adobe/brackets

View on GitHub

Showing 1,809 of 3,294 total issues

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

            it("should insert if we are in middle of query after ='", function () {
                // After clip-path='inhe inside <g>
                testDocument.replaceRange("<defs clip-path='inhe", {line: 7, ch: 8});
                testEditor.setCursorPos({line: 7, ch: 29});
                selectHint(SVGCodeHints.hintProvider, "inherit");
Severity: Major
Found in src/extensions/default/SVGCodeHints/unittests.js and 11 other locations - About 4 hrs to fix
src/extensions/default/SVGCodeHints/unittests.js on lines 573..581
src/extensions/default/SVGCodeHints/unittests.js on lines 583..591
src/extensions/default/SVGCodeHints/unittests.js on lines 593..601
src/extensions/default/SVGCodeHints/unittests.js on lines 603..611
src/extensions/default/SVGCodeHints/unittests.js on lines 613..621
src/extensions/default/SVGCodeHints/unittests.js on lines 623..631
src/extensions/default/SVGCodeHints/unittests.js on lines 643..651
src/extensions/default/SVGCodeHints/unittests.js on lines 653..661
src/extensions/default/SVGCodeHints/unittests.js on lines 663..671
src/extensions/default/SVGCodeHints/unittests.js on lines 673..681
src/extensions/default/SVGCodeHints/unittests.js on lines 683..691

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

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

            it("should insert value to the right in a multiple options attribute", function () {
                // After "matrix() " inside <g>
                testDocument.replaceRange("<rect transform=\"matrix() \"", {line: 7, ch: 8});
                testEditor.setCursorPos({line: 7, ch: 34});
                selectHint(SVGCodeHints.hintProvider, "rotate()");
Severity: Major
Found in src/extensions/default/SVGCodeHints/unittests.js and 11 other locations - About 4 hrs to fix
src/extensions/default/SVGCodeHints/unittests.js on lines 573..581
src/extensions/default/SVGCodeHints/unittests.js on lines 583..591
src/extensions/default/SVGCodeHints/unittests.js on lines 593..601
src/extensions/default/SVGCodeHints/unittests.js on lines 603..611
src/extensions/default/SVGCodeHints/unittests.js on lines 613..621
src/extensions/default/SVGCodeHints/unittests.js on lines 623..631
src/extensions/default/SVGCodeHints/unittests.js on lines 633..641
src/extensions/default/SVGCodeHints/unittests.js on lines 643..651
src/extensions/default/SVGCodeHints/unittests.js on lines 653..661
src/extensions/default/SVGCodeHints/unittests.js on lines 663..671
src/extensions/default/SVGCodeHints/unittests.js on lines 683..691

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

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

            it("should insert value in the middle in a multiple options attribute", function () {
                // Between matrix() and rotate() in "matrix()  rotate()"
                testDocument.replaceRange("<rect transform=\"matrix()  rotate()\"", {line: 7, ch: 8});
                testEditor.setCursorPos({line: 7, ch: 34});
                selectHint(SVGCodeHints.hintProvider, "scale()");
Severity: Major
Found in src/extensions/default/SVGCodeHints/unittests.js and 11 other locations - About 4 hrs to fix
src/extensions/default/SVGCodeHints/unittests.js on lines 573..581
src/extensions/default/SVGCodeHints/unittests.js on lines 583..591
src/extensions/default/SVGCodeHints/unittests.js on lines 593..601
src/extensions/default/SVGCodeHints/unittests.js on lines 603..611
src/extensions/default/SVGCodeHints/unittests.js on lines 613..621
src/extensions/default/SVGCodeHints/unittests.js on lines 623..631
src/extensions/default/SVGCodeHints/unittests.js on lines 633..641
src/extensions/default/SVGCodeHints/unittests.js on lines 643..651
src/extensions/default/SVGCodeHints/unittests.js on lines 653..661
src/extensions/default/SVGCodeHints/unittests.js on lines 663..671
src/extensions/default/SVGCodeHints/unittests.js on lines 673..681

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

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

            it("should insert if =\" is typed after an attribute", function () {
                // After clip-path=" inside <g>
                testDocument.replaceRange("<defs clip-path=\"", {line: 7, ch: 8});
                testEditor.setCursorPos({line: 7, ch: 25});
                selectHint(SVGCodeHints.hintProvider, "inherit");
Severity: Major
Found in src/extensions/default/SVGCodeHints/unittests.js and 11 other locations - About 4 hrs to fix
src/extensions/default/SVGCodeHints/unittests.js on lines 573..581
src/extensions/default/SVGCodeHints/unittests.js on lines 593..601
src/extensions/default/SVGCodeHints/unittests.js on lines 603..611
src/extensions/default/SVGCodeHints/unittests.js on lines 613..621
src/extensions/default/SVGCodeHints/unittests.js on lines 623..631
src/extensions/default/SVGCodeHints/unittests.js on lines 633..641
src/extensions/default/SVGCodeHints/unittests.js on lines 643..651
src/extensions/default/SVGCodeHints/unittests.js on lines 653..661
src/extensions/default/SVGCodeHints/unittests.js on lines 663..671
src/extensions/default/SVGCodeHints/unittests.js on lines 673..681
src/extensions/default/SVGCodeHints/unittests.js on lines 683..691

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

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

            it("should insert if we are in the end of value after ='", function () {
                // Before last ' in clip-path='inherit' inside <g>
                testDocument.replaceRange("<defs clip-path='inherit'", {line: 7, ch: 8});
                testEditor.setCursorPos({line: 7, ch: 32});
                selectHint(SVGCodeHints.hintProvider, "inherit");
Severity: Major
Found in src/extensions/default/SVGCodeHints/unittests.js and 11 other locations - About 4 hrs to fix
src/extensions/default/SVGCodeHints/unittests.js on lines 573..581
src/extensions/default/SVGCodeHints/unittests.js on lines 583..591
src/extensions/default/SVGCodeHints/unittests.js on lines 593..601
src/extensions/default/SVGCodeHints/unittests.js on lines 603..611
src/extensions/default/SVGCodeHints/unittests.js on lines 613..621
src/extensions/default/SVGCodeHints/unittests.js on lines 623..631
src/extensions/default/SVGCodeHints/unittests.js on lines 633..641
src/extensions/default/SVGCodeHints/unittests.js on lines 653..661
src/extensions/default/SVGCodeHints/unittests.js on lines 663..671
src/extensions/default/SVGCodeHints/unittests.js on lines 673..681
src/extensions/default/SVGCodeHints/unittests.js on lines 683..691

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

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

                pageY = containment ? (!(top - this.offset.click.top < containment[1] || top - this.offset.click.top > containment[3]) ? top : (!(top - this.offset.click.top < containment[1]) ? top - o.grid[1] : top + o.grid[1])) : top;
src/extensions/default/JavaScriptQuickEdit/unittest-files/jquery-ui/ui/jquery.ui.draggable.js on lines 452..452

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

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

                pageX = containment ? (!(left - this.offset.click.left < containment[0] || left - this.offset.click.left > containment[2]) ? left : (!(left - this.offset.click.left < containment[0]) ? left - o.grid[0] : left + o.grid[0])) : left;
src/extensions/default/JavaScriptQuickEdit/unittest-files/jquery-ui/ui/jquery.ui.draggable.js on lines 449..449

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

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

            it("should replace existing key after few initial letter are typed", function () {
                testDocument.replaceRange("\"closeOthers.above\": true,", {line: 25, ch: 4});
                testEditor.setCursorPos({line: 25, ch: 17});
                selectHint(PrefsCodeHints.hintProvider, "closeOthers.below");
                expectTokenAt({line: 25, ch: 22}, "\"closeOthers.below\"", "string property");
Severity: Major
Found in src/extensions/default/PrefsCodeHints/unittests.js and 3 other locations - About 4 hrs to fix
src/extensions/default/PrefsCodeHints/unittests.js on lines 497..504
src/extensions/default/PrefsCodeHints/unittests.js on lines 505..512
src/extensions/default/PrefsCodeHints/unittests.js on lines 513..520

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

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

            it("should enter entire key after few initial letters are typed", function () {
                testDocument.replaceRange("\"close", {line: 25, ch: 4});
                testEditor.setCursorPos({line: 25, ch: 10});
                selectHint(PrefsCodeHints.hintProvider, "closeOthers.above");
                expectTokenAt({line: 25, ch: 22}, "\"closeOthers.above\"", "string property");
Severity: Major
Found in src/extensions/default/PrefsCodeHints/unittests.js and 3 other locations - About 4 hrs to fix
src/extensions/default/PrefsCodeHints/unittests.js on lines 497..504
src/extensions/default/PrefsCodeHints/unittests.js on lines 505..512
src/extensions/default/PrefsCodeHints/unittests.js on lines 521..528

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

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

            it("should enter entire key after first letter of a key is typed", function () {
                testDocument.replaceRange("\"c", {line: 25, ch: 4});
                testEditor.setCursorPos({line: 25, ch: 6});
                selectHint(PrefsCodeHints.hintProvider, "closeOthers.above");
                expectTokenAt({line: 25, ch: 22}, "\"closeOthers.above\"", "string property");
Severity: Major
Found in src/extensions/default/PrefsCodeHints/unittests.js and 3 other locations - About 4 hrs to fix
src/extensions/default/PrefsCodeHints/unittests.js on lines 497..504
src/extensions/default/PrefsCodeHints/unittests.js on lines 513..520
src/extensions/default/PrefsCodeHints/unittests.js on lines 521..528

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

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

            it("should enter entire key after initial quote is typed", function () {
                testDocument.replaceRange("\"", {line: 25, ch: 4});
                testEditor.setCursorPos({line: 25, ch: 5});
                selectHint(PrefsCodeHints.hintProvider, "closeOthers.above");
                expectTokenAt({line: 25, ch: 22}, "\"closeOthers.above\"", "string property");
Severity: Major
Found in src/extensions/default/PrefsCodeHints/unittests.js and 3 other locations - About 4 hrs to fix
src/extensions/default/PrefsCodeHints/unittests.js on lines 505..512
src/extensions/default/PrefsCodeHints/unittests.js on lines 513..520
src/extensions/default/PrefsCodeHints/unittests.js on lines 521..528

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

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

        getPadding: function (padding) {
            var p = (typeof padding === "number") ? [padding] : padding;

            if (p.length === 1) {
                p[1] = p[0];
src/extensions/default/InlineTimingFunctionEditor/StepEditor.js on lines 221..235

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

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

        getPadding: function (padding) {
            var p = (typeof padding === "number") ? [padding] : padding;

            if (p.length === 1) {
                p[1] = p[0];
src/extensions/default/InlineTimingFunctionEditor/BezierCurveEditor.js on lines 218..232

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

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 ( this._hasScroll() ) {
            var base = this.active.offset().top,
                height = this.element.height(),
                result;
            this.active.nextAll( ".ui-menu-item" ).each(function() {
src/extensions/default/JavaScriptQuickEdit/unittest-files/jquery-ui/ui/jquery.ui.menu.js on lines 576..588

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

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 ( this._hasScroll() ) {
            var base = this.active.offset().top,
                height = this.element.height(),
                result;
            this.active.prevAll( ".ui-menu-item" ).each(function() {
src/extensions/default/JavaScriptQuickEdit/unittest-files/jquery-ui/ui/jquery.ui.menu.js on lines 552..565

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

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

            it("should convert selected function to arrow function with two param and one return statement", function() {
                testEditor.setSelection({line: 146, ch: 6}, {line: 146, ch: 6});

                var prevDoc = testDoc.getText();

Severity: Major
Found in src/extensions/default/JavaScriptRefactoring/unittests.js and 2 other locations - About 4 hrs to fix
src/extensions/default/JavaScriptRefactoring/unittests.js on lines 712..722
src/extensions/default/JavaScriptRefactoring/unittests.js on lines 724..734

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

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

            it("should convert selected function to arrow function with one param and one return statement", function() {
                testEditor.setSelection({line: 150, ch: 6}, {line: 150, ch: 6});

                var prevDoc = testDoc.getText();

Severity: Major
Found in src/extensions/default/JavaScriptRefactoring/unittests.js and 2 other locations - About 4 hrs to fix
src/extensions/default/JavaScriptRefactoring/unittests.js on lines 700..710
src/extensions/default/JavaScriptRefactoring/unittests.js on lines 724..734

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

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

            it("should convert selected function to arrow function with two param and two statements", function() {
                testEditor.setSelection({line: 154, ch: 6}, {line: 154, ch: 6});

                var prevDoc = testDoc.getText();

Severity: Major
Found in src/extensions/default/JavaScriptRefactoring/unittests.js and 2 other locations - About 4 hrs to fix
src/extensions/default/JavaScriptRefactoring/unittests.js on lines 700..710
src/extensions/default/JavaScriptRefactoring/unittests.js on lines 712..722

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

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

        QuickOpen.addQuickOpenPlugin({
            name: "PHP Document Symbols",
            label: Strings.CMD_FIND_DOCUMENT_SYMBOLS + "\u2026",
            languageIds: ["php"],
            search: dSymProvider.search.bind(dSymProvider),
Severity: Major
Found in src/extensions/default/PhpTooling/main.js and 1 other location - About 4 hrs to fix
src/extensions/default/PhpTooling/main.js on lines 151..160

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

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

        QuickOpen.addQuickOpenPlugin({
            name: "PHP Project Symbols",
            label: Strings.CMD_FIND_PROJECT_SYMBOLS + "\u2026",
            languageIds: ["php"],
            search: pSymProvider.search.bind(pSymProvider),
Severity: Major
Found in src/extensions/default/PhpTooling/main.js and 1 other location - About 4 hrs to fix
src/extensions/default/PhpTooling/main.js on lines 139..148

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

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