rubycentral/cfp-app

View on GitHub
app/assets/javascripts/palette.js

Summary

Maintainability
F
3 wks
Test Coverage

Function palette has a Cognitive Complexity of 121 (exceeds 5 allowed). Consider refactoring.
Open

var palette = (function() {

  var proto = Array.prototype;
  var slice = function(arr, opt_begin, opt_end) {
    return proto.slice.apply(arr, proto.slice.call(arguments, 1));
Severity: Minor
Found in app/assets/javascripts/palette.js - About 2 days to fix

Cognitive Complexity

Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

A method's cognitive complexity is based on a few simple rules:

  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
  • Code is considered more complex for each "break in the linear flow of the code"
  • Code is considered more complex when "flow breaking structures are nested"

Further reading

File palette.js has 855 lines of code (exceeds 250 allowed). Consider refactoring.
Open

/** @license
 *
 *     Colour Palette Generator script.
 *     Copyright (c) 2014 Google Inc.
 *
Severity: Major
Found in app/assets/javascripts/palette.js - About 2 days to fix

    Function palette has 239 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    var palette = (function() {
    
      var proto = Array.prototype;
      var slice = function(arr, opt_begin, opt_end) {
        return proto.slice.apply(arr, proto.slice.call(arguments, 1));
    Severity: Major
    Found in app/assets/javascripts/palette.js - About 1 day to fix

      Function Scheme has 101 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

        palette.Scheme = function(name, opt_groups) {
          /**
           * A map from a number to a colour palettes with given number of colours.
           * @type {!Object<number, palette.Palette>}
           */
      Severity: Major
      Found in app/assets/javascripts/palette.js - About 4 hrs to fix

        Function self has 34 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            var self = function(number, varargs) {
              number |= 0;
              if (!number) {
                return [];
              }
        Severity: Minor
        Found in app/assets/javascripts/palette.js - About 1 hr to fix

          Function listSchemes has 26 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

            palette.listSchemes = function(name, opt_number) {
              if (!opt_number) {
                opt_number = 2;
              } else if (opt_number < 0) {
                opt_number = -opt_number;
          Severity: Minor
          Found in app/assets/javascripts/palette.js - About 1 hr to fix

            Function withColorFunction has 5 arguments (exceeds 4 allowed). Consider refactoring.
            Open

              palette.Scheme.withColorFunction = function(name, groups,
                                                          func, opt_is_cbf, opt_cyclic) {
            Severity: Minor
            Found in app/assets/javascripts/palette.js - About 35 mins to fix

              Function fromPalettes has 5 arguments (exceeds 4 allowed). Consider refactoring.
              Open

                palette.Scheme.fromPalettes = function(name, groups,
                                                       palettes, opt_max, opt_cbf_max) {
              Severity: Minor
              Found in app/assets/javascripts/palette.js - About 35 mins to fix

                Function generate has 5 arguments (exceeds 4 allowed). Consider refactoring.
                Open

                  palette.generate = function(color_func, number, opt_start, opt_end,
                                              opt_cyclic) {
                Severity: Minor
                Found in app/assets/javascripts/palette.js - About 35 mins to fix

                  Avoid too many return statements within this function.
                  Open

                          return null;
                  Severity: Major
                  Found in app/assets/javascripts/palette.js - About 30 mins to fix

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

                        Set3: {
                          type: 'qualitative',
                          cbf: 0,
                          3: ['8dd3c7', 'ffffb3', 'bebada'],
                          4: ['8dd3c7', 'ffffb3', 'bebada', 'fb8072'],
                    Severity: Major
                    Found in app/assets/javascripts/palette.js and 1 other location - About 5 hrs to fix
                    app/assets/javascripts/palette.js on lines 1374..1393

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

                    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

                        Paired: {
                          type: 'qualitative',
                          cbf: 4,
                          3: ['a6cee3', '1f78b4', 'b2df8a'],
                          4: ['a6cee3', '1f78b4', 'b2df8a', '33a02c'],
                    Severity: Major
                    Found in app/assets/javascripts/palette.js and 1 other location - About 5 hrs to fix
                    app/assets/javascripts/palette.js on lines 1446..1465

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

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

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

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

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

                    Refactorings

                    Further Reading

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

                        BrBG: {
                          type: 'diverging',
                          cbf: 42,
                          3: ['d8b365', 'f5f5f5', '5ab4ac'],
                          4: ['a6611a', 'dfc27d', '80cdc1', '018571'],
                    Severity: Major
                    Found in app/assets/javascripts/palette.js and 8 other locations - About 4 hrs to fix
                    app/assets/javascripts/palette.js on lines 1188..1205
                    app/assets/javascripts/palette.js on lines 1224..1241
                    app/assets/javascripts/palette.js on lines 1242..1259
                    app/assets/javascripts/palette.js on lines 1260..1277
                    app/assets/javascripts/palette.js on lines 1278..1295
                    app/assets/javascripts/palette.js on lines 1296..1313
                    app/assets/javascripts/palette.js on lines 1314..1331
                    app/assets/javascripts/palette.js on lines 1332..1349

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

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

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

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

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

                    Refactorings

                    Further Reading

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

                        RdBu: {
                          type: 'diverging',
                          cbf: 42,
                          3: ['ef8a62', 'f7f7f7', '67a9cf'],
                          4: ['ca0020', 'f4a582', '92c5de', '0571b0'],
                    Severity: Major
                    Found in app/assets/javascripts/palette.js and 8 other locations - About 4 hrs to fix
                    app/assets/javascripts/palette.js on lines 1188..1205
                    app/assets/javascripts/palette.js on lines 1206..1223
                    app/assets/javascripts/palette.js on lines 1224..1241
                    app/assets/javascripts/palette.js on lines 1242..1259
                    app/assets/javascripts/palette.js on lines 1278..1295
                    app/assets/javascripts/palette.js on lines 1296..1313
                    app/assets/javascripts/palette.js on lines 1314..1331
                    app/assets/javascripts/palette.js on lines 1332..1349

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

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

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

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

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

                    Refactorings

                    Further Reading

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

                        RdYlGn: {
                          type: 'diverging',
                          cbf: 0,
                          3: ['fc8d59', 'ffffbf', '91cf60'],
                          4: ['d7191c', 'fdae61', 'a6d96a', '1a9641'],
                    Severity: Major
                    Found in app/assets/javascripts/palette.js and 8 other locations - About 4 hrs to fix
                    app/assets/javascripts/palette.js on lines 1188..1205
                    app/assets/javascripts/palette.js on lines 1206..1223
                    app/assets/javascripts/palette.js on lines 1224..1241
                    app/assets/javascripts/palette.js on lines 1242..1259
                    app/assets/javascripts/palette.js on lines 1260..1277
                    app/assets/javascripts/palette.js on lines 1278..1295
                    app/assets/javascripts/palette.js on lines 1296..1313
                    app/assets/javascripts/palette.js on lines 1314..1331

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

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

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

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

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

                    Refactorings

                    Further Reading

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

                        PuOr: {
                          type: 'diverging',
                          cbf: 42,
                          3: ['f1a340', 'f7f7f7', '998ec3'],
                          4: ['e66101', 'fdb863', 'b2abd2', '5e3c99'],
                    Severity: Major
                    Found in app/assets/javascripts/palette.js and 8 other locations - About 4 hrs to fix
                    app/assets/javascripts/palette.js on lines 1206..1223
                    app/assets/javascripts/palette.js on lines 1224..1241
                    app/assets/javascripts/palette.js on lines 1242..1259
                    app/assets/javascripts/palette.js on lines 1260..1277
                    app/assets/javascripts/palette.js on lines 1278..1295
                    app/assets/javascripts/palette.js on lines 1296..1313
                    app/assets/javascripts/palette.js on lines 1314..1331
                    app/assets/javascripts/palette.js on lines 1332..1349

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

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

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

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

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

                    Refactorings

                    Further Reading

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

                        PiYG: {
                          type: 'diverging',
                          cbf: 42,
                          3: ['e9a3c9', 'f7f7f7', 'a1d76a'],
                          4: ['d01c8b', 'f1b6da', 'b8e186', '4dac26'],
                    Severity: Major
                    Found in app/assets/javascripts/palette.js and 8 other locations - About 4 hrs to fix
                    app/assets/javascripts/palette.js on lines 1188..1205
                    app/assets/javascripts/palette.js on lines 1206..1223
                    app/assets/javascripts/palette.js on lines 1224..1241
                    app/assets/javascripts/palette.js on lines 1260..1277
                    app/assets/javascripts/palette.js on lines 1278..1295
                    app/assets/javascripts/palette.js on lines 1296..1313
                    app/assets/javascripts/palette.js on lines 1314..1331
                    app/assets/javascripts/palette.js on lines 1332..1349

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

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

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

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

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

                    Refactorings

                    Further Reading

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

                        RdYlBu: {
                          type: 'diverging',
                          cbf: 42,
                          3: ['fc8d59', 'ffffbf', '91bfdb'],
                          4: ['d7191c', 'fdae61', 'abd9e9', '2c7bb6'],
                    Severity: Major
                    Found in app/assets/javascripts/palette.js and 8 other locations - About 4 hrs to fix
                    app/assets/javascripts/palette.js on lines 1188..1205
                    app/assets/javascripts/palette.js on lines 1206..1223
                    app/assets/javascripts/palette.js on lines 1224..1241
                    app/assets/javascripts/palette.js on lines 1242..1259
                    app/assets/javascripts/palette.js on lines 1260..1277
                    app/assets/javascripts/palette.js on lines 1278..1295
                    app/assets/javascripts/palette.js on lines 1314..1331
                    app/assets/javascripts/palette.js on lines 1332..1349

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

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

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

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

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

                    Refactorings

                    Further Reading

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

                        PRGn: {
                          type: 'diverging',
                          cbf: 42,
                          3: ['af8dc3', 'f7f7f7', '7fbf7b'],
                          4: ['7b3294', 'c2a5cf', 'a6dba0', '008837'],
                    Severity: Major
                    Found in app/assets/javascripts/palette.js and 8 other locations - About 4 hrs to fix
                    app/assets/javascripts/palette.js on lines 1188..1205
                    app/assets/javascripts/palette.js on lines 1206..1223
                    app/assets/javascripts/palette.js on lines 1242..1259
                    app/assets/javascripts/palette.js on lines 1260..1277
                    app/assets/javascripts/palette.js on lines 1278..1295
                    app/assets/javascripts/palette.js on lines 1296..1313
                    app/assets/javascripts/palette.js on lines 1314..1331
                    app/assets/javascripts/palette.js on lines 1332..1349

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

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

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

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

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

                    Refactorings

                    Further Reading

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

                        Spectral: {
                          type: 'diverging',
                          cbf: 0,
                          3: ['fc8d59', 'ffffbf', '99d594'],
                          4: ['d7191c', 'fdae61', 'abdda4', '2b83ba'],
                    Severity: Major
                    Found in app/assets/javascripts/palette.js and 8 other locations - About 4 hrs to fix
                    app/assets/javascripts/palette.js on lines 1188..1205
                    app/assets/javascripts/palette.js on lines 1206..1223
                    app/assets/javascripts/palette.js on lines 1224..1241
                    app/assets/javascripts/palette.js on lines 1242..1259
                    app/assets/javascripts/palette.js on lines 1260..1277
                    app/assets/javascripts/palette.js on lines 1278..1295
                    app/assets/javascripts/palette.js on lines 1296..1313
                    app/assets/javascripts/palette.js on lines 1332..1349

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

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

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

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

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

                    Refactorings

                    Further Reading

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

                        RdGy: {
                          type: 'diverging',
                          cbf: 42,
                          3: ['ef8a62', 'ffffff', '999999'],
                          4: ['ca0020', 'f4a582', 'bababa', '404040'],
                    Severity: Major
                    Found in app/assets/javascripts/palette.js and 8 other locations - About 4 hrs to fix
                    app/assets/javascripts/palette.js on lines 1188..1205
                    app/assets/javascripts/palette.js on lines 1206..1223
                    app/assets/javascripts/palette.js on lines 1224..1241
                    app/assets/javascripts/palette.js on lines 1242..1259
                    app/assets/javascripts/palette.js on lines 1260..1277
                    app/assets/javascripts/palette.js on lines 1296..1313
                    app/assets/javascripts/palette.js on lines 1314..1331
                    app/assets/javascripts/palette.js on lines 1332..1349

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

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

                        YlOrRd: {
                          type: 'sequential',
                          cbf: 42,
                          3: ['ffeda0', 'feb24c', 'f03b20'],
                          4: ['ffffb2', 'fecc5c', 'fd8d3c', 'e31a1c'],
                    Severity: Major
                    Found in app/assets/javascripts/palette.js and 19 other locations - About 3 hrs to fix
                    app/assets/javascripts/palette.js on lines 936..949
                    app/assets/javascripts/palette.js on lines 950..963
                    app/assets/javascripts/palette.js on lines 964..977
                    app/assets/javascripts/palette.js on lines 978..991
                    app/assets/javascripts/palette.js on lines 992..1005
                    app/assets/javascripts/palette.js on lines 1006..1019
                    app/assets/javascripts/palette.js on lines 1020..1033
                    app/assets/javascripts/palette.js on lines 1034..1047
                    app/assets/javascripts/palette.js on lines 1048..1061
                    app/assets/javascripts/palette.js on lines 1062..1075
                    app/assets/javascripts/palette.js on lines 1090..1103
                    app/assets/javascripts/palette.js on lines 1104..1117
                    app/assets/javascripts/palette.js on lines 1118..1131
                    app/assets/javascripts/palette.js on lines 1132..1145
                    app/assets/javascripts/palette.js on lines 1146..1159
                    app/assets/javascripts/palette.js on lines 1160..1173
                    app/assets/javascripts/palette.js on lines 1174..1187
                    app/assets/javascripts/palette.js on lines 1394..1407
                    app/assets/javascripts/palette.js on lines 1420..1433

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

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

                        YlGnBu: {
                          type: 'sequential',
                          cbf: 42,
                          3: ['edf8b1', '7fcdbb', '2c7fb8'],
                          4: ['ffffcc', 'a1dab4', '41b6c4', '225ea8'],
                    Severity: Major
                    Found in app/assets/javascripts/palette.js and 19 other locations - About 3 hrs to fix
                    app/assets/javascripts/palette.js on lines 936..949
                    app/assets/javascripts/palette.js on lines 964..977
                    app/assets/javascripts/palette.js on lines 978..991
                    app/assets/javascripts/palette.js on lines 992..1005
                    app/assets/javascripts/palette.js on lines 1006..1019
                    app/assets/javascripts/palette.js on lines 1020..1033
                    app/assets/javascripts/palette.js on lines 1034..1047
                    app/assets/javascripts/palette.js on lines 1048..1061
                    app/assets/javascripts/palette.js on lines 1062..1075
                    app/assets/javascripts/palette.js on lines 1076..1089
                    app/assets/javascripts/palette.js on lines 1090..1103
                    app/assets/javascripts/palette.js on lines 1104..1117
                    app/assets/javascripts/palette.js on lines 1118..1131
                    app/assets/javascripts/palette.js on lines 1132..1145
                    app/assets/javascripts/palette.js on lines 1146..1159
                    app/assets/javascripts/palette.js on lines 1160..1173
                    app/assets/javascripts/palette.js on lines 1174..1187
                    app/assets/javascripts/palette.js on lines 1394..1407
                    app/assets/javascripts/palette.js on lines 1420..1433

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

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

                        Greens: {
                          type: 'sequential',
                          cbf: 42,
                          3: ['e5f5e0', 'a1d99b', '31a354'],
                          4: ['edf8e9', 'bae4b3', '74c476', '238b45'],
                    Severity: Major
                    Found in app/assets/javascripts/palette.js and 19 other locations - About 3 hrs to fix
                    app/assets/javascripts/palette.js on lines 936..949
                    app/assets/javascripts/palette.js on lines 950..963
                    app/assets/javascripts/palette.js on lines 964..977
                    app/assets/javascripts/palette.js on lines 978..991
                    app/assets/javascripts/palette.js on lines 992..1005
                    app/assets/javascripts/palette.js on lines 1006..1019
                    app/assets/javascripts/palette.js on lines 1020..1033
                    app/assets/javascripts/palette.js on lines 1034..1047
                    app/assets/javascripts/palette.js on lines 1048..1061
                    app/assets/javascripts/palette.js on lines 1062..1075
                    app/assets/javascripts/palette.js on lines 1076..1089
                    app/assets/javascripts/palette.js on lines 1090..1103
                    app/assets/javascripts/palette.js on lines 1104..1117
                    app/assets/javascripts/palette.js on lines 1118..1131
                    app/assets/javascripts/palette.js on lines 1146..1159
                    app/assets/javascripts/palette.js on lines 1160..1173
                    app/assets/javascripts/palette.js on lines 1174..1187
                    app/assets/javascripts/palette.js on lines 1394..1407
                    app/assets/javascripts/palette.js on lines 1420..1433

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

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

                        BuPu: {
                          type: 'sequential',
                          cbf: 42,
                          3: ['e0ecf4', '9ebcda', '8856a7'],
                          4: ['edf8fb', 'b3cde3', '8c96c6', '88419d'],
                    Severity: Major
                    Found in app/assets/javascripts/palette.js and 19 other locations - About 3 hrs to fix
                    app/assets/javascripts/palette.js on lines 936..949
                    app/assets/javascripts/palette.js on lines 950..963
                    app/assets/javascripts/palette.js on lines 964..977
                    app/assets/javascripts/palette.js on lines 978..991
                    app/assets/javascripts/palette.js on lines 992..1005
                    app/assets/javascripts/palette.js on lines 1006..1019
                    app/assets/javascripts/palette.js on lines 1034..1047
                    app/assets/javascripts/palette.js on lines 1048..1061
                    app/assets/javascripts/palette.js on lines 1062..1075
                    app/assets/javascripts/palette.js on lines 1076..1089
                    app/assets/javascripts/palette.js on lines 1090..1103
                    app/assets/javascripts/palette.js on lines 1104..1117
                    app/assets/javascripts/palette.js on lines 1118..1131
                    app/assets/javascripts/palette.js on lines 1132..1145
                    app/assets/javascripts/palette.js on lines 1146..1159
                    app/assets/javascripts/palette.js on lines 1160..1173
                    app/assets/javascripts/palette.js on lines 1174..1187
                    app/assets/javascripts/palette.js on lines 1394..1407
                    app/assets/javascripts/palette.js on lines 1420..1433

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

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

                        OrRd: {
                          type: 'sequential',
                          cbf: 42,
                          3: ['fee8c8', 'fdbb84', 'e34a33'],
                          4: ['fef0d9', 'fdcc8a', 'fc8d59', 'd7301f'],
                    Severity: Major
                    Found in app/assets/javascripts/palette.js and 19 other locations - About 3 hrs to fix
                    app/assets/javascripts/palette.js on lines 936..949
                    app/assets/javascripts/palette.js on lines 950..963
                    app/assets/javascripts/palette.js on lines 964..977
                    app/assets/javascripts/palette.js on lines 978..991
                    app/assets/javascripts/palette.js on lines 992..1005
                    app/assets/javascripts/palette.js on lines 1006..1019
                    app/assets/javascripts/palette.js on lines 1020..1033
                    app/assets/javascripts/palette.js on lines 1034..1047
                    app/assets/javascripts/palette.js on lines 1048..1061
                    app/assets/javascripts/palette.js on lines 1076..1089
                    app/assets/javascripts/palette.js on lines 1090..1103
                    app/assets/javascripts/palette.js on lines 1104..1117
                    app/assets/javascripts/palette.js on lines 1118..1131
                    app/assets/javascripts/palette.js on lines 1132..1145
                    app/assets/javascripts/palette.js on lines 1146..1159
                    app/assets/javascripts/palette.js on lines 1160..1173
                    app/assets/javascripts/palette.js on lines 1174..1187
                    app/assets/javascripts/palette.js on lines 1394..1407
                    app/assets/javascripts/palette.js on lines 1420..1433

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

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

                        Oranges: {
                          type: 'sequential',
                          cbf: 42,
                          3: ['fee6ce', 'fdae6b', 'e6550d'],
                          4: ['feedde', 'fdbe85', 'fd8d3c', 'd94701'],
                    Severity: Major
                    Found in app/assets/javascripts/palette.js and 19 other locations - About 3 hrs to fix
                    app/assets/javascripts/palette.js on lines 936..949
                    app/assets/javascripts/palette.js on lines 950..963
                    app/assets/javascripts/palette.js on lines 964..977
                    app/assets/javascripts/palette.js on lines 978..991
                    app/assets/javascripts/palette.js on lines 992..1005
                    app/assets/javascripts/palette.js on lines 1006..1019
                    app/assets/javascripts/palette.js on lines 1020..1033
                    app/assets/javascripts/palette.js on lines 1034..1047
                    app/assets/javascripts/palette.js on lines 1048..1061
                    app/assets/javascripts/palette.js on lines 1062..1075
                    app/assets/javascripts/palette.js on lines 1076..1089
                    app/assets/javascripts/palette.js on lines 1090..1103
                    app/assets/javascripts/palette.js on lines 1104..1117
                    app/assets/javascripts/palette.js on lines 1118..1131
                    app/assets/javascripts/palette.js on lines 1132..1145
                    app/assets/javascripts/palette.js on lines 1160..1173
                    app/assets/javascripts/palette.js on lines 1174..1187
                    app/assets/javascripts/palette.js on lines 1394..1407
                    app/assets/javascripts/palette.js on lines 1420..1433

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

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

                        Pastel1: {
                          type: 'qualitative',
                          cbf: 0,
                          3: ['fbb4ae', 'b3cde3', 'ccebc5'],
                          4: ['fbb4ae', 'b3cde3', 'ccebc5', 'decbe4'],
                    Severity: Major
                    Found in app/assets/javascripts/palette.js and 19 other locations - About 3 hrs to fix
                    app/assets/javascripts/palette.js on lines 936..949
                    app/assets/javascripts/palette.js on lines 950..963
                    app/assets/javascripts/palette.js on lines 964..977
                    app/assets/javascripts/palette.js on lines 978..991
                    app/assets/javascripts/palette.js on lines 992..1005
                    app/assets/javascripts/palette.js on lines 1006..1019
                    app/assets/javascripts/palette.js on lines 1020..1033
                    app/assets/javascripts/palette.js on lines 1034..1047
                    app/assets/javascripts/palette.js on lines 1048..1061
                    app/assets/javascripts/palette.js on lines 1062..1075
                    app/assets/javascripts/palette.js on lines 1076..1089
                    app/assets/javascripts/palette.js on lines 1090..1103
                    app/assets/javascripts/palette.js on lines 1104..1117
                    app/assets/javascripts/palette.js on lines 1118..1131
                    app/assets/javascripts/palette.js on lines 1132..1145
                    app/assets/javascripts/palette.js on lines 1146..1159
                    app/assets/javascripts/palette.js on lines 1160..1173
                    app/assets/javascripts/palette.js on lines 1174..1187
                    app/assets/javascripts/palette.js on lines 1420..1433

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

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

                        PuBuGn: {
                          type: 'sequential',
                          cbf: 42,
                          3: ['ece2f0', 'a6bddb', '1c9099'],
                          4: ['f6eff7', 'bdc9e1', '67a9cf', '02818a'],
                    Severity: Major
                    Found in app/assets/javascripts/palette.js and 19 other locations - About 3 hrs to fix
                    app/assets/javascripts/palette.js on lines 936..949
                    app/assets/javascripts/palette.js on lines 950..963
                    app/assets/javascripts/palette.js on lines 964..977
                    app/assets/javascripts/palette.js on lines 978..991
                    app/assets/javascripts/palette.js on lines 1006..1019
                    app/assets/javascripts/palette.js on lines 1020..1033
                    app/assets/javascripts/palette.js on lines 1034..1047
                    app/assets/javascripts/palette.js on lines 1048..1061
                    app/assets/javascripts/palette.js on lines 1062..1075
                    app/assets/javascripts/palette.js on lines 1076..1089
                    app/assets/javascripts/palette.js on lines 1090..1103
                    app/assets/javascripts/palette.js on lines 1104..1117
                    app/assets/javascripts/palette.js on lines 1118..1131
                    app/assets/javascripts/palette.js on lines 1132..1145
                    app/assets/javascripts/palette.js on lines 1146..1159
                    app/assets/javascripts/palette.js on lines 1160..1173
                    app/assets/javascripts/palette.js on lines 1174..1187
                    app/assets/javascripts/palette.js on lines 1394..1407
                    app/assets/javascripts/palette.js on lines 1420..1433

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

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

                        Set1: {
                          type: 'qualitative',
                          cbf: 0,
                          3: ['e41a1c', '377eb8', '4daf4a'],
                          4: ['e41a1c', '377eb8', '4daf4a', '984ea3'],
                    Severity: Major
                    Found in app/assets/javascripts/palette.js and 19 other locations - About 3 hrs to fix
                    app/assets/javascripts/palette.js on lines 936..949
                    app/assets/javascripts/palette.js on lines 950..963
                    app/assets/javascripts/palette.js on lines 964..977
                    app/assets/javascripts/palette.js on lines 978..991
                    app/assets/javascripts/palette.js on lines 992..1005
                    app/assets/javascripts/palette.js on lines 1006..1019
                    app/assets/javascripts/palette.js on lines 1020..1033
                    app/assets/javascripts/palette.js on lines 1034..1047
                    app/assets/javascripts/palette.js on lines 1048..1061
                    app/assets/javascripts/palette.js on lines 1062..1075
                    app/assets/javascripts/palette.js on lines 1076..1089
                    app/assets/javascripts/palette.js on lines 1090..1103
                    app/assets/javascripts/palette.js on lines 1104..1117
                    app/assets/javascripts/palette.js on lines 1118..1131
                    app/assets/javascripts/palette.js on lines 1132..1145
                    app/assets/javascripts/palette.js on lines 1146..1159
                    app/assets/javascripts/palette.js on lines 1160..1173
                    app/assets/javascripts/palette.js on lines 1174..1187
                    app/assets/javascripts/palette.js on lines 1394..1407

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

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

                        PuBu: {
                          type: 'sequential',
                          cbf: 42,
                          3: ['ece7f2', 'a6bddb', '2b8cbe'],
                          4: ['f1eef6', 'bdc9e1', '74a9cf', '0570b0'],
                    Severity: Major
                    Found in app/assets/javascripts/palette.js and 19 other locations - About 3 hrs to fix
                    app/assets/javascripts/palette.js on lines 936..949
                    app/assets/javascripts/palette.js on lines 950..963
                    app/assets/javascripts/palette.js on lines 964..977
                    app/assets/javascripts/palette.js on lines 978..991
                    app/assets/javascripts/palette.js on lines 992..1005
                    app/assets/javascripts/palette.js on lines 1020..1033
                    app/assets/javascripts/palette.js on lines 1034..1047
                    app/assets/javascripts/palette.js on lines 1048..1061
                    app/assets/javascripts/palette.js on lines 1062..1075
                    app/assets/javascripts/palette.js on lines 1076..1089
                    app/assets/javascripts/palette.js on lines 1090..1103
                    app/assets/javascripts/palette.js on lines 1104..1117
                    app/assets/javascripts/palette.js on lines 1118..1131
                    app/assets/javascripts/palette.js on lines 1132..1145
                    app/assets/javascripts/palette.js on lines 1146..1159
                    app/assets/javascripts/palette.js on lines 1160..1173
                    app/assets/javascripts/palette.js on lines 1174..1187
                    app/assets/javascripts/palette.js on lines 1394..1407
                    app/assets/javascripts/palette.js on lines 1420..1433

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

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

                        Purples: {
                          type: 'sequential',
                          cbf: 42,
                          3: ['efedf5', 'bcbddc', '756bb1'],
                          4: ['f2f0f7', 'cbc9e2', '9e9ac8', '6a51a3'],
                    Severity: Major
                    Found in app/assets/javascripts/palette.js and 19 other locations - About 3 hrs to fix
                    app/assets/javascripts/palette.js on lines 936..949
                    app/assets/javascripts/palette.js on lines 950..963
                    app/assets/javascripts/palette.js on lines 964..977
                    app/assets/javascripts/palette.js on lines 978..991
                    app/assets/javascripts/palette.js on lines 992..1005
                    app/assets/javascripts/palette.js on lines 1006..1019
                    app/assets/javascripts/palette.js on lines 1020..1033
                    app/assets/javascripts/palette.js on lines 1034..1047
                    app/assets/javascripts/palette.js on lines 1048..1061
                    app/assets/javascripts/palette.js on lines 1062..1075
                    app/assets/javascripts/palette.js on lines 1076..1089
                    app/assets/javascripts/palette.js on lines 1090..1103
                    app/assets/javascripts/palette.js on lines 1118..1131
                    app/assets/javascripts/palette.js on lines 1132..1145
                    app/assets/javascripts/palette.js on lines 1146..1159
                    app/assets/javascripts/palette.js on lines 1160..1173
                    app/assets/javascripts/palette.js on lines 1174..1187
                    app/assets/javascripts/palette.js on lines 1394..1407
                    app/assets/javascripts/palette.js on lines 1420..1433

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

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

                        PuRd: {
                          type: 'sequential',
                          cbf: 42,
                          3: ['e7e1ef', 'c994c7', 'dd1c77'],
                          4: ['f1eef6', 'd7b5d8', 'df65b0', 'ce1256'],
                    Severity: Major
                    Found in app/assets/javascripts/palette.js and 19 other locations - About 3 hrs to fix
                    app/assets/javascripts/palette.js on lines 936..949
                    app/assets/javascripts/palette.js on lines 950..963
                    app/assets/javascripts/palette.js on lines 964..977
                    app/assets/javascripts/palette.js on lines 978..991
                    app/assets/javascripts/palette.js on lines 992..1005
                    app/assets/javascripts/palette.js on lines 1006..1019
                    app/assets/javascripts/palette.js on lines 1020..1033
                    app/assets/javascripts/palette.js on lines 1034..1047
                    app/assets/javascripts/palette.js on lines 1062..1075
                    app/assets/javascripts/palette.js on lines 1076..1089
                    app/assets/javascripts/palette.js on lines 1090..1103
                    app/assets/javascripts/palette.js on lines 1104..1117
                    app/assets/javascripts/palette.js on lines 1118..1131
                    app/assets/javascripts/palette.js on lines 1132..1145
                    app/assets/javascripts/palette.js on lines 1146..1159
                    app/assets/javascripts/palette.js on lines 1160..1173
                    app/assets/javascripts/palette.js on lines 1174..1187
                    app/assets/javascripts/palette.js on lines 1394..1407
                    app/assets/javascripts/palette.js on lines 1420..1433

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

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

                        Reds: {
                          type: 'sequential',
                          cbf: 42,
                          3: ['fee0d2', 'fc9272', 'de2d26'],
                          4: ['fee5d9', 'fcae91', 'fb6a4a', 'cb181d'],
                    Severity: Major
                    Found in app/assets/javascripts/palette.js and 19 other locations - About 3 hrs to fix
                    app/assets/javascripts/palette.js on lines 936..949
                    app/assets/javascripts/palette.js on lines 950..963
                    app/assets/javascripts/palette.js on lines 964..977
                    app/assets/javascripts/palette.js on lines 978..991
                    app/assets/javascripts/palette.js on lines 992..1005
                    app/assets/javascripts/palette.js on lines 1006..1019
                    app/assets/javascripts/palette.js on lines 1020..1033
                    app/assets/javascripts/palette.js on lines 1034..1047
                    app/assets/javascripts/palette.js on lines 1048..1061
                    app/assets/javascripts/palette.js on lines 1062..1075
                    app/assets/javascripts/palette.js on lines 1076..1089
                    app/assets/javascripts/palette.js on lines 1090..1103
                    app/assets/javascripts/palette.js on lines 1104..1117
                    app/assets/javascripts/palette.js on lines 1118..1131
                    app/assets/javascripts/palette.js on lines 1132..1145
                    app/assets/javascripts/palette.js on lines 1146..1159
                    app/assets/javascripts/palette.js on lines 1174..1187
                    app/assets/javascripts/palette.js on lines 1394..1407
                    app/assets/javascripts/palette.js on lines 1420..1433

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

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

                        BuGn: {
                          type: 'sequential',
                          cbf: 42,
                          3: ['e5f5f9', '99d8c9', '2ca25f'],
                          4: ['edf8fb', 'b2e2e2', '66c2a4', '238b45'],
                    Severity: Major
                    Found in app/assets/javascripts/palette.js and 19 other locations - About 3 hrs to fix
                    app/assets/javascripts/palette.js on lines 936..949
                    app/assets/javascripts/palette.js on lines 950..963
                    app/assets/javascripts/palette.js on lines 964..977
                    app/assets/javascripts/palette.js on lines 992..1005
                    app/assets/javascripts/palette.js on lines 1006..1019
                    app/assets/javascripts/palette.js on lines 1020..1033
                    app/assets/javascripts/palette.js on lines 1034..1047
                    app/assets/javascripts/palette.js on lines 1048..1061
                    app/assets/javascripts/palette.js on lines 1062..1075
                    app/assets/javascripts/palette.js on lines 1076..1089
                    app/assets/javascripts/palette.js on lines 1090..1103
                    app/assets/javascripts/palette.js on lines 1104..1117
                    app/assets/javascripts/palette.js on lines 1118..1131
                    app/assets/javascripts/palette.js on lines 1132..1145
                    app/assets/javascripts/palette.js on lines 1146..1159
                    app/assets/javascripts/palette.js on lines 1160..1173
                    app/assets/javascripts/palette.js on lines 1174..1187
                    app/assets/javascripts/palette.js on lines 1394..1407
                    app/assets/javascripts/palette.js on lines 1420..1433

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

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

                        GnBu: {
                          type: 'sequential',
                          cbf: 42,
                          3: ['e0f3db', 'a8ddb5', '43a2ca'],
                          4: ['f0f9e8', 'bae4bc', '7bccc4', '2b8cbe'],
                    Severity: Major
                    Found in app/assets/javascripts/palette.js and 19 other locations - About 3 hrs to fix
                    app/assets/javascripts/palette.js on lines 936..949
                    app/assets/javascripts/palette.js on lines 950..963
                    app/assets/javascripts/palette.js on lines 978..991
                    app/assets/javascripts/palette.js on lines 992..1005
                    app/assets/javascripts/palette.js on lines 1006..1019
                    app/assets/javascripts/palette.js on lines 1020..1033
                    app/assets/javascripts/palette.js on lines 1034..1047
                    app/assets/javascripts/palette.js on lines 1048..1061
                    app/assets/javascripts/palette.js on lines 1062..1075
                    app/assets/javascripts/palette.js on lines 1076..1089
                    app/assets/javascripts/palette.js on lines 1090..1103
                    app/assets/javascripts/palette.js on lines 1104..1117
                    app/assets/javascripts/palette.js on lines 1118..1131
                    app/assets/javascripts/palette.js on lines 1132..1145
                    app/assets/javascripts/palette.js on lines 1146..1159
                    app/assets/javascripts/palette.js on lines 1160..1173
                    app/assets/javascripts/palette.js on lines 1174..1187
                    app/assets/javascripts/palette.js on lines 1394..1407
                    app/assets/javascripts/palette.js on lines 1420..1433

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

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

                        RdPu: {
                          type: 'sequential',
                          cbf: 42,
                          3: ['fde0dd', 'fa9fb5', 'c51b8a'],
                          4: ['feebe2', 'fbb4b9', 'f768a1', 'ae017e'],
                    Severity: Major
                    Found in app/assets/javascripts/palette.js and 19 other locations - About 3 hrs to fix
                    app/assets/javascripts/palette.js on lines 936..949
                    app/assets/javascripts/palette.js on lines 950..963
                    app/assets/javascripts/palette.js on lines 964..977
                    app/assets/javascripts/palette.js on lines 978..991
                    app/assets/javascripts/palette.js on lines 992..1005
                    app/assets/javascripts/palette.js on lines 1006..1019
                    app/assets/javascripts/palette.js on lines 1020..1033
                    app/assets/javascripts/palette.js on lines 1048..1061
                    app/assets/javascripts/palette.js on lines 1062..1075
                    app/assets/javascripts/palette.js on lines 1076..1089
                    app/assets/javascripts/palette.js on lines 1090..1103
                    app/assets/javascripts/palette.js on lines 1104..1117
                    app/assets/javascripts/palette.js on lines 1118..1131
                    app/assets/javascripts/palette.js on lines 1132..1145
                    app/assets/javascripts/palette.js on lines 1146..1159
                    app/assets/javascripts/palette.js on lines 1160..1173
                    app/assets/javascripts/palette.js on lines 1174..1187
                    app/assets/javascripts/palette.js on lines 1394..1407
                    app/assets/javascripts/palette.js on lines 1420..1433

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

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

                        YlOrBr: {
                          type: 'sequential',
                          cbf: 42,
                          3: ['fff7bc', 'fec44f', 'd95f0e'],
                          4: ['ffffd4', 'fed98e', 'fe9929', 'cc4c02'],
                    Severity: Major
                    Found in app/assets/javascripts/palette.js and 19 other locations - About 3 hrs to fix
                    app/assets/javascripts/palette.js on lines 936..949
                    app/assets/javascripts/palette.js on lines 950..963
                    app/assets/javascripts/palette.js on lines 964..977
                    app/assets/javascripts/palette.js on lines 978..991
                    app/assets/javascripts/palette.js on lines 992..1005
                    app/assets/javascripts/palette.js on lines 1006..1019
                    app/assets/javascripts/palette.js on lines 1020..1033
                    app/assets/javascripts/palette.js on lines 1034..1047
                    app/assets/javascripts/palette.js on lines 1048..1061
                    app/assets/javascripts/palette.js on lines 1062..1075
                    app/assets/javascripts/palette.js on lines 1076..1089
                    app/assets/javascripts/palette.js on lines 1104..1117
                    app/assets/javascripts/palette.js on lines 1118..1131
                    app/assets/javascripts/palette.js on lines 1132..1145
                    app/assets/javascripts/palette.js on lines 1146..1159
                    app/assets/javascripts/palette.js on lines 1160..1173
                    app/assets/javascripts/palette.js on lines 1174..1187
                    app/assets/javascripts/palette.js on lines 1394..1407
                    app/assets/javascripts/palette.js on lines 1420..1433

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

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

                        YlGn: {
                          type: 'sequential',
                          cbf: 42,
                          3: ['f7fcb9', 'addd8e', '31a354'],
                          4: ['ffffcc', 'c2e699', '78c679', '238443'],
                    Severity: Major
                    Found in app/assets/javascripts/palette.js and 19 other locations - About 3 hrs to fix
                    app/assets/javascripts/palette.js on lines 950..963
                    app/assets/javascripts/palette.js on lines 964..977
                    app/assets/javascripts/palette.js on lines 978..991
                    app/assets/javascripts/palette.js on lines 992..1005
                    app/assets/javascripts/palette.js on lines 1006..1019
                    app/assets/javascripts/palette.js on lines 1020..1033
                    app/assets/javascripts/palette.js on lines 1034..1047
                    app/assets/javascripts/palette.js on lines 1048..1061
                    app/assets/javascripts/palette.js on lines 1062..1075
                    app/assets/javascripts/palette.js on lines 1076..1089
                    app/assets/javascripts/palette.js on lines 1090..1103
                    app/assets/javascripts/palette.js on lines 1104..1117
                    app/assets/javascripts/palette.js on lines 1118..1131
                    app/assets/javascripts/palette.js on lines 1132..1145
                    app/assets/javascripts/palette.js on lines 1146..1159
                    app/assets/javascripts/palette.js on lines 1160..1173
                    app/assets/javascripts/palette.js on lines 1174..1187
                    app/assets/javascripts/palette.js on lines 1394..1407
                    app/assets/javascripts/palette.js on lines 1420..1433

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

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

                        Blues: {
                          type: 'sequential',
                          cbf: 42,
                          3: ['deebf7', '9ecae1', '3182bd'],
                          4: ['eff3ff', 'bdd7e7', '6baed6', '2171b5'],
                    Severity: Major
                    Found in app/assets/javascripts/palette.js and 19 other locations - About 3 hrs to fix
                    app/assets/javascripts/palette.js on lines 936..949
                    app/assets/javascripts/palette.js on lines 950..963
                    app/assets/javascripts/palette.js on lines 964..977
                    app/assets/javascripts/palette.js on lines 978..991
                    app/assets/javascripts/palette.js on lines 992..1005
                    app/assets/javascripts/palette.js on lines 1006..1019
                    app/assets/javascripts/palette.js on lines 1020..1033
                    app/assets/javascripts/palette.js on lines 1034..1047
                    app/assets/javascripts/palette.js on lines 1048..1061
                    app/assets/javascripts/palette.js on lines 1062..1075
                    app/assets/javascripts/palette.js on lines 1076..1089
                    app/assets/javascripts/palette.js on lines 1090..1103
                    app/assets/javascripts/palette.js on lines 1104..1117
                    app/assets/javascripts/palette.js on lines 1132..1145
                    app/assets/javascripts/palette.js on lines 1146..1159
                    app/assets/javascripts/palette.js on lines 1160..1173
                    app/assets/javascripts/palette.js on lines 1174..1187
                    app/assets/javascripts/palette.js on lines 1394..1407
                    app/assets/javascripts/palette.js on lines 1420..1433

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

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

                        Greys: {
                          type: 'sequential',
                          cbf: 42,
                          3: ['f0f0f0', 'bdbdbd', '636363'],
                          4: ['f7f7f7', 'cccccc', '969696', '525252'],
                    Severity: Major
                    Found in app/assets/javascripts/palette.js and 19 other locations - About 3 hrs to fix
                    app/assets/javascripts/palette.js on lines 936..949
                    app/assets/javascripts/palette.js on lines 950..963
                    app/assets/javascripts/palette.js on lines 964..977
                    app/assets/javascripts/palette.js on lines 978..991
                    app/assets/javascripts/palette.js on lines 992..1005
                    app/assets/javascripts/palette.js on lines 1006..1019
                    app/assets/javascripts/palette.js on lines 1020..1033
                    app/assets/javascripts/palette.js on lines 1034..1047
                    app/assets/javascripts/palette.js on lines 1048..1061
                    app/assets/javascripts/palette.js on lines 1062..1075
                    app/assets/javascripts/palette.js on lines 1076..1089
                    app/assets/javascripts/palette.js on lines 1090..1103
                    app/assets/javascripts/palette.js on lines 1104..1117
                    app/assets/javascripts/palette.js on lines 1118..1131
                    app/assets/javascripts/palette.js on lines 1132..1145
                    app/assets/javascripts/palette.js on lines 1146..1159
                    app/assets/javascripts/palette.js on lines 1160..1173
                    app/assets/javascripts/palette.js on lines 1394..1407
                    app/assets/javascripts/palette.js on lines 1420..1433

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

                    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

                        Set2: {
                          type: 'qualitative',
                          cbf: 3,
                          3: ['66c2a5', 'fc8d62', '8da0cb'],
                          4: ['66c2a5', 'fc8d62', '8da0cb', 'e78ac3'],
                    Severity: Major
                    Found in app/assets/javascripts/palette.js and 3 other locations - About 2 hrs to fix
                    app/assets/javascripts/palette.js on lines 1350..1361
                    app/assets/javascripts/palette.js on lines 1362..1373
                    app/assets/javascripts/palette.js on lines 1408..1419

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

                    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

                        Pastel2: {
                          type: 'qualitative',
                          cbf: 0,
                          3: ['b3e2cd', 'fdcdac', 'cbd5e8'],
                          4: ['b3e2cd', 'fdcdac', 'cbd5e8', 'f4cae4'],
                    Severity: Major
                    Found in app/assets/javascripts/palette.js and 3 other locations - About 2 hrs to fix
                    app/assets/javascripts/palette.js on lines 1350..1361
                    app/assets/javascripts/palette.js on lines 1362..1373
                    app/assets/javascripts/palette.js on lines 1434..1445

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

                    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

                        Accent: {
                          type: 'qualitative',
                          cbf: 0,
                          3: ['7fc97f', 'beaed4', 'fdc086'],
                          4: ['7fc97f', 'beaed4', 'fdc086', 'ffff99'],
                    Severity: Major
                    Found in app/assets/javascripts/palette.js and 3 other locations - About 2 hrs to fix
                    app/assets/javascripts/palette.js on lines 1362..1373
                    app/assets/javascripts/palette.js on lines 1408..1419
                    app/assets/javascripts/palette.js on lines 1434..1445

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

                    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

                        Dark2: {
                          type: 'qualitative',
                          cbf: 3,
                          3: ['1b9e77', 'd95f02', '7570b3'],
                          4: ['1b9e77', 'd95f02', '7570b3', 'e7298a'],
                    Severity: Major
                    Found in app/assets/javascripts/palette.js and 3 other locations - About 2 hrs to fix
                    app/assets/javascripts/palette.js on lines 1350..1361
                    app/assets/javascripts/palette.js on lines 1408..1419
                    app/assets/javascripts/palette.js on lines 1434..1445

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

                    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

                      palette.Scheme.withColorFunction = function(name, groups,
                                                                  func, opt_is_cbf, opt_cyclic) {
                        var scheme = palette.Scheme(name, groups);
                        scheme.setColorFunction.apply(scheme, slice(arguments, 2));
                        return scheme;
                    Severity: Major
                    Found in app/assets/javascripts/palette.js and 1 other location - About 1 hr to fix
                    app/assets/javascripts/palette.js on lines 445..450

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

                    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

                      palette.Scheme.fromPalettes = function(name, groups,
                                                             palettes, opt_max, opt_cbf_max) {
                        var scheme = palette.Scheme(name, groups);
                        scheme.addPalettes.apply(scheme, slice(arguments, 2));
                        return scheme;
                    Severity: Major
                    Found in app/assets/javascripts/palette.js and 1 other location - About 1 hr to fix
                    app/assets/javascripts/palette.js on lines 469..474

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

                    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