adobe/brackets

View on GitHub

Showing 3,294 of 3,294 total issues

Function _createNewListItem has 30 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    WorkingSetView.prototype._createNewListItem = function (file) {
        var self = this,
            selectedFile = MainViewManager.getCurrentlyViewedFile(this.paneId),
            data = {fullPath: file.fullPath,
                    name: file.name,
Severity: Minor
Found in src/project/WorkingSetView.js - About 1 hr to fix

    Function openAndSelectDocument has 30 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        function openAndSelectDocument(fullPath, fileSelectionFocus, paneId) {
            var result,
                curDocChangedDueToMe = _curDocChangedDueToMe;
    
            function _getDerivedPaneContext() {
    Severity: Minor
    Found in src/project/FileViewController.js - About 1 hr to fix

      Function PreferencesSystem has 30 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          function PreferencesSystem(contextBuilder) {
              this.contextBuilder = contextBuilder;
      
              this._knownPrefs = {};
              this._scopes = {
      Severity: Minor
      Found in src/preferences/PreferencesBase.js - About 1 hr to fix

        Function handlers has 30 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            handlers: function( event, handlers ) {
                var i, matches, sel, handleObj,
                    handlerQueue = [],
                    delegateCount = handlers.delegateCount,
                    cur = event.target;
        Severity: Minor
        Found in src/thirdparty/jquery-2.1.3.js - About 1 hr to fix

          Function attr has 30 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              attr: function( elem, name, value ) {
                  var hooks, ret,
                      nType = elem.nodeType;
          
                  // don't get/set attributes on text, comment and attribute nodes
          Severity: Minor
          Found in src/thirdparty/jquery-2.1.3.js - About 1 hr to fix

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

                            it("should set opacity on drag", function () {
                                testDrag({
                                    item:      "$opacitySlider",
                                    clickAt:   [0, 0.75], // x: unused, y: 1.0 - opacity
                                    dragTo:    [0, 0.25],
            Severity: Major
            Found in src/extensions/default/InlineColorEditor/unittests.js and 7 other locations - About 1 hr to fix
            src/extensions/default/InlineColorEditor/unittests.js on lines 645..654
            src/extensions/default/InlineColorEditor/unittests.js on lines 665..674
            src/extensions/default/InlineColorEditor/unittests.js on lines 684..693
            src/extensions/default/InlineColorEditor/unittests.js on lines 694..703
            src/extensions/default/InlineColorEditor/unittests.js on lines 723..732
            src/extensions/default/InlineColorEditor/unittests.js on lines 733..742
            src/extensions/default/InlineColorEditor/unittests.js on lines 772..781

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

            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 set hue on drag", function () {
                                testDrag({
                                    item:      "$hueSlider",
                                    clickAt:   [0, 0.75], // x: unused, y: 1.0 - (hue / 360)
                                    dragTo:    [0, 0.25],
            Severity: Major
            Found in src/extensions/default/InlineColorEditor/unittests.js and 7 other locations - About 1 hr to fix
            src/extensions/default/InlineColorEditor/unittests.js on lines 645..654
            src/extensions/default/InlineColorEditor/unittests.js on lines 665..674
            src/extensions/default/InlineColorEditor/unittests.js on lines 684..693
            src/extensions/default/InlineColorEditor/unittests.js on lines 694..703
            src/extensions/default/InlineColorEditor/unittests.js on lines 733..742
            src/extensions/default/InlineColorEditor/unittests.js on lines 762..771
            src/extensions/default/InlineColorEditor/unittests.js on lines 772..781

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

            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 set value on drag", function () {
                                testDrag({
                                    item:      "$selection",
                                    clickAt:   [1.0, 0.75], // x: saturation, y: 1.0 - value
                                    dragTo:    [1.0, 0.25],
            Severity: Major
            Found in src/extensions/default/InlineColorEditor/unittests.js and 7 other locations - About 1 hr to fix
            src/extensions/default/InlineColorEditor/unittests.js on lines 645..654
            src/extensions/default/InlineColorEditor/unittests.js on lines 665..674
            src/extensions/default/InlineColorEditor/unittests.js on lines 694..703
            src/extensions/default/InlineColorEditor/unittests.js on lines 723..732
            src/extensions/default/InlineColorEditor/unittests.js on lines 733..742
            src/extensions/default/InlineColorEditor/unittests.js on lines 762..771
            src/extensions/default/InlineColorEditor/unittests.js on lines 772..781

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

            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 set saturation on drag", function () {
                                testDrag({
                                    item:      "$selection",
                                    clickAt:   [0.25, 0], // x: saturation, y: 1.0 - value
                                    dragTo:    [0.75, 0],
            Severity: Major
            Found in src/extensions/default/InlineColorEditor/unittests.js and 7 other locations - About 1 hr to fix
            src/extensions/default/InlineColorEditor/unittests.js on lines 665..674
            src/extensions/default/InlineColorEditor/unittests.js on lines 684..693
            src/extensions/default/InlineColorEditor/unittests.js on lines 694..703
            src/extensions/default/InlineColorEditor/unittests.js on lines 723..732
            src/extensions/default/InlineColorEditor/unittests.js on lines 733..742
            src/extensions/default/InlineColorEditor/unittests.js on lines 762..771
            src/extensions/default/InlineColorEditor/unittests.js on lines 772..781

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

            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 clip saturation to max value", function () {
                                testDrag({
                                    item:      "$selection",
                                    clickAt:   [0.25, 0], // x: saturation, y: 1.0 - value
                                    dragTo:    [1.25, 0],
            Severity: Major
            Found in src/extensions/default/InlineColorEditor/unittests.js and 7 other locations - About 1 hr to fix
            src/extensions/default/InlineColorEditor/unittests.js on lines 645..654
            src/extensions/default/InlineColorEditor/unittests.js on lines 684..693
            src/extensions/default/InlineColorEditor/unittests.js on lines 694..703
            src/extensions/default/InlineColorEditor/unittests.js on lines 723..732
            src/extensions/default/InlineColorEditor/unittests.js on lines 733..742
            src/extensions/default/InlineColorEditor/unittests.js on lines 762..771
            src/extensions/default/InlineColorEditor/unittests.js on lines 772..781

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

            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 clip hue to min value", function () {
                                testDrag({
                                    item:      "$hueSlider",
                                    clickAt:   [0, 0.75], // x: unused, y: 1.0 - (hue / 360)
                                    dragTo:    [0, 1.25],
            Severity: Major
            Found in src/extensions/default/InlineColorEditor/unittests.js and 7 other locations - About 1 hr to fix
            src/extensions/default/InlineColorEditor/unittests.js on lines 645..654
            src/extensions/default/InlineColorEditor/unittests.js on lines 665..674
            src/extensions/default/InlineColorEditor/unittests.js on lines 684..693
            src/extensions/default/InlineColorEditor/unittests.js on lines 694..703
            src/extensions/default/InlineColorEditor/unittests.js on lines 723..732
            src/extensions/default/InlineColorEditor/unittests.js on lines 762..771
            src/extensions/default/InlineColorEditor/unittests.js on lines 772..781

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

            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 clip opacity to min value", function () {
                                testDrag({
                                    item:      "$opacitySlider",
                                    clickAt:   [0, 0.75], // x: unused, y: 1.0 - opacity
                                    dragTo:    [0, 1.25],
            Severity: Major
            Found in src/extensions/default/InlineColorEditor/unittests.js and 7 other locations - About 1 hr to fix
            src/extensions/default/InlineColorEditor/unittests.js on lines 645..654
            src/extensions/default/InlineColorEditor/unittests.js on lines 665..674
            src/extensions/default/InlineColorEditor/unittests.js on lines 684..693
            src/extensions/default/InlineColorEditor/unittests.js on lines 694..703
            src/extensions/default/InlineColorEditor/unittests.js on lines 723..732
            src/extensions/default/InlineColorEditor/unittests.js on lines 733..742
            src/extensions/default/InlineColorEditor/unittests.js on lines 762..771

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

            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 _saveFileList has 30 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                function _saveFileList(fileList) {
                    // Do in serial because doSave shows error UI for each file, and we don't want to stack
                    // multiple dialogs on top of each other
                    var userCanceled = false,
                        filesAfterSave = [];
            Severity: Minor
            Found in src/document/DocumentCommandHandlers.js - About 1 hr to fix

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

                              it("should clip value to min value", function () {
                                  testDrag({
                                      item:      "$selection",
                                      clickAt:   [1.0, 0.75], // x: saturation, y: 1.0 - value
                                      dragTo:    [1.0, 1.25],
              Severity: Major
              Found in src/extensions/default/InlineColorEditor/unittests.js and 7 other locations - About 1 hr to fix
              src/extensions/default/InlineColorEditor/unittests.js on lines 645..654
              src/extensions/default/InlineColorEditor/unittests.js on lines 665..674
              src/extensions/default/InlineColorEditor/unittests.js on lines 684..693
              src/extensions/default/InlineColorEditor/unittests.js on lines 723..732
              src/extensions/default/InlineColorEditor/unittests.js on lines 733..742
              src/extensions/default/InlineColorEditor/unittests.js on lines 762..771
              src/extensions/default/InlineColorEditor/unittests.js on lines 772..781

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

              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 _disableCache has 30 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  function _disableCache() {
                      var result = new $.Deferred();
              
                      if (brackets.inBrowser) {
                          result.resolve();
              Severity: Minor
              Found in src/document/DocumentCommandHandlers.js - About 1 hr to fix

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

                                if(event.pageX - this.offset.click.left > containment[2]) pageX = containment[2] + this.offset.click.left;
                src/extensions/default/JavaScriptQuickEdit/unittest-files/jquery-ui/ui/jquery.ui.draggable.js on lines 440..440
                src/extensions/default/JavaScriptQuickEdit/unittest-files/jquery-ui/ui/jquery.ui.draggable.js on lines 441..441
                src/extensions/default/JavaScriptQuickEdit/unittest-files/jquery-ui/ui/jquery.ui.draggable.js on lines 443..443

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

                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

                                if(event.pageY - this.offset.click.top > containment[3]) pageY = containment[3] + this.offset.click.top;
                src/extensions/default/JavaScriptQuickEdit/unittest-files/jquery-ui/ui/jquery.ui.draggable.js on lines 440..440
                src/extensions/default/JavaScriptQuickEdit/unittest-files/jquery-ui/ui/jquery.ui.draggable.js on lines 441..441
                src/extensions/default/JavaScriptQuickEdit/unittest-files/jquery-ui/ui/jquery.ui.draggable.js on lines 442..442

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

                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 match steps function with leading zeros", function () {
                                match = TimingFunctionUtils.timingFunctionMatch("steps(04, end)", false);
                                expectArraysToBeEqual(match, ["steps(04, end)", "04", "end"]);
                                expect(match.originalString).toBeFalsy();
                            });
                src/extensions/default/InlineTimingFunctionEditor/unittests.js on lines 301..305
                src/extensions/default/InlineTimingFunctionEditor/unittests.js on lines 311..315
                src/extensions/default/InlineTimingFunctionEditor/unittests.js on lines 331..335

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

                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 match steps function with only 1 parameter", function () {
                                match = TimingFunctionUtils.timingFunctionMatch("steps(8)", false);
                                expectArraysToBeEqual(match, ["steps(8)", "8", undefined]);
                                expect(match.originalString).toBeFalsy();
                            });
                src/extensions/default/InlineTimingFunctionEditor/unittests.js on lines 316..320
                src/extensions/default/InlineTimingFunctionEditor/unittests.js on lines 326..330
                src/extensions/default/InlineTimingFunctionEditor/unittests.js on lines 336..340

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

                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 match steps function with second parameter of end", function () {
                                match = TimingFunctionUtils.timingFunctionMatch("steps(12, end)", false);
                                expectArraysToBeEqual(match, ["steps(12, end)", "12", "end"]);
                                expect(match.originalString).toBeFalsy();
                            });
                src/extensions/default/InlineTimingFunctionEditor/unittests.js on lines 311..315
                src/extensions/default/InlineTimingFunctionEditor/unittests.js on lines 321..325
                src/extensions/default/InlineTimingFunctionEditor/unittests.js on lines 331..335

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

                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