adobe/brackets

View on GitHub

Showing 3,294 of 3,294 total issues

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 643..651
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 = 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: 24});
                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 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
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 =' is typed after an attribute", function () {
                // After =' 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 583..591
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 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 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 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

Function itself has 118 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    var itself = function (s, o, g) {
        var a, i, k;
        JSHINT.errors = [];
        JSHINT.undefs = [];
        predefined = Object.create(standard);

    Function findSelectorAtDocumentPos has 118 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        function findSelectorAtDocumentPos(editor, pos) {
            var cm = editor._codeMirror;
            var ctx = TokenUtils.getInitialContext(cm, $.extend({}, pos));
            var selector = "", foundChars = false;
            var isPreprocessorDoc = isCSSPreprocessorFile(editor.document.file.fullPath);
    Severity: Major
    Found in src/language/CSSUtils.js - About 4 hrs to fix

      File EditorStatusBar.js has 363 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      /*
       * Copyright (c) 2013 - present Adobe Systems Incorporated. All rights reserved.
       *
       * Permission is hereby granted, free of charge, to any person obtaining a
       * copy of this software and associated documentation files (the "Software"),
      Severity: Minor
      Found in src/editor/EditorStatusBar.js - About 4 hrs to fix

        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

        Function getParameters has 117 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        function getParameters(inferFnType) {
        
            // work around define functions before use warning.
            var recordTypeToString, inferTypeToString, processInferFnTypeParameters, inferFnTypeToString;
        
        
        Severity: Major
        Found in src/JSUtils/node/TernNodeDomain.js - About 4 hrs to fix

          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

          File jquery.ui.spinner.js has 360 lines of code (exceeds 250 allowed). Consider refactoring.
          Open

          /*!
           * jQuery UI Spinner @VERSION
           *
           * Copyright 2012, AUTHORS.txt (http://jqueryui.com/about)
           * Dual licensed under the MIT or GPL Version 2 licenses.
            Severity
            Category
            Status
            Source
            Language