adobe/brackets

View on GitHub
src/extensions/default/InlineColorEditor/unittests.js

Summary

Maintainability
F
2 wks
Test Coverage

File unittests.js has 1267 lines of code (exceeds 250 allowed). Consider refactoring.
Open

/*
 * Copyright (c) 2012 - 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: Major
Found in src/extensions/default/InlineColorEditor/unittests.js - About 3 days to fix

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

                    it("should not update the end textmark and the color shown to a shorter valid match if the marker still exists and the color becomes invalid", function () {
                        makeColorEditor({line: 1, ch: 18});
                        runs(function () {
                            testDocument.replaceRange("", {line: 1, ch: 22}, {line: 1, ch: 23});
                            expect(inline._color).toBe("#abcdef");
    Severity: Major
    Found in src/extensions/default/InlineColorEditor/unittests.js and 1 other location - About 6 hrs to fix
    src/extensions/default/InlineColorEditor/unittests.js on lines 298..305

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

    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

                    it("should not update the end textmark and the color shown to a shorter valid match if the marker no longer exists and the color becomes invalid", function () {
                        makeColorEditor({line: 1, ch: 18});
                        runs(function () {
                            testDocument.replaceRange("", {line: 1, ch: 22}, {line: 1, ch: 24});
                            expect(inline._color).toBe("#abcdef");
    Severity: Major
    Found in src/extensions/default/InlineColorEditor/unittests.js and 1 other location - About 6 hrs to fix
    src/extensions/default/InlineColorEditor/unittests.js on lines 289..296

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

    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

                    it("should revert to the previous value on the change event while the value is invalid", function () {
                        makeUI("#abcdef");
                        colorEditor.$colorValue.val("rgb(0, 0, 0");
                        colorEditor.$colorValue.trigger("change");
                        expect(tinycolor(colorEditor.getColor()).toHexString()).toBe("#abcdef");
    Severity: Major
    Found in src/extensions/default/InlineColorEditor/unittests.js and 1 other location - About 3 hrs to fix
    src/extensions/default/InlineColorEditor/unittests.js on lines 1347..1353

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

    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

                    it("should not commit changes on the input event while the value is invalid, but should keep them in the text field", function () {
                        makeUI("#abcdef");
                        colorEditor.$colorValue.val("rgb(0, 0, 0");
                        colorEditor.$colorValue.trigger("input");
                        expect(tinycolor(colorEditor.getColor()).toHexString()).toBe("#abcdef");
    Severity: Major
    Found in src/extensions/default/InlineColorEditor/unittests.js and 1 other location - About 3 hrs to fix
    src/extensions/default/InlineColorEditor/unittests.js on lines 1354..1360

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

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

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

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

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

    Refactorings

    Further Reading

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

                        runs(function () {
                            checkPercentageNear(colorEditor.$hueSelector[0].style.bottom, 25);
                            checkPercentageNear(colorEditor.$opacitySelector[0].style.bottom, 50);
                            checkPercentageNear(colorEditor.$selectionBase[0].style.left, 74);
                            checkPercentageNear(colorEditor.$selectionBase[0].style.bottom, 47);
    Severity: Major
    Found in src/extensions/default/InlineColorEditor/unittests.js and 1 other location - About 3 hrs to fix
    src/extensions/default/InlineColorEditor/unittests.js on lines 440..445

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

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

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

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

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

    Refactorings

    Further Reading

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

                        runs(function () {
                            checkPercentageNear(colorEditor.$hueSelector[0].style.bottom, 25);
                            checkPercentageNear(colorEditor.$opacitySelector[0].style.bottom, 50);
                            checkPercentageNear(colorEditor.$selectionBase[0].style.left, 74);
                            checkPercentageNear(colorEditor.$selectionBase[0].style.bottom, 47);
    Severity: Major
    Found in src/extensions/default/InlineColorEditor/unittests.js and 1 other location - About 3 hrs to fix
    src/extensions/default/InlineColorEditor/unittests.js on lines 466..471

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

    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

                    it("should update correct range of host document with color format of different length", function () {
                        makeColorEditor({line: 1, ch: 18});
                        runs(function () {
                            inline.colorEditor.setColorFromString("rgb(20, 20, 20)");
                            expect(testDocument.getRange({line: 1, ch: 16}, {line: 1, ch: 31})).toBe("rgb(20, 20, 20)");
    Severity: Major
    Found in src/extensions/default/InlineColorEditor/unittests.js and 1 other location - About 3 hrs to fix
    src/extensions/default/InlineColorEditor/unittests.js on lines 213..219

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

    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

                    it("should update host document when change is committed in color editor", function () {
                        makeColorEditor({line: 1, ch: 18});
                        runs(function () {
                            inline.colorEditor.setColorFromString("#c0c0c0");
                            expect(testDocument.getRange({line: 1, ch: 16}, {line: 1, ch: 23})).toBe("#c0c0c0");
    Severity: Major
    Found in src/extensions/default/InlineColorEditor/unittests.js and 1 other location - About 3 hrs to fix
    src/extensions/default/InlineColorEditor/unittests.js on lines 221..227

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

    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 undo a hue change", function () {
                        makeUI("rgba(100, 150, 200, 0.3)");
                        runs(function () {
                            eventAtRatio("mousedown", colorEditor.$hueBase, [0, 0.5]);
                            triggerCtrlKey(colorEditor.$hueBase, KeyEvent.DOM_VK_Z);
    Severity: Major
    Found in src/extensions/default/InlineColorEditor/unittests.js and 2 other locations - About 3 hrs to fix
    src/extensions/default/InlineColorEditor/unittests.js on lines 1465..1473
    src/extensions/default/InlineColorEditor/unittests.js on lines 1483..1491

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 99.

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

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

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

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

    Refactorings

    Further Reading

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

                    it("should undo an opacity change", function () {
                        makeUI("rgba(100, 150, 200, 0.3)");
                        runs(function () {
                            eventAtRatio("mousedown", colorEditor.$opacitySelector, [0, 0.5]);
                            triggerCtrlKey(colorEditor.$opacitySelector, KeyEvent.DOM_VK_Z);
    Severity: Major
    Found in src/extensions/default/InlineColorEditor/unittests.js and 2 other locations - About 3 hrs to fix
    src/extensions/default/InlineColorEditor/unittests.js on lines 1465..1473
    src/extensions/default/InlineColorEditor/unittests.js on lines 1474..1482

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 99.

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

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

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

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

    Refactorings

    Further Reading

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

                    it("should undo a saturation/value change", function () {
                        makeUI("rgba(100, 150, 200, 0.3)");
                        runs(function () {
                            eventAtRatio("mousedown", colorEditor.$selectionBase, [0.5, 0.5]);
                            triggerCtrlKey(colorEditor.$selectionBase, KeyEvent.DOM_VK_Z);
    Severity: Major
    Found in src/extensions/default/InlineColorEditor/unittests.js and 2 other locations - About 3 hrs to fix
    src/extensions/default/InlineColorEditor/unittests.js on lines 1474..1482
    src/extensions/default/InlineColorEditor/unittests.js on lines 1483..1491

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 99.

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

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

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

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

    Refactorings

    Further Reading

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

            function makeColorEditor(cursor) {
                runs(function () {
                    var promise = provider(testEditor, cursor);
                    if (promise) {
                        promise.done(function (inlineResult) {
    Severity: Major
    Found in src/extensions/default/InlineColorEditor/unittests.js and 1 other location - About 2 hrs to fix
    src/extensions/default/InlineTimingFunctionEditor/unittests.js on lines 49..60

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

    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

                    it("should commit valid changes made in the input field on the change event", function () {
                        makeUI("#abcdef");
                        colorEditor.$colorValue.val("#fedcba");
                        colorEditor.$colorValue.trigger("change");
                        expect(tinycolor(colorEditor.getColor()).toHexString()).toBe("#fedcba");
    Severity: Major
    Found in src/extensions/default/InlineColorEditor/unittests.js and 1 other location - About 2 hrs to fix
    src/extensions/default/InlineColorEditor/unittests.js on lines 1335..1340

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

    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

                    it("should commit valid changes made in the input field on the input event", function () {
                        makeUI("#abcdef");
                        colorEditor.$colorValue.val("#fedcba");
                        colorEditor.$colorValue.trigger("input");
                        expect(tinycolor(colorEditor.getColor()).toHexString()).toBe("#fedcba");
    Severity: Major
    Found in src/extensions/default/InlineColorEditor/unittests.js and 1 other location - About 2 hrs to fix
    src/extensions/default/InlineColorEditor/unittests.js on lines 1341..1346

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

    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

                    it("should undo a hex conversion", function () {
                        makeUI("rgba(12, 32, 65, 0.2)");
                        runs(function () {
                            colorEditor.$hexButton.trigger("click");
                            triggerCtrlKey(colorEditor.$hexButton, KeyEvent.DOM_VK_Z);
    Severity: Major
    Found in src/extensions/default/InlineColorEditor/unittests.js and 1 other location - About 2 hrs to fix
    src/extensions/default/InlineColorEditor/unittests.js on lines 1493..1500

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

    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

                    it("should undo a text field change", function () {
                        makeUI("rgba(100, 150, 200, 0.3)");
                        runs(function () {
                            colorEditor.$colorValue.val("rgba(50, 50, 50, 0.9)");
                            triggerCtrlKey(colorEditor.$colorValue, KeyEvent.DOM_VK_Z);
    Severity: Major
    Found in src/extensions/default/InlineColorEditor/unittests.js and 1 other location - About 2 hrs to fix
    src/extensions/default/InlineColorEditor/unittests.js on lines 1456..1463

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

    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

                    it("should undo an rgba conversion", function () {
                        makeUI("#abcdef");
                        runs(function () {
                            colorEditor.$rgbaButton.click();
                            triggerCtrlKey(colorEditor.$rgbaButton, KeyEvent.DOM_VK_Z);
    Severity: Major
    Found in src/extensions/default/InlineColorEditor/unittests.js and 1 other location - About 2 hrs to fix
    src/extensions/default/InlineColorEditor/unittests.js on lines 1448..1455

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

    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

                    it("should undo an hsla conversion", function () {
                        makeUI("#abcdef");
                        runs(function () {
                            colorEditor.$hslButton.click();
                            triggerCtrlKey(colorEditor.$hslButton, KeyEvent.DOM_VK_Z);
    Severity: Major
    Found in src/extensions/default/InlineColorEditor/unittests.js and 1 other location - About 2 hrs to fix
    src/extensions/default/InlineColorEditor/unittests.js on lines 1440..1447

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

    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 increase hue by 18 on shift up arrow even if saturation is 0", function () {
                        testKey({
                            color:     "hsl(180, 0, 0)",
                            item:      "$hueBase",
                            key:       KeyEvent.DOM_VK_UP,
    Severity: Major
    Found in src/extensions/default/InlineColorEditor/unittests.js and 2 other locations - About 1 hr to fix
    src/extensions/default/InlineColorEditor/unittests.js on lines 1202..1213
    src/extensions/default/InlineColorEditor/unittests.js on lines 1214..1225

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

    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 not change value when hue changes", function () {
                        testKey({
                            color:     "#8e8247",
                            item:      "$hueBase",
                            key:       KeyEvent.DOM_VK_UP,
    Severity: Major
    Found in src/extensions/default/InlineColorEditor/unittests.js and 2 other locations - About 1 hr to fix
    src/extensions/default/InlineColorEditor/unittests.js on lines 1190..1201
    src/extensions/default/InlineColorEditor/unittests.js on lines 1202..1213

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

    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 increase hue by 18 on shift up arrow for a near-gray hex color", function () {
                        testKey({
                            color:     "#5c5b56",
                            item:      "$hueBase",
                            key:       KeyEvent.DOM_VK_UP,
    Severity: Major
    Found in src/extensions/default/InlineColorEditor/unittests.js and 2 other locations - About 1 hr to fix
    src/extensions/default/InlineColorEditor/unittests.js on lines 1190..1201
    src/extensions/default/InlineColorEditor/unittests.js on lines 1214..1225

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

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

                    it("should clip max value on shift up arrow", function () {
                        testKey({
                            color:     "hsla(50, 25%, 100%, 0.5)",
                            item:      "$selectionBase",
                            key:       KeyEvent.DOM_VK_UP,
    Severity: Major
    Found in src/extensions/default/InlineColorEditor/unittests.js and 4 other locations - About 1 hr to fix
    src/extensions/default/InlineColorEditor/unittests.js on lines 897..907
    src/extensions/default/InlineColorEditor/unittests.js on lines 937..947
    src/extensions/default/InlineColorEditor/unittests.js on lines 1017..1027
    src/extensions/default/InlineColorEditor/unittests.js on lines 1137..1147

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

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

                    it("should clip max opacity on shift up arrow", function () {
                        testKey({
                            color:     "hsla(90, 25%, 50%, 1.0)",
                            item:      "$opacitySelector",
                            key:       KeyEvent.DOM_VK_UP,
    Severity: Major
    Found in src/extensions/default/InlineColorEditor/unittests.js and 4 other locations - About 1 hr to fix
    src/extensions/default/InlineColorEditor/unittests.js on lines 897..907
    src/extensions/default/InlineColorEditor/unittests.js on lines 937..947
    src/extensions/default/InlineColorEditor/unittests.js on lines 977..987
    src/extensions/default/InlineColorEditor/unittests.js on lines 1017..1027

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

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

                    it("should clip max saturation on shift right arrow", function () {
                        testKey({
                            color:     "hsla(50, 100%, 50%, 0.5)",
                            item:      "$selectionBase",
                            key:       KeyEvent.DOM_VK_RIGHT,
    Severity: Major
    Found in src/extensions/default/InlineColorEditor/unittests.js and 4 other locations - About 1 hr to fix
    src/extensions/default/InlineColorEditor/unittests.js on lines 937..947
    src/extensions/default/InlineColorEditor/unittests.js on lines 977..987
    src/extensions/default/InlineColorEditor/unittests.js on lines 1017..1027
    src/extensions/default/InlineColorEditor/unittests.js on lines 1137..1147

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

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

                    it("should clip min value on shift down arrow", function () {
                        testKey({
                            color:     "hsla(50, 25%, 0%, 0.5)",
                            item:      "$selectionBase",
                            key:       KeyEvent.DOM_VK_DOWN,
    Severity: Major
    Found in src/extensions/default/InlineColorEditor/unittests.js and 4 other locations - About 1 hr to fix
    src/extensions/default/InlineColorEditor/unittests.js on lines 897..907
    src/extensions/default/InlineColorEditor/unittests.js on lines 937..947
    src/extensions/default/InlineColorEditor/unittests.js on lines 977..987
    src/extensions/default/InlineColorEditor/unittests.js on lines 1137..1147

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

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

                    it("should clip min saturation on shift left arrow", function () {
                        testKey({
                            color:     "hsla(50, 0%, 50%, 0.5)",
                            item:      "$selectionBase",
                            key:       KeyEvent.DOM_VK_LEFT,
    Severity: Major
    Found in src/extensions/default/InlineColorEditor/unittests.js and 4 other locations - About 1 hr to fix
    src/extensions/default/InlineColorEditor/unittests.js on lines 897..907
    src/extensions/default/InlineColorEditor/unittests.js on lines 977..987
    src/extensions/default/InlineColorEditor/unittests.js on lines 1017..1027
    src/extensions/default/InlineColorEditor/unittests.js on lines 1137..1147

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

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

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

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

                    it("should not open when not on a color", function () {
                        makeColorEditor({line: 1, ch: 6});
                        runs(function () {
                            expect(inline).toEqual(null);
                        });
    Severity: Major
    Found in src/extensions/default/InlineColorEditor/unittests.js and 1 other location - About 1 hr to fix
    src/extensions/default/InlineColorEditor/unittests.js on lines 176..181

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

    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

                    it("should not open when on an invalid color", function () {
                        makeColorEditor({line: 25, ch: 18});
                        runs(function () {
                            expect(inline).toEqual(null);
                        });
    Severity: Major
    Found in src/extensions/default/InlineColorEditor/unittests.js and 1 other location - About 1 hr to fix
    src/extensions/default/InlineColorEditor/unittests.js on lines 170..175

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

    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 decrease opacity by 0.05 on shift down arrow", function () {
                        testKey({
                            item:      "$opacitySelector",
                            key:       KeyEvent.DOM_VK_DOWN,
                            shift:     true,
    Severity: Major
    Found in src/extensions/default/InlineColorEditor/unittests.js and 3 other locations - About 1 hr to fix
    src/extensions/default/InlineColorEditor/unittests.js on lines 927..936
    src/extensions/default/InlineColorEditor/unittests.js on lines 1007..1016
    src/extensions/default/InlineColorEditor/unittests.js on lines 1087..1096

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

    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 decrease value by 7.5% on shift down arrow", function () {
                        testKey({
                            item:      "$selectionBase",
                            key:       KeyEvent.DOM_VK_DOWN,
                            shift:     true,
    Severity: Major
    Found in src/extensions/default/InlineColorEditor/unittests.js and 3 other locations - About 1 hr to fix
    src/extensions/default/InlineColorEditor/unittests.js on lines 927..936
    src/extensions/default/InlineColorEditor/unittests.js on lines 1087..1096
    src/extensions/default/InlineColorEditor/unittests.js on lines 1167..1176

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

    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 decrease saturation by 7.5% on shift left arrow", function () {
                        testKey({
                            item:      "$selectionBase",
                            key:       KeyEvent.DOM_VK_LEFT,
                            shift:     true,
    Severity: Major
    Found in src/extensions/default/InlineColorEditor/unittests.js and 3 other locations - About 1 hr to fix
    src/extensions/default/InlineColorEditor/unittests.js on lines 1007..1016
    src/extensions/default/InlineColorEditor/unittests.js on lines 1087..1096
    src/extensions/default/InlineColorEditor/unittests.js on lines 1167..1176

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

    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 decrease hue by 18 on shift down arrow", function () {
                        testKey({
                            item:      "$hueBase",
                            key:       KeyEvent.DOM_VK_DOWN,
                            shift:     true,
    Severity: Major
    Found in src/extensions/default/InlineColorEditor/unittests.js and 3 other locations - About 1 hr to fix
    src/extensions/default/InlineColorEditor/unittests.js on lines 927..936
    src/extensions/default/InlineColorEditor/unittests.js on lines 1007..1016
    src/extensions/default/InlineColorEditor/unittests.js on lines 1167..1176

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

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

                    it("should clip max value on up arrow", function () {
                        testKey({
                            color:     "hsla(50, 25%, 100%, 0.5)",
                            item:      "$selectionBase",
                            key:       KeyEvent.DOM_VK_UP,
    Severity: Major
    Found in src/extensions/default/InlineColorEditor/unittests.js and 5 other locations - About 1 hr to fix
    src/extensions/default/InlineColorEditor/unittests.js on lines 877..886
    src/extensions/default/InlineColorEditor/unittests.js on lines 917..926
    src/extensions/default/InlineColorEditor/unittests.js on lines 997..1006
    src/extensions/default/InlineColorEditor/unittests.js on lines 1117..1126
    src/extensions/default/InlineColorEditor/unittests.js on lines 1157..1166

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

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

                    it("should clip min value on down arrow", function () {
                        testKey({
                            color:     "hsla(50, 25%, 0%, 0.5)",
                            item:      "$selectionBase",
                            key:       KeyEvent.DOM_VK_DOWN,
    Severity: Major
    Found in src/extensions/default/InlineColorEditor/unittests.js and 5 other locations - About 1 hr to fix
    src/extensions/default/InlineColorEditor/unittests.js on lines 877..886
    src/extensions/default/InlineColorEditor/unittests.js on lines 917..926
    src/extensions/default/InlineColorEditor/unittests.js on lines 957..966
    src/extensions/default/InlineColorEditor/unittests.js on lines 1117..1126
    src/extensions/default/InlineColorEditor/unittests.js on lines 1157..1166

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

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

                    it("should clip min opacity on down arrow", function () {
                        testKey({
                            color:     "hsla(90, 25%, 50%, 0)",
                            item:      "$opacitySelector",
                            key:       KeyEvent.DOM_VK_DOWN,
    Severity: Major
    Found in src/extensions/default/InlineColorEditor/unittests.js and 5 other locations - About 1 hr to fix
    src/extensions/default/InlineColorEditor/unittests.js on lines 877..886
    src/extensions/default/InlineColorEditor/unittests.js on lines 917..926
    src/extensions/default/InlineColorEditor/unittests.js on lines 957..966
    src/extensions/default/InlineColorEditor/unittests.js on lines 997..1006
    src/extensions/default/InlineColorEditor/unittests.js on lines 1117..1126

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

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

                    it("should clip max saturation on right arrow", function () {
                        testKey({
                            color:     "hsla(50, 100%, 50%, 0.5)",
                            item:      "$selectionBase",
                            key:       KeyEvent.DOM_VK_RIGHT,
    Severity: Major
    Found in src/extensions/default/InlineColorEditor/unittests.js and 5 other locations - About 1 hr to fix
    src/extensions/default/InlineColorEditor/unittests.js on lines 917..926
    src/extensions/default/InlineColorEditor/unittests.js on lines 957..966
    src/extensions/default/InlineColorEditor/unittests.js on lines 997..1006
    src/extensions/default/InlineColorEditor/unittests.js on lines 1117..1126
    src/extensions/default/InlineColorEditor/unittests.js on lines 1157..1166

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

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

                    it("should clip min saturation on left arrow", function () {
                        testKey({
                            color:     "hsla(50, 0%, 50%, 0.5)",
                            item:      "$selectionBase",
                            key:       KeyEvent.DOM_VK_LEFT,
    Severity: Major
    Found in src/extensions/default/InlineColorEditor/unittests.js and 5 other locations - About 1 hr to fix
    src/extensions/default/InlineColorEditor/unittests.js on lines 877..886
    src/extensions/default/InlineColorEditor/unittests.js on lines 957..966
    src/extensions/default/InlineColorEditor/unittests.js on lines 997..1006
    src/extensions/default/InlineColorEditor/unittests.js on lines 1117..1126
    src/extensions/default/InlineColorEditor/unittests.js on lines 1157..1166

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

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

                    it("should clip max opacity on up arrow", function () {
                        testKey({
                            color:     "hsla(90, 25%, 50%, 1.0)",
                            item:      "$opacitySelector",
                            key:       KeyEvent.DOM_VK_UP,
    Severity: Major
    Found in src/extensions/default/InlineColorEditor/unittests.js and 5 other locations - About 1 hr to fix
    src/extensions/default/InlineColorEditor/unittests.js on lines 877..886
    src/extensions/default/InlineColorEditor/unittests.js on lines 917..926
    src/extensions/default/InlineColorEditor/unittests.js on lines 957..966
    src/extensions/default/InlineColorEditor/unittests.js on lines 997..1006
    src/extensions/default/InlineColorEditor/unittests.js on lines 1157..1166

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

    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 increase saturation by 7.5% on shift right arrow", function () {
                        testKey({
                            item:      "$selectionBase",
                            key:       KeyEvent.DOM_VK_RIGHT,
                            shift:     true,
    Severity: Major
    Found in src/extensions/default/InlineColorEditor/unittests.js and 3 other locations - About 1 hr to fix
    src/extensions/default/InlineColorEditor/unittests.js on lines 967..976
    src/extensions/default/InlineColorEditor/unittests.js on lines 1047..1056
    src/extensions/default/InlineColorEditor/unittests.js on lines 1127..1136

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

    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 increase value by 7.5% on shift up arrow", function () {
                        testKey({
                            item:      "$selectionBase",
                            key:       KeyEvent.DOM_VK_UP,
                            shift:     true,
    Severity: Major
    Found in src/extensions/default/InlineColorEditor/unittests.js and 3 other locations - About 1 hr to fix
    src/extensions/default/InlineColorEditor/unittests.js on lines 887..896
    src/extensions/default/InlineColorEditor/unittests.js on lines 1047..1056
    src/extensions/default/InlineColorEditor/unittests.js on lines 1127..1136

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

    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 increase opacity by 0.05 on shift up arrow", function () {
                        testKey({
                            item:      "$opacitySelector",
                            key:       KeyEvent.DOM_VK_UP,
                            shift:     true,
    Severity: Major
    Found in src/extensions/default/InlineColorEditor/unittests.js and 3 other locations - About 1 hr to fix
    src/extensions/default/InlineColorEditor/unittests.js on lines 887..896
    src/extensions/default/InlineColorEditor/unittests.js on lines 967..976
    src/extensions/default/InlineColorEditor/unittests.js on lines 1047..1056

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

    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 increase hue by 18 on shift up arrow", function () {
                        testKey({
                            item:      "$hueBase",
                            key:       KeyEvent.DOM_VK_UP,
                            shift:     true,
    Severity: Major
    Found in src/extensions/default/InlineColorEditor/unittests.js and 3 other locations - About 1 hr to fix
    src/extensions/default/InlineColorEditor/unittests.js on lines 887..896
    src/extensions/default/InlineColorEditor/unittests.js on lines 967..976
    src/extensions/default/InlineColorEditor/unittests.js on lines 1127..1136

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

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

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

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

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

    Refactorings

    Further Reading

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

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

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 53.

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

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

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

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

    Refactorings

    Further Reading

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

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

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 53.

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

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

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

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

    Refactorings

    Further Reading

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

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

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 53.

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

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

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

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

    Refactorings

    Further Reading

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

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

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 53.

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

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

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

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

    Refactorings

    Further Reading

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

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

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 53.

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

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

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

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

    Refactorings

    Further Reading

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

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

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 53.

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

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

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

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

    Refactorings

    Further Reading

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

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

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 53.

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

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

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

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

    Refactorings

    Further Reading

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

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

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 53.

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

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

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

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

    Refactorings

    Further Reading

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

                    it("should decrease hue by 3.6 on down arrow", function () {
                        testKey({
                            item:      "$hueBase",
                            key:       KeyEvent.DOM_VK_DOWN,
                            param:     "h",
    Severity: Major
    Found in src/extensions/default/InlineColorEditor/unittests.js and 3 other locations - About 50 mins to fix
    src/extensions/default/InlineColorEditor/unittests.js on lines 908..916
    src/extensions/default/InlineColorEditor/unittests.js on lines 988..996
    src/extensions/default/InlineColorEditor/unittests.js on lines 1148..1156

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

    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 decrease saturation by 1.5% on left arrow", function () {
                        testKey({
                            item:      "$selectionBase",
                            key:       KeyEvent.DOM_VK_LEFT,
                            param:     "s",
    Severity: Major
    Found in src/extensions/default/InlineColorEditor/unittests.js and 3 other locations - About 50 mins to fix
    src/extensions/default/InlineColorEditor/unittests.js on lines 988..996
    src/extensions/default/InlineColorEditor/unittests.js on lines 1068..1076
    src/extensions/default/InlineColorEditor/unittests.js on lines 1148..1156

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

    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 decrease opacity by 0.01 on down arrow", function () {
                        testKey({
                            item:      "$opacitySelector",
                            key:       KeyEvent.DOM_VK_DOWN,
                            param:     "a",
    Severity: Major
    Found in src/extensions/default/InlineColorEditor/unittests.js and 3 other locations - About 50 mins to fix
    src/extensions/default/InlineColorEditor/unittests.js on lines 908..916
    src/extensions/default/InlineColorEditor/unittests.js on lines 988..996
    src/extensions/default/InlineColorEditor/unittests.js on lines 1068..1076

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

    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 decrease value by 1.5% on down arrow", function () {
                        testKey({
                            item:      "$selectionBase",
                            key:       KeyEvent.DOM_VK_DOWN,
                            param:     "v",
    Severity: Major
    Found in src/extensions/default/InlineColorEditor/unittests.js and 3 other locations - About 50 mins to fix
    src/extensions/default/InlineColorEditor/unittests.js on lines 908..916
    src/extensions/default/InlineColorEditor/unittests.js on lines 1068..1076
    src/extensions/default/InlineColorEditor/unittests.js on lines 1148..1156

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

    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 set opacity on mousedown", function () {
                        testMousedown({
                            item:      "$opacitySlider",
                            clickAt:   [0, 0.75], // x: unused, y: 1.0 - opacity
                            param:     "a",
    Severity: Major
    Found in src/extensions/default/InlineColorEditor/unittests.js and 3 other locations - About 50 mins to fix
    src/extensions/default/InlineColorEditor/unittests.js on lines 636..644
    src/extensions/default/InlineColorEditor/unittests.js on lines 675..683
    src/extensions/default/InlineColorEditor/unittests.js on lines 714..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 51.

    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 set saturation on mousedown", function () {
                        testMousedown({
                            item:      "$selection",
                            clickAt:   [0.25, 0], // x: saturation, y: 1.0 - value
                            param:     "s",
    Severity: Major
    Found in src/extensions/default/InlineColorEditor/unittests.js and 3 other locations - About 50 mins to fix
    src/extensions/default/InlineColorEditor/unittests.js on lines 675..683
    src/extensions/default/InlineColorEditor/unittests.js on lines 714..722
    src/extensions/default/InlineColorEditor/unittests.js on lines 753..761

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

    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 set value on mousedown", function () {
                        testMousedown({
                            item:      "$selection",
                            clickAt:   [1.0, 0.75], // x: saturation, y: 1.0 - value
                            param:     "v",
    Severity: Major
    Found in src/extensions/default/InlineColorEditor/unittests.js and 3 other locations - About 50 mins to fix
    src/extensions/default/InlineColorEditor/unittests.js on lines 636..644
    src/extensions/default/InlineColorEditor/unittests.js on lines 714..722
    src/extensions/default/InlineColorEditor/unittests.js on lines 753..761

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

    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 set hue on mousedown", function () {
                        testMousedown({
                            item:      "$hueSlider",
                            clickAt:   [0, 0.75], // x: unused, y: 1.0 - (hue / 360)
                            param:     "h",
    Severity: Major
    Found in src/extensions/default/InlineColorEditor/unittests.js and 3 other locations - About 50 mins to fix
    src/extensions/default/InlineColorEditor/unittests.js on lines 636..644
    src/extensions/default/InlineColorEditor/unittests.js on lines 675..683
    src/extensions/default/InlineColorEditor/unittests.js on lines 753..761

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

    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 increase value by 1.5% on up arrow", function () {
                        testKey({
                            item:      "$selectionBase",
                            key:       KeyEvent.DOM_VK_UP,
                            param:     "v",
    Severity: Major
    Found in src/extensions/default/InlineColorEditor/unittests.js and 3 other locations - About 45 mins to fix
    src/extensions/default/InlineColorEditor/unittests.js on lines 868..876
    src/extensions/default/InlineColorEditor/unittests.js on lines 1028..1036
    src/extensions/default/InlineColorEditor/unittests.js on lines 1108..1116

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

    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 increase hue by 3.6 on up arrow", function () {
                        testKey({
                            item:      "$hueBase",
                            key:       KeyEvent.DOM_VK_UP,
                            param:     "h",
    Severity: Major
    Found in src/extensions/default/InlineColorEditor/unittests.js and 3 other locations - About 45 mins to fix
    src/extensions/default/InlineColorEditor/unittests.js on lines 868..876
    src/extensions/default/InlineColorEditor/unittests.js on lines 948..956
    src/extensions/default/InlineColorEditor/unittests.js on lines 1108..1116

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

    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 increase opacity by 0.01 on up arrow", function () {
                        testKey({
                            item:      "$opacitySelector",
                            key:       KeyEvent.DOM_VK_UP,
                            param:     "a",
    Severity: Major
    Found in src/extensions/default/InlineColorEditor/unittests.js and 3 other locations - About 45 mins to fix
    src/extensions/default/InlineColorEditor/unittests.js on lines 868..876
    src/extensions/default/InlineColorEditor/unittests.js on lines 948..956
    src/extensions/default/InlineColorEditor/unittests.js on lines 1028..1036

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

    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 increase saturation by 1.5% on right arrow", function () {
                        testKey({
                            item:      "$selectionBase",
                            key:       KeyEvent.DOM_VK_RIGHT,
                            param:     "s",
    Severity: Major
    Found in src/extensions/default/InlineColorEditor/unittests.js and 3 other locations - About 45 mins to fix
    src/extensions/default/InlineColorEditor/unittests.js on lines 948..956
    src/extensions/default/InlineColorEditor/unittests.js on lines 1028..1036
    src/extensions/default/InlineColorEditor/unittests.js on lines 1108..1116

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

    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

                beforeEach(function () {
                    var mock = SpecRunnerUtils.createMockEditor(testContentCSS, "css");
                    testDocument = mock.doc;
                    testEditor = mock.editor;
                });
    Severity: Major
    Found in src/extensions/default/InlineColorEditor/unittests.js and 2 other locations - About 45 mins to fix
    src/extensions/default/InlineColorEditor/unittests.js on lines 325..329
    src/extensions/default/InlineTimingFunctionEditor/unittests.js on lines 435..439

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

    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

                beforeEach(function () {
                    var mock = SpecRunnerUtils.createMockEditor(testContentHTML, "html");
                    testDocument = mock.doc;
                    testEditor = mock.editor;
                });
    Severity: Major
    Found in src/extensions/default/InlineColorEditor/unittests.js and 2 other locations - About 45 mins to fix
    src/extensions/default/InlineColorEditor/unittests.js on lines 118..122
    src/extensions/default/InlineTimingFunctionEditor/unittests.js on lines 435..439

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

    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

                            checkNear(tinycolor(colorEditor.$hueBase.css("background-color")).toHsv().h, tinycolor(colorStr).toHsv().h);
    Severity: Minor
    Found in src/extensions/default/InlineColorEditor/unittests.js and 1 other location - About 45 mins to fix
    src/extensions/default/InlineColorEditor/unittests.js on lines 458..458

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

    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

                            checkNear(tinycolor(colorEditor.$selection.css("background-color")).toHsv().h, tinycolor(colorStr).toHsv().h);
    Severity: Minor
    Found in src/extensions/default/InlineColorEditor/unittests.js and 1 other location - About 45 mins to fix
    src/extensions/default/InlineColorEditor/unittests.js on lines 459..459

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

    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

                        testDrag({
                            item:      "$opacitySlider",
                            clickAt:   [0, 0.75], // x: unused, y: 1.0 - opacity
                            dragTo:    [0, -0.25],
                            param:     "a",
    Severity: Minor
    Found in src/extensions/default/InlineColorEditor/unittests.js and 1 other location - About 35 mins to fix
    src/extensions/default/InlineColorEditor/unittests.js on lines 744..751

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

    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

                        testDrag({
                            item:      "$hueSlider",
                            clickAt:   [0, 0.75], // x: unused, y: 1.0 - (hue / 360)
                            dragTo:    [0, -0.25],
                            param:     "h",
    Severity: Minor
    Found in src/extensions/default/InlineColorEditor/unittests.js and 1 other location - About 35 mins to fix
    src/extensions/default/InlineColorEditor/unittests.js on lines 784..791

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

    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

                    function makeKeyEvent(opts) {
                        return $.Event("keydown", { keyCode: opts.key, shiftKey: !!opts.shift });
                    }
    Severity: Minor
    Found in src/extensions/default/InlineColorEditor/unittests.js and 1 other location - About 35 mins to fix
    src/extensions/default/InlineTimingFunctionEditor/unittests.js on lines 727..729

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

    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

    There are no issues that match your filters.

    Category
    Status