FanaHOVA/blazer

View on GitHub
app/assets/javascripts/blazer/Chart.js

Summary

Maintainability
F
6 mos
Test Coverage

File Chart.js has 9013 lines of code (exceeds 250 allowed). Consider refactoring.
Open

/*!
 * Chart.js
 * http://chartjs.org/
 * Version: 2.5.0
 *
Severity: Major
Found in app/assets/javascripts/blazer/Chart.js - About 3 wks to fix

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

    },{}],26:[function(require,module,exports){
    /* global window: false */
    /* global document: false */
    'use strict';
    
    
    Severity: Major
    Found in app/assets/javascripts/blazer/Chart.js - About 4 days to fix

      Function exports has 833 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      module.exports = function(Chart) {
          // Global Chart helpers object for utility methods and classes
          var helpers = Chart.helpers = {};
      
          // -- Basic js utility methods
      Severity: Major
      Found in app/assets/javascripts/blazer/Chart.js - About 4 days to fix

        Function 36 has 638 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        },{}],36:[function(require,module,exports){
        'use strict';
        
        module.exports = function(Chart) {
        
        
        Severity: Major
        Found in app/assets/javascripts/blazer/Chart.js - About 3 days to fix

          Function exports has 636 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          module.exports = function(Chart) {
          
              var helpers = Chart.helpers;
          
              /**
          Severity: Major
          Found in app/assets/javascripts/blazer/Chart.js - About 3 days to fix

            Function 4 has 580 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            },{"2":2,"5":5}],4:[function(require,module,exports){
            /* MIT license */
            
            module.exports = {
              rgb2hsl: rgb2hsl,
            Severity: Major
            Found in app/assets/javascripts/blazer/Chart.js - About 2 days to fix

              Function 32 has 555 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              },{}],32:[function(require,module,exports){
              'use strict';
              
              module.exports = function(Chart) {
              
              
              Severity: Major
              Found in app/assets/javascripts/blazer/Chart.js - About 2 days to fix

                Function exports has 553 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                module.exports = function(Chart) {
                
                    var helpers = Chart.helpers;
                
                    Chart.defaults.scale = {
                Severity: Major
                Found in app/assets/javascripts/blazer/Chart.js - About 2 days to fix

                  Function 23 has 488 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                  },{}],23:[function(require,module,exports){
                  'use strict';
                  
                  module.exports = function(Chart) {
                  
                  
                  Severity: Major
                  Found in app/assets/javascripts/blazer/Chart.js - About 2 days to fix

                    Function exports has 486 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                    module.exports = function(Chart) {
                    
                        var helpers = Chart.helpers;
                        var plugins = Chart.plugins;
                        var platform = Chart.platform;
                    Severity: Major
                    Found in app/assets/javascripts/blazer/Chart.js - About 2 days to fix

                      Function 15 has 438 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                      },{}],15:[function(require,module,exports){
                      'use strict';
                      
                      module.exports = function(Chart) {
                      
                      
                      Severity: Major
                      Found in app/assets/javascripts/blazer/Chart.js - About 2 days to fix

                        Function exports has 436 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                        module.exports = function(Chart) {
                        
                            var helpers = Chart.helpers;
                        
                            Chart.defaults.bar = {
                        Severity: Major
                        Found in app/assets/javascripts/blazer/Chart.js - About 2 days to fix

                          Function 3 has 399 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                          },{"6":6}],3:[function(require,module,exports){
                          /* MIT license */
                          var convert = require(5);
                          var string = require(2);
                          
                          Severity: Major
                          Found in app/assets/javascripts/blazer/Chart.js - About 1 day to fix

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

                            },{}],30:[function(require,module,exports){
                            'use strict';
                            
                            module.exports = function(Chart) {
                            
                            
                            Severity: Major
                            Found in app/assets/javascripts/blazer/Chart.js - About 1 day to fix

                              Function exports has 372 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                              module.exports = function(Chart) {
                              
                                  var helpers = Chart.helpers;
                                  var noop = helpers.noop;
                              
                              
                              Severity: Major
                              Found in app/assets/javascripts/blazer/Chart.js - About 1 day to fix

                                Function 47 has 372 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                },{}],47:[function(require,module,exports){
                                'use strict';
                                
                                module.exports = function(Chart) {
                                
                                
                                Severity: Major
                                Found in app/assets/javascripts/blazer/Chart.js - About 1 day to fix

                                  Function exports has 370 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                  module.exports = function(Chart) {
                                  
                                      var helpers = Chart.helpers;
                                      var globalDefaults = Chart.defaults.global;
                                  
                                  
                                  Severity: Major
                                  Found in app/assets/javascripts/blazer/Chart.js - About 1 day to fix

                                    Function 48 has 355 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                    },{}],48:[function(require,module,exports){
                                    /* global window: false */
                                    'use strict';
                                    
                                    var moment = require(1);
                                    Severity: Major
                                    Found in app/assets/javascripts/blazer/Chart.js - About 1 day to fix

                                      Function exports has 351 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                      module.exports = function(Chart) {
                                      
                                          var helpers = Chart.helpers;
                                          var time = {
                                              units: [{
                                      Severity: Major
                                      Found in app/assets/javascripts/blazer/Chart.js - About 1 day to fix

                                        Function 18 has 266 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                        },{}],18:[function(require,module,exports){
                                        'use strict';
                                        
                                        module.exports = function(Chart) {
                                        
                                        
                                        Severity: Major
                                        Found in app/assets/javascripts/blazer/Chart.js - About 1 day to fix

                                          Function exports has 264 lines of code (exceeds 25 allowed). Consider refactoring.
                                          Open

                                          module.exports = function(Chart) {
                                          
                                              var helpers = Chart.helpers;
                                          
                                              Chart.defaults.line = {
                                          Severity: Major
                                          Found in app/assets/javascripts/blazer/Chart.js - About 1 day to fix

                                            Function 17 has 235 lines of code (exceeds 25 allowed). Consider refactoring.
                                            Open

                                            },{}],17:[function(require,module,exports){
                                            'use strict';
                                            
                                            module.exports = function(Chart) {
                                            
                                            
                                            Severity: Major
                                            Found in app/assets/javascripts/blazer/Chart.js - About 1 day to fix

                                              Function 29 has 235 lines of code (exceeds 25 allowed). Consider refactoring.
                                              Open

                                              },{}],29:[function(require,module,exports){
                                              'use strict';
                                              
                                              module.exports = function(Chart) {
                                              
                                              
                                              Severity: Major
                                              Found in app/assets/javascripts/blazer/Chart.js - About 1 day to fix

                                                Function exports has 233 lines of code (exceeds 25 allowed). Consider refactoring.
                                                Open

                                                module.exports = function(Chart) {
                                                
                                                    var helpers = Chart.helpers,
                                                        defaults = Chart.defaults;
                                                
                                                
                                                Severity: Major
                                                Found in app/assets/javascripts/blazer/Chart.js - About 1 day to fix

                                                  Function exports has 233 lines of code (exceeds 25 allowed). Consider refactoring.
                                                  Open

                                                  module.exports = function(Chart) {
                                                  
                                                      var helpers = Chart.helpers;
                                                  
                                                      // The layout service is very self explanatory.  It's responsible for the layout within a chart.
                                                  Severity: Major
                                                  Found in app/assets/javascripts/blazer/Chart.js - About 1 day to fix

                                                    Function draw has 218 lines of code (exceeds 25 allowed). Consider refactoring.
                                                    Open

                                                            draw: function(chartArea) {
                                                                var me = this;
                                                                var options = me.options;
                                                                if (!options.display) {
                                                                    return;
                                                    Severity: Major
                                                    Found in app/assets/javascripts/blazer/Chart.js - About 1 day to fix

                                                      Function update has 215 lines of code (exceeds 25 allowed). Consider refactoring.
                                                      Open

                                                              update: function(chartInstance, width, height) {
                                                      
                                                                  if (!chartInstance) {
                                                                      return;
                                                                  }
                                                      Severity: Major
                                                      Found in app/assets/javascripts/blazer/Chart.js - About 1 day to fix

                                                        Function 24 has 208 lines of code (exceeds 25 allowed). Consider refactoring.
                                                        Open

                                                        },{}],24:[function(require,module,exports){
                                                        'use strict';
                                                        
                                                        module.exports = function(Chart) {
                                                        
                                                        
                                                        Severity: Major
                                                        Found in app/assets/javascripts/blazer/Chart.js - About 1 day to fix

                                                          Function exports has 206 lines of code (exceeds 25 allowed). Consider refactoring.
                                                          Open

                                                          module.exports = function(Chart) {
                                                          
                                                              var helpers = Chart.helpers;
                                                          
                                                              var arrayEvents = ['push', 'pop', 'shift', 'splice', 'unshift'];
                                                          Severity: Major
                                                          Found in app/assets/javascripts/blazer/Chart.js - About 1 day to fix

                                                            Function 46 has 203 lines of code (exceeds 25 allowed). Consider refactoring.
                                                            Open

                                                            },{}],46:[function(require,module,exports){
                                                            'use strict';
                                                            
                                                            module.exports = function(Chart) {
                                                            
                                                            
                                                            Severity: Major
                                                            Found in app/assets/javascripts/blazer/Chart.js - About 1 day to fix

                                                              Function exports has 201 lines of code (exceeds 25 allowed). Consider refactoring.
                                                              Open

                                                              module.exports = function(Chart) {
                                                              
                                                                  var helpers = Chart.helpers;
                                                              
                                                                  var defaultConfig = {
                                                              Severity: Major
                                                              Found in app/assets/javascripts/blazer/Chart.js - About 1 day to fix

                                                                Function 2 has 191 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                Open

                                                                },{}],2:[function(require,module,exports){
                                                                /* MIT license */
                                                                var colorNames = require(6);
                                                                
                                                                module.exports = {
                                                                Severity: Major
                                                                Found in app/assets/javascripts/blazer/Chart.js - About 7 hrs to fix

                                                                  Function 41 has 187 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                  Open

                                                                  },{}],41:[function(require,module,exports){
                                                                  'use strict';
                                                                  
                                                                  // Chart.Platform implementation for targeting a web browser
                                                                  module.exports = function(Chart) {
                                                                  Severity: Major
                                                                  Found in app/assets/javascripts/blazer/Chart.js - About 7 hrs to fix

                                                                    Function exports has 185 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                    Open

                                                                    module.exports = function(Chart) {
                                                                        var helpers = Chart.helpers;
                                                                    
                                                                        // DOM event types -> Chart.js event types.
                                                                        // Note: only events with different types are mapped.
                                                                    Severity: Major
                                                                    Found in app/assets/javascripts/blazer/Chart.js - About 7 hrs to fix

                                                                      Function 19 has 169 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                      Open

                                                                      },{}],19:[function(require,module,exports){
                                                                      'use strict';
                                                                      
                                                                      module.exports = function(Chart) {
                                                                      
                                                                      
                                                                      Severity: Major
                                                                      Found in app/assets/javascripts/blazer/Chart.js - About 6 hrs to fix

                                                                        Function exports has 167 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                        Open

                                                                        module.exports = function(Chart) {
                                                                        
                                                                            var helpers = Chart.helpers;
                                                                        
                                                                            Chart.defaults.polarArea = {
                                                                        Severity: Major
                                                                        Found in app/assets/javascripts/blazer/Chart.js - About 6 hrs to fix

                                                                          Function 40 has 162 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                          Open

                                                                          },{}],40:[function(require,module,exports){
                                                                          'use strict';
                                                                          
                                                                          module.exports = function(Chart) {
                                                                          
                                                                          
                                                                          Severity: Major
                                                                          Found in app/assets/javascripts/blazer/Chart.js - About 6 hrs to fix

                                                                            Function 27 has 161 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                            Open

                                                                            },{"3":3}],27:[function(require,module,exports){
                                                                            'use strict';
                                                                            
                                                                            module.exports = function(Chart) {
                                                                                var helpers = Chart.helpers;
                                                                            Severity: Major
                                                                            Found in app/assets/javascripts/blazer/Chart.js - About 6 hrs to fix

                                                                              Function exports has 160 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                              Open

                                                                              module.exports = function(Chart) {
                                                                              
                                                                                  var globalOpts = Chart.defaults.global;
                                                                              
                                                                                  globalOpts.elements.rectangle = {
                                                                              Severity: Major
                                                                              Found in app/assets/javascripts/blazer/Chart.js - About 6 hrs to fix

                                                                                Function 35 has 159 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                Open

                                                                                },{}],35:[function(require,module,exports){
                                                                                'use strict';
                                                                                
                                                                                module.exports = function(Chart) {
                                                                                
                                                                                
                                                                                Severity: Major
                                                                                Found in app/assets/javascripts/blazer/Chart.js - About 6 hrs to fix

                                                                                  Function exports has 159 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                  Open

                                                                                  module.exports = function(Chart) {
                                                                                      var helpers = Chart.helpers;
                                                                                  
                                                                                      /**
                                                                                       * Helper function to get relative position for an event
                                                                                  Severity: Major
                                                                                  Found in app/assets/javascripts/blazer/Chart.js - About 6 hrs to fix

                                                                                    Function exports has 157 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                    Open

                                                                                    module.exports = function(Chart) {
                                                                                    
                                                                                        var helpers = Chart.helpers;
                                                                                    
                                                                                        Chart.defaults.global.title = {
                                                                                    Severity: Major
                                                                                    Found in app/assets/javascripts/blazer/Chart.js - About 6 hrs to fix

                                                                                      Function 6 has 150 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                      Open

                                                                                      },{"4":4}],6:[function(require,module,exports){
                                                                                      module.exports = {
                                                                                          "aliceblue": [240, 248, 255],
                                                                                          "antiquewhite": [250, 235, 215],
                                                                                          "aqua": [0, 255, 255],
                                                                                      Severity: Major
                                                                                      Found in app/assets/javascripts/blazer/Chart.js - About 6 hrs to fix

                                                                                        Function 44 has 147 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                        Open

                                                                                        },{}],44:[function(require,module,exports){
                                                                                        'use strict';
                                                                                        
                                                                                        module.exports = function(Chart) {
                                                                                        
                                                                                        
                                                                                        Severity: Major
                                                                                        Found in app/assets/javascripts/blazer/Chart.js - About 5 hrs to fix

                                                                                          Function exports has 145 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                          Open

                                                                                          module.exports = function(Chart) {
                                                                                          
                                                                                              var helpers = Chart.helpers;
                                                                                          
                                                                                              var defaultConfig = {
                                                                                          Severity: Major
                                                                                          Found in app/assets/javascripts/blazer/Chart.js - About 5 hrs to fix

                                                                                            Function 38 has 142 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                            Open

                                                                                            },{}],38:[function(require,module,exports){
                                                                                            'use strict';
                                                                                            
                                                                                            module.exports = function(Chart) {
                                                                                            
                                                                                            
                                                                                            Severity: Major
                                                                                            Found in app/assets/javascripts/blazer/Chart.js - About 5 hrs to fix

                                                                                              Function exports has 140 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                              Open

                                                                                              module.exports = function(Chart) {
                                                                                              
                                                                                                  var helpers = Chart.helpers;
                                                                                                  var globalDefaults = Chart.defaults.global;
                                                                                              
                                                                                              
                                                                                              Severity: Major
                                                                                              Found in app/assets/javascripts/blazer/Chart.js - About 5 hrs to fix

                                                                                                Function 20 has 131 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                                Open

                                                                                                },{}],20:[function(require,module,exports){
                                                                                                'use strict';
                                                                                                
                                                                                                module.exports = function(Chart) {
                                                                                                
                                                                                                
                                                                                                Severity: Major
                                                                                                Found in app/assets/javascripts/blazer/Chart.js - About 5 hrs to fix

                                                                                                  Function exports has 129 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                                  Open

                                                                                                  module.exports = function(Chart) {
                                                                                                  
                                                                                                      var helpers = Chart.helpers;
                                                                                                  
                                                                                                      Chart.defaults.radar = {
                                                                                                  Severity: Major
                                                                                                  Found in app/assets/javascripts/blazer/Chart.js - About 5 hrs to fix

                                                                                                    Function draw has 122 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                                    Open

                                                                                                            draw: function() {
                                                                                                                var me = this;
                                                                                                                var vm = me._view;
                                                                                                                var spanGaps = vm.spanGaps;
                                                                                                                var fillPoint = vm.scaleZero;
                                                                                                    Severity: Major
                                                                                                    Found in app/assets/javascripts/blazer/Chart.js - About 4 hrs to fix

                                                                                                      Function 22 has 112 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                                      Open

                                                                                                      },{}],22:[function(require,module,exports){
                                                                                                      'use strict';
                                                                                                      
                                                                                                      module.exports = function(Chart) {
                                                                                                          // Global Chart canvas helpers object for drawing items to canvas
                                                                                                      Severity: Major
                                                                                                      Found in app/assets/javascripts/blazer/Chart.js - About 4 hrs to fix

                                                                                                        Function exports has 110 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                                        Open

                                                                                                        module.exports = function(Chart) {
                                                                                                            // Global Chart canvas helpers object for drawing items to canvas
                                                                                                            var helpers = Chart.canvasHelpers = {};
                                                                                                        
                                                                                                            helpers.drawPoint = function(ctx, pointStyle, radius, x, y) {
                                                                                                        Severity: Major
                                                                                                        Found in app/assets/javascripts/blazer/Chart.js - About 4 hrs to fix

                                                                                                          Function draw has 105 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                                          Open

                                                                                                                  draw: function() {
                                                                                                                      var me = this;
                                                                                                                      var opts = me.options;
                                                                                                                      var labelOpts = opts.labels;
                                                                                                                      var globalDefault = Chart.defaults.global,
                                                                                                          Severity: Major
                                                                                                          Found in app/assets/javascripts/blazer/Chart.js - About 4 hrs to fix

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

                                                                                                            },{}],34:[function(require,module,exports){
                                                                                                            'use strict';
                                                                                                            
                                                                                                            module.exports = function(Chart) {
                                                                                                            
                                                                                                            
                                                                                                            Severity: Major
                                                                                                            Found in app/assets/javascripts/blazer/Chart.js - About 3 hrs to fix

                                                                                                              Function 21 has 98 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                                              Open

                                                                                                              },{}],21:[function(require,module,exports){
                                                                                                              /* global window: false */
                                                                                                              'use strict';
                                                                                                              
                                                                                                              module.exports = function(Chart) {
                                                                                                              Severity: Major
                                                                                                              Found in app/assets/javascripts/blazer/Chart.js - About 3 hrs to fix

                                                                                                                Function determineDataLimits has 98 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                                                Open

                                                                                                                        determineDataLimits: function() {
                                                                                                                            var me = this;
                                                                                                                            var opts = me.options;
                                                                                                                            var tickOpts = opts.ticks;
                                                                                                                            var chart = me.chart;
                                                                                                                Severity: Major
                                                                                                                Found in app/assets/javascripts/blazer/Chart.js - About 3 hrs to fix

                                                                                                                  Function drawPoint has 98 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                                                  Open

                                                                                                                      helpers.drawPoint = function(ctx, pointStyle, radius, x, y) {
                                                                                                                          var type, edgeLength, xOffset, yOffset, height, size;
                                                                                                                  
                                                                                                                          if (typeof pointStyle === 'object') {
                                                                                                                              type = pointStyle.toString();
                                                                                                                  Severity: Major
                                                                                                                  Found in app/assets/javascripts/blazer/Chart.js - About 3 hrs to fix

                                                                                                                    Function exports has 97 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                                                    Open

                                                                                                                    module.exports = function(Chart) {
                                                                                                                    
                                                                                                                        var helpers = Chart.helpers;
                                                                                                                    
                                                                                                                        /**
                                                                                                                    Severity: Major
                                                                                                                    Found in app/assets/javascripts/blazer/Chart.js - About 3 hrs to fix

                                                                                                                      Function exports has 96 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                                                      Open

                                                                                                                      module.exports = function(Chart) {
                                                                                                                      
                                                                                                                          var helpers = Chart.helpers;
                                                                                                                      
                                                                                                                          Chart.defaults.global.animation = {
                                                                                                                      Severity: Major
                                                                                                                      Found in app/assets/javascripts/blazer/Chart.js - About 3 hrs to fix

                                                                                                                        Function 16 has 90 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                                                        Open

                                                                                                                        },{}],16:[function(require,module,exports){
                                                                                                                        'use strict';
                                                                                                                        
                                                                                                                        module.exports = function(Chart) {
                                                                                                                        
                                                                                                                        
                                                                                                                        Severity: Major
                                                                                                                        Found in app/assets/javascripts/blazer/Chart.js - About 3 hrs to fix

                                                                                                                          Function 43 has 90 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                                                          Open

                                                                                                                          },{"41":41}],43:[function(require,module,exports){
                                                                                                                          'use strict';
                                                                                                                          
                                                                                                                          module.exports = function(Chart) {
                                                                                                                          
                                                                                                                          
                                                                                                                          Severity: Major
                                                                                                                          Found in app/assets/javascripts/blazer/Chart.js - About 3 hrs to fix

                                                                                                                            Function 31 has 90 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                                                            Open

                                                                                                                            },{}],31:[function(require,module,exports){
                                                                                                                            'use strict';
                                                                                                                            
                                                                                                                            module.exports = function(Chart) {
                                                                                                                            
                                                                                                                            
                                                                                                                            Severity: Major
                                                                                                                            Found in app/assets/javascripts/blazer/Chart.js - About 3 hrs to fix

                                                                                                                              Function buildTicks has 90 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                                                              Open

                                                                                                                                      buildTicks: function() {
                                                                                                                                          var me = this;
                                                                                                                              
                                                                                                                                          me.ctx.save();
                                                                                                                                          var tickFontSize = helpers.getValueOrDefault(me.options.ticks.fontSize, Chart.defaults.global.defaultFontSize);
                                                                                                                              Severity: Major
                                                                                                                              Found in app/assets/javascripts/blazer/Chart.js - About 3 hrs to fix

                                                                                                                                Function determineDataLimits has 90 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                                                                Open

                                                                                                                                        determineDataLimits: function() {
                                                                                                                                            var me = this;
                                                                                                                                            var opts = me.options;
                                                                                                                                            var chart = me.chart;
                                                                                                                                            var data = chart.data;
                                                                                                                                Severity: Major
                                                                                                                                Found in app/assets/javascripts/blazer/Chart.js - About 3 hrs to fix

                                                                                                                                  Function exports has 88 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                                                                  Open

                                                                                                                                  module.exports = function(Chart) {
                                                                                                                                  
                                                                                                                                      var helpers = Chart.helpers;
                                                                                                                                  
                                                                                                                                      Chart.defaults.bubble = {
                                                                                                                                  Severity: Major
                                                                                                                                  Found in app/assets/javascripts/blazer/Chart.js - About 3 hrs to fix

                                                                                                                                    Function exports has 88 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                                                                    Open

                                                                                                                                    module.exports = function(Chart) {
                                                                                                                                    
                                                                                                                                        var helpers = Chart.helpers;
                                                                                                                                        // Default config for a category scale
                                                                                                                                        var defaultConfig = {
                                                                                                                                    Severity: Major
                                                                                                                                    Found in app/assets/javascripts/blazer/Chart.js - About 3 hrs to fix

                                                                                                                                      Function exports has 88 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                                                                      Open

                                                                                                                                      module.exports = function(Chart) {
                                                                                                                                      
                                                                                                                                          var helpers = Chart.helpers;
                                                                                                                                      
                                                                                                                                          Chart.defaults.global.plugins = {};
                                                                                                                                      Severity: Major
                                                                                                                                      Found in app/assets/javascripts/blazer/Chart.js - About 3 hrs to fix

                                                                                                                                        Function 37 has 84 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                                                                        Open

                                                                                                                                        },{}],37:[function(require,module,exports){
                                                                                                                                        'use strict';
                                                                                                                                        
                                                                                                                                        module.exports = function(Chart) {
                                                                                                                                        
                                                                                                                                        
                                                                                                                                        Severity: Major
                                                                                                                                        Found in app/assets/javascripts/blazer/Chart.js - About 3 hrs to fix

                                                                                                                                          Function 39 has 83 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                                                                          Open

                                                                                                                                          },{}],39:[function(require,module,exports){
                                                                                                                                          'use strict';
                                                                                                                                          
                                                                                                                                          module.exports = function(Chart) {
                                                                                                                                          
                                                                                                                                          
                                                                                                                                          Severity: Major
                                                                                                                                          Found in app/assets/javascripts/blazer/Chart.js - About 3 hrs to fix

                                                                                                                                            Function exports has 82 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                                                                            Open

                                                                                                                                            module.exports = function(Chart) {
                                                                                                                                            
                                                                                                                                                var helpers = Chart.helpers,
                                                                                                                                                    globalOpts = Chart.defaults.global;
                                                                                                                                            
                                                                                                                                            
                                                                                                                                            Severity: Major
                                                                                                                                            Found in app/assets/javascripts/blazer/Chart.js - About 3 hrs to fix

                                                                                                                                              Function exports has 81 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                                                                              Open

                                                                                                                                              module.exports = function(Chart) {
                                                                                                                                              
                                                                                                                                                  var helpers = Chart.helpers,
                                                                                                                                                      globalOpts = Chart.defaults.global,
                                                                                                                                                      defaultColor = globalOpts.defaultColor;
                                                                                                                                              Severity: Major
                                                                                                                                              Found in app/assets/javascripts/blazer/Chart.js - About 3 hrs to fix

                                                                                                                                                Function fit has 76 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                                                                                Open

                                                                                                                                                        fit: function() {
                                                                                                                                                            var me = this;
                                                                                                                                                            var opts = me.options;
                                                                                                                                                            var labelOpts = opts.labels;
                                                                                                                                                            var display = opts.display;
                                                                                                                                                Severity: Major
                                                                                                                                                Found in app/assets/javascripts/blazer/Chart.js - About 3 hrs to fix

                                                                                                                                                  Consider simplifying this complex logical expression.
                                                                                                                                                  Open

                                                                                                                                                              if (circumference < Math.PI * 2.0) {
                                                                                                                                                                  var startAngle = opts.rotation % (Math.PI * 2.0);
                                                                                                                                                                  startAngle += Math.PI * 2.0 * (startAngle >= Math.PI ? -1 : startAngle < -Math.PI ? 1 : 0);
                                                                                                                                                                  var endAngle = startAngle + circumference;
                                                                                                                                                                  var start = {x: Math.cos(startAngle), y: Math.sin(startAngle)};
                                                                                                                                                  Severity: Critical
                                                                                                                                                  Found in app/assets/javascripts/blazer/Chart.js - About 3 hrs to fix

                                                                                                                                                    Function update has 74 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                                                                                    Open

                                                                                                                                                            update: function(changed) {
                                                                                                                                                                var me = this;
                                                                                                                                                                var opts = me._options;
                                                                                                                                                    
                                                                                                                                                                // Need to regenerate the model because its faster than using extend and it is necessary due to the optimization in Chart.Element.transition
                                                                                                                                                    Severity: Major
                                                                                                                                                    Found in app/assets/javascripts/blazer/Chart.js - About 2 hrs to fix

                                                                                                                                                      Function fit has 70 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                                                                                      Open

                                                                                                                                                              fit: function() {
                                                                                                                                                                  var me = this;
                                                                                                                                                                  // Reset
                                                                                                                                                                  var minSize = me.minSize = {
                                                                                                                                                                      width: 0,
                                                                                                                                                      Severity: Major
                                                                                                                                                      Found in app/assets/javascripts/blazer/Chart.js - About 2 hrs to fix

                                                                                                                                                        Function splineCurveMonotone has 70 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                                                                                        Open

                                                                                                                                                            helpers.splineCurveMonotone = function(points) {
                                                                                                                                                                // This function calculates Bézier control points in a similar way than |splineCurve|,
                                                                                                                                                                // but preserves monotonicity of the provided data and ensures no local extremums are added
                                                                                                                                                                // between the dataset discrete points due to the interpolation.
                                                                                                                                                                // See : https://en.wikipedia.org/wiki/Monotone_cubic_interpolation
                                                                                                                                                        Severity: Major
                                                                                                                                                        Found in app/assets/javascripts/blazer/Chart.js - About 2 hrs to fix

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

                                                                                                                                                          },{}],25:[function(require,module,exports){
                                                                                                                                                          'use strict';
                                                                                                                                                          
                                                                                                                                                          module.exports = function(Chart) {
                                                                                                                                                          
                                                                                                                                                          
                                                                                                                                                          Severity: Major
                                                                                                                                                          Found in app/assets/javascripts/blazer/Chart.js - About 2 hrs to fix

                                                                                                                                                            Function 45 has 69 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                                                                                            Open

                                                                                                                                                            },{}],45:[function(require,module,exports){
                                                                                                                                                            'use strict';
                                                                                                                                                            
                                                                                                                                                            module.exports = function(Chart) {
                                                                                                                                                            
                                                                                                                                                            
                                                                                                                                                            Severity: Major
                                                                                                                                                            Found in app/assets/javascripts/blazer/Chart.js - About 2 hrs to fix

                                                                                                                                                              Function exports has 67 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                                                                                              Open

                                                                                                                                                              module.exports = function(Chart) {
                                                                                                                                                              
                                                                                                                                                                  var helpers = Chart.helpers;
                                                                                                                                                              
                                                                                                                                                                  Chart.elements = {};
                                                                                                                                                              Severity: Major
                                                                                                                                                              Found in app/assets/javascripts/blazer/Chart.js - About 2 hrs to fix

                                                                                                                                                                Function exports has 67 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                                                                                                Open

                                                                                                                                                                module.exports = function(Chart) {
                                                                                                                                                                
                                                                                                                                                                    var helpers = Chart.helpers,
                                                                                                                                                                        noop = helpers.noop;
                                                                                                                                                                
                                                                                                                                                                
                                                                                                                                                                Severity: Major
                                                                                                                                                                Found in app/assets/javascripts/blazer/Chart.js - About 2 hrs to fix

                                                                                                                                                                  Function draw has 66 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                                                                                                  Open

                                                                                                                                                                          draw: function() {
                                                                                                                                                                              var ctx = this._chart.ctx;
                                                                                                                                                                              var vm = this._view;
                                                                                                                                                                              var left, right, top, bottom, signX, signY, borderSkipped;
                                                                                                                                                                              var borderWidth = vm.borderWidth;
                                                                                                                                                                  Severity: Major
                                                                                                                                                                  Found in app/assets/javascripts/blazer/Chart.js - About 2 hrs to fix

                                                                                                                                                                    Function 5 has 64 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                                                                                                    Open

                                                                                                                                                                    },{}],5:[function(require,module,exports){
                                                                                                                                                                    var conversions = require(4);
                                                                                                                                                                    
                                                                                                                                                                    var convert = function() {
                                                                                                                                                                       return new Converter();
                                                                                                                                                                    Severity: Major
                                                                                                                                                                    Found in app/assets/javascripts/blazer/Chart.js - About 2 hrs to fix

                                                                                                                                                                      Function determineAlignment has 57 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                                                                                                      Open

                                                                                                                                                                          function determineAlignment(tooltip, size) {
                                                                                                                                                                              var model = tooltip._model;
                                                                                                                                                                              var chart = tooltip._chart;
                                                                                                                                                                              var chartArea = tooltip._chartInstance.chartArea;
                                                                                                                                                                              var xAlign = 'center';
                                                                                                                                                                      Severity: Major
                                                                                                                                                                      Found in app/assets/javascripts/blazer/Chart.js - About 2 hrs to fix

                                                                                                                                                                        Function drawCaret has 56 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                                                                                                        Open

                                                                                                                                                                                drawCaret: function(tooltipPoint, size, opacity) {
                                                                                                                                                                                    var vm = this._view;
                                                                                                                                                                                    var ctx = this._chart.ctx;
                                                                                                                                                                                    var x1, x2, x3;
                                                                                                                                                                                    var y1, y2, y3;
                                                                                                                                                                        Severity: Major
                                                                                                                                                                        Found in app/assets/javascripts/blazer/Chart.js - About 2 hrs to fix

                                                                                                                                                                          Function getRgba has 55 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                                                                                                          Open

                                                                                                                                                                          function getRgba(string) {
                                                                                                                                                                             if (!string) {
                                                                                                                                                                                return;
                                                                                                                                                                             }
                                                                                                                                                                             var abbr =  /^#([a-fA-F0-9]{3})$/,
                                                                                                                                                                          Severity: Major
                                                                                                                                                                          Found in app/assets/javascripts/blazer/Chart.js - About 2 hrs to fix

                                                                                                                                                                            Function determineDataLimits has 49 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                                                                                                            Open

                                                                                                                                                                                    determineDataLimits: function() {
                                                                                                                                                                                        var me = this;
                                                                                                                                                                                        me.labelMoments = [];
                                                                                                                                                                            
                                                                                                                                                                                        // Only parse these once. If the dataset does not have data as x,y pairs, we will use
                                                                                                                                                                            Severity: Minor
                                                                                                                                                                            Found in app/assets/javascripts/blazer/Chart.js - About 1 hr to fix

                                                                                                                                                                              Function update has 46 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                                                                                                              Open

                                                                                                                                                                                      update: function(reset) {
                                                                                                                                                                                          var me = this;
                                                                                                                                                                                          var meta = me.getMeta();
                                                                                                                                                                                          var line = meta.dataset;
                                                                                                                                                                                          var points = meta.data || [];
                                                                                                                                                                              Severity: Minor
                                                                                                                                                                              Found in app/assets/javascripts/blazer/Chart.js - About 1 hr to fix

                                                                                                                                                                                Function update has 44 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                                                                                                                Open

                                                                                                                                                                                        update: function(reset) {
                                                                                                                                                                                            var me = this;
                                                                                                                                                                                            var chart = me.chart,
                                                                                                                                                                                                chartArea = chart.chartArea,
                                                                                                                                                                                                opts = chart.options,
                                                                                                                                                                                Severity: Minor
                                                                                                                                                                                Found in app/assets/javascripts/blazer/Chart.js - About 1 hr to fix

                                                                                                                                                                                  Function getTooltipSize has 43 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                                                                                                                  Open

                                                                                                                                                                                      function getTooltipSize(tooltip, model) {
                                                                                                                                                                                          var ctx = tooltip._chart.ctx;
                                                                                                                                                                                  
                                                                                                                                                                                          var height = model.yPadding * 2; // Tooltip Padding
                                                                                                                                                                                          var width = 0;
                                                                                                                                                                                  Severity: Minor
                                                                                                                                                                                  Found in app/assets/javascripts/blazer/Chart.js - About 1 hr to fix

                                                                                                                                                                                    Function 28 has 43 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                                                                                                                    Open

                                                                                                                                                                                    },{}],28:[function(require,module,exports){
                                                                                                                                                                                    'use strict';
                                                                                                                                                                                    
                                                                                                                                                                                    module.exports = function() {
                                                                                                                                                                                    
                                                                                                                                                                                    
                                                                                                                                                                                    Severity: Minor
                                                                                                                                                                                    Found in app/assets/javascripts/blazer/Chart.js - About 1 hr to fix

                                                                                                                                                                                      Function getPixelForValue has 43 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                                                                                                                      Open

                                                                                                                                                                                              getPixelForValue: function(value) {
                                                                                                                                                                                                  var me = this;
                                                                                                                                                                                                  var innerDimension;
                                                                                                                                                                                                  var pixel;
                                                                                                                                                                                      
                                                                                                                                                                                      
                                                                                                                                                                                      Severity: Minor
                                                                                                                                                                                      Found in app/assets/javascripts/blazer/Chart.js - About 1 hr to fix

                                                                                                                                                                                        Function Color has 42 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                                                                                                                        Open

                                                                                                                                                                                        var Color = function (obj) {
                                                                                                                                                                                            if (obj instanceof Color) {
                                                                                                                                                                                                return obj;
                                                                                                                                                                                            }
                                                                                                                                                                                            if (!(this instanceof Color)) {
                                                                                                                                                                                        Severity: Minor
                                                                                                                                                                                        Found in app/assets/javascripts/blazer/Chart.js - About 1 hr to fix

                                                                                                                                                                                          Function draw has 42 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                                                                                                                          Open

                                                                                                                                                                                                  draw: function() {
                                                                                                                                                                                                      var me = this;
                                                                                                                                                                                                      var opts = me.options;
                                                                                                                                                                                                      var gridLineOpts = opts.gridLines;
                                                                                                                                                                                                      var tickOpts = opts.ticks;
                                                                                                                                                                                          Severity: Minor
                                                                                                                                                                                          Found in app/assets/javascripts/blazer/Chart.js - About 1 hr to fix

                                                                                                                                                                                            Consider simplifying this complex logical expression.
                                                                                                                                                                                            Open

                                                                                                                                                                                                        if (showLine) {
                                                                                                                                                                                                            custom = line.custom || {};
                                                                                                                                                                                            
                                                                                                                                                                                                            // Compatibility: If the properties are defined with only the old name, use those values
                                                                                                                                                                                                            if ((dataset.tension !== undefined) && (dataset.lineTension === undefined)) {
                                                                                                                                                                                            Severity: Critical
                                                                                                                                                                                            Found in app/assets/javascripts/blazer/Chart.js - About 1 hr to fix

                                                                                                                                                                                              Function 7 has 41 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                                                                                                                              Open

                                                                                                                                                                                              },{}],7:[function(require,module,exports){
                                                                                                                                                                                              /**
                                                                                                                                                                                               * @namespace Chart
                                                                                                                                                                                               */
                                                                                                                                                                                              var Chart = require(28)();
                                                                                                                                                                                              Severity: Minor
                                                                                                                                                                                              Found in app/assets/javascripts/blazer/Chart.js - About 1 hr to fix

                                                                                                                                                                                                Function exports has 41 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                                                                                                                                Open

                                                                                                                                                                                                module.exports = function() {
                                                                                                                                                                                                
                                                                                                                                                                                                    // Occupy the global variable of Chart, and create a simple base class
                                                                                                                                                                                                    var Chart = function(item, config) {
                                                                                                                                                                                                        this.controller = new Chart.Controller(item, config, this);
                                                                                                                                                                                                Severity: Minor
                                                                                                                                                                                                Found in app/assets/javascripts/blazer/Chart.js - About 1 hr to fix

                                                                                                                                                                                                  Function fitWithPointLabels has 41 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                                                                                                                                  Open

                                                                                                                                                                                                      function fitWithPointLabels(scale) {
                                                                                                                                                                                                          /*
                                                                                                                                                                                                           * Right, this is really confusing and there is a lot of maths going on here
                                                                                                                                                                                                           * The gist of the problem is here: https://gist.github.com/nnnick/696cc9c55f4b0beb8fe9
                                                                                                                                                                                                           *
                                                                                                                                                                                                  Severity: Minor
                                                                                                                                                                                                  Found in app/assets/javascripts/blazer/Chart.js - About 1 hr to fix

                                                                                                                                                                                                    Function updateBezierControlPoints has 40 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                                                                                                                                    Open

                                                                                                                                                                                                            updateBezierControlPoints: function() {
                                                                                                                                                                                                                var me = this;
                                                                                                                                                                                                                var meta = me.getMeta();
                                                                                                                                                                                                                var area = me.chart.chartArea;
                                                                                                                                                                                                                var points = (meta.data || []);
                                                                                                                                                                                                    Severity: Minor
                                                                                                                                                                                                    Found in app/assets/javascripts/blazer/Chart.js - About 1 hr to fix

                                                                                                                                                                                                      Function updateElement has 39 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                                                                                                                                      Open

                                                                                                                                                                                                              updateElement: function(arc, index, reset) {
                                                                                                                                                                                                                  var me = this;
                                                                                                                                                                                                                  var chart = me.chart,
                                                                                                                                                                                                                      chartArea = chart.chartArea,
                                                                                                                                                                                                                      opts = chart.options,
                                                                                                                                                                                                      Severity: Minor
                                                                                                                                                                                                      Found in app/assets/javascripts/blazer/Chart.js - About 1 hr to fix

                                                                                                                                                                                                        Function updateElement has 39 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                                                                                                                                        Open

                                                                                                                                                                                                                updateElement: function(arc, index, reset) {
                                                                                                                                                                                                                    var me = this;
                                                                                                                                                                                                                    var chart = me.chart;
                                                                                                                                                                                                                    var dataset = me.getDataset();
                                                                                                                                                                                                                    var opts = chart.options;
                                                                                                                                                                                                        Severity: Minor
                                                                                                                                                                                                        Found in app/assets/javascripts/blazer/Chart.js - About 1 hr to fix

                                                                                                                                                                                                          Function draw has 38 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                                                                                                                                          Open

                                                                                                                                                                                                                  draw: function() {
                                                                                                                                                                                                                      var me = this,
                                                                                                                                                                                                                          ctx = me.ctx,
                                                                                                                                                                                                                          valueOrDefault = helpers.getValueOrDefault,
                                                                                                                                                                                                                          opts = me.options,
                                                                                                                                                                                                          Severity: Minor
                                                                                                                                                                                                          Found in app/assets/javascripts/blazer/Chart.js - About 1 hr to fix

                                                                                                                                                                                                            Function setValues has 37 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                                                                                                                                            Open

                                                                                                                                                                                                            Color.prototype.setValues = function (space, vals) {
                                                                                                                                                                                                                var values = this.values;
                                                                                                                                                                                                                var spaces = this.spaces;
                                                                                                                                                                                                                var maxes = this.maxes;
                                                                                                                                                                                                                var alpha = 1;
                                                                                                                                                                                                            Severity: Minor
                                                                                                                                                                                                            Found in app/assets/javascripts/blazer/Chart.js - About 1 hr to fix

                                                                                                                                                                                                              Function updateElement has 37 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                                                                                                                                              Open

                                                                                                                                                                                                                      updateElement: function(point, index, reset) {
                                                                                                                                                                                                                          var me = this;
                                                                                                                                                                                                                          var meta = me.getMeta();
                                                                                                                                                                                                                          var custom = point.custom || {};
                                                                                                                                                                                                                          var dataset = me.getDataset();
                                                                                                                                                                                                              Severity: Minor
                                                                                                                                                                                                              Found in app/assets/javascripts/blazer/Chart.js - About 1 hr to fix

                                                                                                                                                                                                                Function getBackgroundPoint has 36 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                                                                                                                                                Open

                                                                                                                                                                                                                    function getBackgroundPoint(vm, size, alignment) {
                                                                                                                                                                                                                        // Background Position
                                                                                                                                                                                                                        var x = vm.x;
                                                                                                                                                                                                                        var y = vm.y;
                                                                                                                                                                                                                
                                                                                                                                                                                                                
                                                                                                                                                                                                                Severity: Minor
                                                                                                                                                                                                                Found in app/assets/javascripts/blazer/Chart.js - About 1 hr to fix

                                                                                                                                                                                                                  Function startDigest has 36 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                                                                                                                                                  Open

                                                                                                                                                                                                                          startDigest: function() {
                                                                                                                                                                                                                              var me = this;
                                                                                                                                                                                                                  
                                                                                                                                                                                                                              var startTime = Date.now();
                                                                                                                                                                                                                              var framesToDrop = 0;
                                                                                                                                                                                                                  Severity: Minor
                                                                                                                                                                                                                  Found in app/assets/javascripts/blazer/Chart.js - About 1 hr to fix

                                                                                                                                                                                                                    Function transition has 36 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                                                                                                                                                    Open

                                                                                                                                                                                                                            transition: function(ease) {
                                                                                                                                                                                                                                var me = this;
                                                                                                                                                                                                                    
                                                                                                                                                                                                                                if (!me._view) {
                                                                                                                                                                                                                                    me._view = helpers.clone(me._model);
                                                                                                                                                                                                                    Severity: Minor
                                                                                                                                                                                                                    Found in app/assets/javascripts/blazer/Chart.js - About 1 hr to fix

                                                                                                                                                                                                                      Function buildScales has 36 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                                                                                                                                                      Open

                                                                                                                                                                                                                              buildScales: function() {
                                                                                                                                                                                                                                  var me = this;
                                                                                                                                                                                                                                  var options = me.options;
                                                                                                                                                                                                                                  var scales = me.scales = {};
                                                                                                                                                                                                                                  var items = [];
                                                                                                                                                                                                                      Severity: Minor
                                                                                                                                                                                                                      Found in app/assets/javascripts/blazer/Chart.js - About 1 hr to fix

                                                                                                                                                                                                                        Function 14 has 35 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                                                                                                                                                        Open

                                                                                                                                                                                                                        },{}],14:[function(require,module,exports){
                                                                                                                                                                                                                        'use strict';
                                                                                                                                                                                                                        
                                                                                                                                                                                                                        module.exports = function(Chart) {
                                                                                                                                                                                                                        
                                                                                                                                                                                                                        
                                                                                                                                                                                                                        Severity: Minor
                                                                                                                                                                                                                        Found in app/assets/javascripts/blazer/Chart.js - About 1 hr to fix

                                                                                                                                                                                                                          Function handleEvent has 35 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                                                                                                                                                          Open

                                                                                                                                                                                                                                  handleEvent: function(e) {
                                                                                                                                                                                                                                      var me = this;
                                                                                                                                                                                                                                      var opts = me.options;
                                                                                                                                                                                                                                      var type = e.type === 'mouseup' ? 'click' : e.type;
                                                                                                                                                                                                                                      var changed = false;
                                                                                                                                                                                                                          Severity: Minor
                                                                                                                                                                                                                          Found in app/assets/javascripts/blazer/Chart.js - About 1 hr to fix

                                                                                                                                                                                                                            Function update has 35 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                                                                                                                                                            Open

                                                                                                                                                                                                                                    update: function(reset) {
                                                                                                                                                                                                                                        var me = this;
                                                                                                                                                                                                                                        var meta = me.getMeta();
                                                                                                                                                                                                                                        var line = meta.dataset;
                                                                                                                                                                                                                                        var points = meta.data;
                                                                                                                                                                                                                            Severity: Minor
                                                                                                                                                                                                                            Found in app/assets/javascripts/blazer/Chart.js - About 1 hr to fix

                                                                                                                                                                                                                              Function drawBody has 35 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                                                                                                                                                              Open

                                                                                                                                                                                                                                      drawBody: function(pt, vm, ctx, opacity) {
                                                                                                                                                                                                                                          var bodyFontSize = vm.bodyFontSize;
                                                                                                                                                                                                                                          var bodySpacing = vm.bodySpacing;
                                                                                                                                                                                                                                          var body = vm.body;
                                                                                                                                                                                                                              
                                                                                                                                                                                                                              
                                                                                                                                                                                                                              Severity: Minor
                                                                                                                                                                                                                              Found in app/assets/javascripts/blazer/Chart.js - About 1 hr to fix

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

                                                                                                                                                                                                                                    function getBaseModel(tooltipOpts) {
                                                                                                                                                                                                                                        var globalDefaults = Chart.defaults.global;
                                                                                                                                                                                                                                        var getValueOrDefault = helpers.getValueOrDefault;
                                                                                                                                                                                                                                
                                                                                                                                                                                                                                        return {
                                                                                                                                                                                                                                Severity: Minor
                                                                                                                                                                                                                                Found in app/assets/javascripts/blazer/Chart.js - About 1 hr to fix

                                                                                                                                                                                                                                  Consider simplifying this complex logical expression.
                                                                                                                                                                                                                                  Open

                                                                                                                                                                                                                                                  if (dsMeta.bar && this.chart.isDatasetVisible(j) &&
                                                                                                                                                                                                                                                      (xScale.options.stacked === false ||
                                                                                                                                                                                                                                                      (xScale.options.stacked === true && stacks.indexOf(dsMeta.stack) === -1) ||
                                                                                                                                                                                                                                                      (xScale.options.stacked === undefined && (dsMeta.stack === undefined || stacks.indexOf(dsMeta.stack) === -1)))) {
                                                                                                                                                                                                                                                      stacks.push(dsMeta.stack);
                                                                                                                                                                                                                                  Severity: Critical
                                                                                                                                                                                                                                  Found in app/assets/javascripts/blazer/Chart.js - About 1 hr to fix

                                                                                                                                                                                                                                    Consider simplifying this complex logical expression.
                                                                                                                                                                                                                                    Open

                                                                                                                                                                                                                                                    if (dsMeta.bar && this.chart.isDatasetVisible(j) &&
                                                                                                                                                                                                                                                        (yScale.options.stacked === false ||
                                                                                                                                                                                                                                                        (yScale.options.stacked === true && stacks.indexOf(dsMeta.stack) === -1) ||
                                                                                                                                                                                                                                                        (yScale.options.stacked === undefined && (dsMeta.stack === undefined || stacks.indexOf(dsMeta.stack) === -1)))) {
                                                                                                                                                                                                                                                        stacks.push(dsMeta.stack);
                                                                                                                                                                                                                                    Severity: Critical
                                                                                                                                                                                                                                    Found in app/assets/javascripts/blazer/Chart.js - About 1 hr to fix

                                                                                                                                                                                                                                      Consider simplifying this complex logical expression.
                                                                                                                                                                                                                                      Open

                                                                                                                                                                                                                                                      if (dsMeta.bar && me.chart.isDatasetVisible(datasetIndex) &&
                                                                                                                                                                                                                                                          (xScale.options.stacked === false ||
                                                                                                                                                                                                                                                          (xScale.options.stacked === true && stacks.indexOf(dsMeta.stack) === -1) ||
                                                                                                                                                                                                                                                          (xScale.options.stacked === undefined && (dsMeta.stack === undefined || stacks.indexOf(dsMeta.stack) === -1)))) {
                                                                                                                                                                                                                                                          stacks.push(dsMeta.stack);
                                                                                                                                                                                                                                      Severity: Critical
                                                                                                                                                                                                                                      Found in app/assets/javascripts/blazer/Chart.js - About 1 hr to fix

                                                                                                                                                                                                                                        Consider simplifying this complex logical expression.
                                                                                                                                                                                                                                        Open

                                                                                                                                                                                                                                                        if (dsMeta.bar && me.chart.isDatasetVisible(datasetIndex) &&
                                                                                                                                                                                                                                                            (yScale.options.stacked === false ||
                                                                                                                                                                                                                                                            (yScale.options.stacked === true && stacks.indexOf(dsMeta.stack) === -1) ||
                                                                                                                                                                                                                                                            (yScale.options.stacked === undefined && (dsMeta.stack === undefined || stacks.indexOf(dsMeta.stack) === -1)))) {
                                                                                                                                                                                                                                                            stacks.push(dsMeta.stack);
                                                                                                                                                                                                                                        Severity: Critical
                                                                                                                                                                                                                                        Found in app/assets/javascripts/blazer/Chart.js - About 1 hr to fix

                                                                                                                                                                                                                                          Function exports has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                                                                                                                                                                          Open

                                                                                                                                                                                                                                          module.exports = function(Chart) {
                                                                                                                                                                                                                                          
                                                                                                                                                                                                                                              var defaultConfig = {
                                                                                                                                                                                                                                                  hover: {
                                                                                                                                                                                                                                                      mode: 'single'
                                                                                                                                                                                                                                          Severity: Minor
                                                                                                                                                                                                                                          Found in app/assets/javascripts/blazer/Chart.js - About 1 hr to fix

                                                                                                                                                                                                                                            Function initCanvas has 32 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                                                                                                                                                                            Open

                                                                                                                                                                                                                                                function initCanvas(canvas, config) {
                                                                                                                                                                                                                                                    var style = canvas.style;
                                                                                                                                                                                                                                            
                                                                                                                                                                                                                                                    // NOTE(SB) canvas.getAttribute('width') !== canvas.width: in the first case it
                                                                                                                                                                                                                                                    // returns null or '' if no explicit value has been set to the canvas attribute.
                                                                                                                                                                                                                                            Severity: Minor
                                                                                                                                                                                                                                            Found in app/assets/javascripts/blazer/Chart.js - About 1 hr to fix

                                                                                                                                                                                                                                              Function update has 31 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                                                                                                                                                                              Open

                                                                                                                                                                                                                                                      update: function(maxWidth, maxHeight, margins) {
                                                                                                                                                                                                                                                          var me = this;
                                                                                                                                                                                                                                              
                                                                                                                                                                                                                                                          // Update Lifecycle - Probably don't want to ever extend or overwrite this function ;)
                                                                                                                                                                                                                                                          me.beforeUpdate();
                                                                                                                                                                                                                                              Severity: Minor
                                                                                                                                                                                                                                              Found in app/assets/javascripts/blazer/Chart.js - About 1 hr to fix

                                                                                                                                                                                                                                                Function draw has 31 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                                                                                                                                                                                Open

                                                                                                                                                                                                                                                        draw: function(chartArea) {
                                                                                                                                                                                                                                                            var vm = this._view;
                                                                                                                                                                                                                                                            var model = this._model;
                                                                                                                                                                                                                                                            var ctx = this._chart.ctx;
                                                                                                                                                                                                                                                            var pointStyle = vm.pointStyle;
                                                                                                                                                                                                                                                Severity: Minor
                                                                                                                                                                                                                                                Found in app/assets/javascripts/blazer/Chart.js - About 1 hr to fix

                                                                                                                                                                                                                                                  Function descriptors has 31 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                                                                                                                                                                                  Open

                                                                                                                                                                                                                                                          descriptors: function(chart) {
                                                                                                                                                                                                                                                              var cache = chart._plugins || (chart._plugins = {});
                                                                                                                                                                                                                                                              if (cache.id === this._cacheId) {
                                                                                                                                                                                                                                                                  return cache.descriptors;
                                                                                                                                                                                                                                                              }
                                                                                                                                                                                                                                                  Severity: Minor
                                                                                                                                                                                                                                                  Found in app/assets/javascripts/blazer/Chart.js - About 1 hr to fix

                                                                                                                                                                                                                                                    Function buildLabelDiffs has 31 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                                                                                                                                                                                    Open

                                                                                                                                                                                                                                                            buildLabelDiffs: function() {
                                                                                                                                                                                                                                                                var me = this;
                                                                                                                                                                                                                                                                me.labelDiffs = [];
                                                                                                                                                                                                                                                                var scaleLabelDiffs = [];
                                                                                                                                                                                                                                                                // Parse common labels once
                                                                                                                                                                                                                                                    Severity: Minor
                                                                                                                                                                                                                                                    Found in app/assets/javascripts/blazer/Chart.js - About 1 hr to fix

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

                                                                                                                                                                                                                                                          Chart.Controller = function(item, config, instance) {
                                                                                                                                                                                                                                                              var me = this;
                                                                                                                                                                                                                                                      
                                                                                                                                                                                                                                                              config = initConfig(config);
                                                                                                                                                                                                                                                      
                                                                                                                                                                                                                                                      
                                                                                                                                                                                                                                                      Severity: Minor
                                                                                                                                                                                                                                                      Found in app/assets/javascripts/blazer/Chart.js - About 1 hr to fix

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

                                                                                                                                                                                                                                                                render: function(duration, lazy) {
                                                                                                                                                                                                                                                                    var me = this;
                                                                                                                                                                                                                                                        
                                                                                                                                                                                                                                                                    if (plugins.notify(me, 'beforeRender') === false) {
                                                                                                                                                                                                                                                                        return;
                                                                                                                                                                                                                                                        Severity: Minor
                                                                                                                                                                                                                                                        Found in app/assets/javascripts/blazer/Chart.js - About 1 hr to fix

                                                                                                                                                                                                                                                          Function hsl2rgb has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                                                                                                                                                                                          Open

                                                                                                                                                                                                                                                          function hsl2rgb(hsl) {
                                                                                                                                                                                                                                                            var h = hsl[0] / 360,
                                                                                                                                                                                                                                                                s = hsl[1] / 100,
                                                                                                                                                                                                                                                                l = hsl[2] / 100,
                                                                                                                                                                                                                                                                t1, t2, t3, rgb, val;
                                                                                                                                                                                                                                                          Severity: Minor
                                                                                                                                                                                                                                                          Found in app/assets/javascripts/blazer/Chart.js - About 1 hr to fix

                                                                                                                                                                                                                                                            Function listenArrayEvents has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                                                                                                                                                                                            Open

                                                                                                                                                                                                                                                                function listenArrayEvents(array, listener) {
                                                                                                                                                                                                                                                                    if (array._chartjs) {
                                                                                                                                                                                                                                                                        array._chartjs.listeners.push(listener);
                                                                                                                                                                                                                                                                        return;
                                                                                                                                                                                                                                                                    }
                                                                                                                                                                                                                                                            Severity: Minor
                                                                                                                                                                                                                                                            Found in app/assets/javascripts/blazer/Chart.js - About 1 hr to fix

                                                                                                                                                                                                                                                              Function scaleMerge has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                                                                                                                                                                                              Open

                                                                                                                                                                                                                                                                  helpers.scaleMerge = function(_base, extension) {
                                                                                                                                                                                                                                                                      var base = helpers.clone(_base);
                                                                                                                                                                                                                                                              
                                                                                                                                                                                                                                                                      helpers.each(extension, function(value, key) {
                                                                                                                                                                                                                                                                          if (key === 'xAxes' || key === 'yAxes') {
                                                                                                                                                                                                                                                              Severity: Minor
                                                                                                                                                                                                                                                              Found in app/assets/javascripts/blazer/Chart.js - About 1 hr to fix

                                                                                                                                                                                                                                                                Function drawPointLabels has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                                                                                                                                                                                                Open

                                                                                                                                                                                                                                                                    function drawPointLabels(scale) {
                                                                                                                                                                                                                                                                        var ctx = scale.ctx;
                                                                                                                                                                                                                                                                        var getValueOrDefault = helpers.getValueOrDefault;
                                                                                                                                                                                                                                                                        var opts = scale.options;
                                                                                                                                                                                                                                                                        var angleLineOpts = opts.angleLines;
                                                                                                                                                                                                                                                                Severity: Minor
                                                                                                                                                                                                                                                                Found in app/assets/javascripts/blazer/Chart.js - About 1 hr to fix

                                                                                                                                                                                                                                                                  Function longestText has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                                                                                                                                                                                                  Open

                                                                                                                                                                                                                                                                      helpers.longestText = function(ctx, font, arrayOfThings, cache) {
                                                                                                                                                                                                                                                                          cache = cache || {};
                                                                                                                                                                                                                                                                          var data = cache.data = cache.data || {};
                                                                                                                                                                                                                                                                          var gc = cache.garbageCollect = cache.garbageCollect || [];
                                                                                                                                                                                                                                                                  
                                                                                                                                                                                                                                                                  
                                                                                                                                                                                                                                                                  Severity: Minor
                                                                                                                                                                                                                                                                  Found in app/assets/javascripts/blazer/Chart.js - About 1 hr to fix

                                                                                                                                                                                                                                                                    Function calculateBarY has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                                                                                                                                                                                                    Open

                                                                                                                                                                                                                                                                            calculateBarY: function(index, datasetIndex) {
                                                                                                                                                                                                                                                                                var me = this;
                                                                                                                                                                                                                                                                                var meta = me.getMeta();
                                                                                                                                                                                                                                                                                var yScale = me.getScaleForId(meta.yAxisID);
                                                                                                                                                                                                                                                                                var value = Number(me.getDataset().data[index]);
                                                                                                                                                                                                                                                                    Severity: Minor
                                                                                                                                                                                                                                                                    Found in app/assets/javascripts/blazer/Chart.js - About 1 hr to fix

                                                                                                                                                                                                                                                                      Function calculateBarX has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                                                                                                                                                                                                      Open

                                                                                                                                                                                                                                                                              calculateBarX: function(index, datasetIndex) {
                                                                                                                                                                                                                                                                                  var me = this;
                                                                                                                                                                                                                                                                                  var meta = me.getMeta();
                                                                                                                                                                                                                                                                                  var xScale = me.getScaleForId(meta.xAxisID);
                                                                                                                                                                                                                                                                                  var value = Number(me.getDataset().data[index]);
                                                                                                                                                                                                                                                                      Severity: Minor
                                                                                                                                                                                                                                                                      Found in app/assets/javascripts/blazer/Chart.js - About 1 hr to fix

                                                                                                                                                                                                                                                                        Function handleTickRangeOptions has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                                                                                                                                                                                                        Open

                                                                                                                                                                                                                                                                                handleTickRangeOptions: function() {
                                                                                                                                                                                                                                                                                    var me = this;
                                                                                                                                                                                                                                                                                    var opts = me.options;
                                                                                                                                                                                                                                                                                    var tickOpts = opts.ticks;
                                                                                                                                                                                                                                                                        
                                                                                                                                                                                                                                                                        
                                                                                                                                                                                                                                                                        Severity: Minor
                                                                                                                                                                                                                                                                        Found in app/assets/javascripts/blazer/Chart.js - About 1 hr to fix

                                                                                                                                                                                                                                                                          Function 33 has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                                                                                                                                                                                                          Open

                                                                                                                                                                                                                                                                          },{}],33:[function(require,module,exports){
                                                                                                                                                                                                                                                                          'use strict';
                                                                                                                                                                                                                                                                          
                                                                                                                                                                                                                                                                          module.exports = function(Chart) {
                                                                                                                                                                                                                                                                          
                                                                                                                                                                                                                                                                          
                                                                                                                                                                                                                                                                          Severity: Minor
                                                                                                                                                                                                                                                                          Found in app/assets/javascripts/blazer/Chart.js - About 1 hr to fix

                                                                                                                                                                                                                                                                            Function linear has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                                                                                                                                                                                                            Open

                                                                                                                                                                                                                                                                                        linear: function(generationOptions, dataRange) {
                                                                                                                                                                                                                                                                                            var ticks = [];
                                                                                                                                                                                                                                                                                            // To get a "nice" value for the tick spacing, we will use the appropriately named
                                                                                                                                                                                                                                                                                            // "nice number" algorithm. See http://stackoverflow.com/questions/8506881/nice-label-algorithm-for-charts-with-minimum-ticks
                                                                                                                                                                                                                                                                                            // for details.
                                                                                                                                                                                                                                                                            Severity: Minor
                                                                                                                                                                                                                                                                            Found in app/assets/javascripts/blazer/Chart.js - About 1 hr to fix

                                                                                                                                                                                                                                                                              Function logarithmic has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                                                                                                                                                                                                              Open

                                                                                                                                                                                                                                                                                          logarithmic: function(generationOptions, dataRange) {
                                                                                                                                                                                                                                                                                              var ticks = [];
                                                                                                                                                                                                                                                                                              var getValueOrDefault = helpers.getValueOrDefault;
                                                                                                                                                                                                                                                                              
                                                                                                                                                                                                                                                                                              // Figure out what the max number of ticks we can support it is based on the size of
                                                                                                                                                                                                                                                                              Severity: Minor
                                                                                                                                                                                                                                                                              Found in app/assets/javascripts/blazer/Chart.js - About 1 hr to fix

                                                                                                                                                                                                                                                                                Function updateElement has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                                                                                                                                                                                                                Open

                                                                                                                                                                                                                                                                                        updateElement: function(rectangle, index, reset) {
                                                                                                                                                                                                                                                                                            var me = this;
                                                                                                                                                                                                                                                                                            var meta = me.getMeta();
                                                                                                                                                                                                                                                                                            var xScale = me.getScaleForId(meta.xAxisID);
                                                                                                                                                                                                                                                                                            var yScale = me.getScaleForId(meta.yAxisID);
                                                                                                                                                                                                                                                                                Severity: Minor
                                                                                                                                                                                                                                                                                Found in app/assets/javascripts/blazer/Chart.js - About 1 hr to fix

                                                                                                                                                                                                                                                                                  Function hwb2rgb has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                                                                                                                                                                                                                  Open

                                                                                                                                                                                                                                                                                  function hwb2rgb(hwb) {
                                                                                                                                                                                                                                                                                    var h = hwb[0] / 360,
                                                                                                                                                                                                                                                                                        wh = hwb[1] / 100,
                                                                                                                                                                                                                                                                                        bl = hwb[2] / 100,
                                                                                                                                                                                                                                                                                        ratio = wh + bl,
                                                                                                                                                                                                                                                                                  Severity: Minor
                                                                                                                                                                                                                                                                                  Found in app/assets/javascripts/blazer/Chart.js - About 1 hr to fix

                                                                                                                                                                                                                                                                                    Function updateElement has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                                                                                                                                                                                                                    Open

                                                                                                                                                                                                                                                                                            updateElement: function(rectangle, index, reset) {
                                                                                                                                                                                                                                                                                                var me = this;
                                                                                                                                                                                                                                                                                                var meta = me.getMeta();
                                                                                                                                                                                                                                                                                                var xScale = me.getScaleForId(meta.xAxisID);
                                                                                                                                                                                                                                                                                                var yScale = me.getScaleForId(meta.yAxisID);
                                                                                                                                                                                                                                                                                    Severity: Minor
                                                                                                                                                                                                                                                                                    Found in app/assets/javascripts/blazer/Chart.js - About 1 hr to fix

                                                                                                                                                                                                                                                                                      Function calculatePointY has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                                                                                                                                                                                                                      Open

                                                                                                                                                                                                                                                                                              calculatePointY: function(value, index, datasetIndex) {
                                                                                                                                                                                                                                                                                                  var me = this;
                                                                                                                                                                                                                                                                                                  var chart = me.chart;
                                                                                                                                                                                                                                                                                                  var meta = me.getMeta();
                                                                                                                                                                                                                                                                                                  var yScale = me.getScaleForId(meta.yAxisID);
                                                                                                                                                                                                                                                                                      Severity: Minor
                                                                                                                                                                                                                                                                                      Found in app/assets/javascripts/blazer/Chart.js - About 1 hr to fix

                                                                                                                                                                                                                                                                                        Function handleEvent has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                                                                                                                                                                                                                        Open

                                                                                                                                                                                                                                                                                                handleEvent: function(e) {
                                                                                                                                                                                                                                                                                                    var me = this;
                                                                                                                                                                                                                                                                                                    var options = me.options || {};
                                                                                                                                                                                                                                                                                                    var hoverOptions = options.hover;
                                                                                                                                                                                                                                                                                                    var changed = false;
                                                                                                                                                                                                                                                                                        Severity: Minor
                                                                                                                                                                                                                                                                                        Found in app/assets/javascripts/blazer/Chart.js - About 1 hr to fix

                                                                                                                                                                                                                                                                                          Function drawLegendBox has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                                                                                                                                                                                                                          Open

                                                                                                                                                                                                                                                                                                          var drawLegendBox = function(x, y, legendItem) {
                                                                                                                                                                                                                                                                                                              if (isNaN(boxWidth) || boxWidth <= 0) {
                                                                                                                                                                                                                                                                                                                  return;
                                                                                                                                                                                                                                                                                                              }
                                                                                                                                                                                                                                                                                          
                                                                                                                                                                                                                                                                                          
                                                                                                                                                                                                                                                                                          Severity: Minor
                                                                                                                                                                                                                                                                                          Found in app/assets/javascripts/blazer/Chart.js - About 1 hr to fix

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

                                                                                                                                                                                                                                                                                            function rgb2hsl(rgb) {
                                                                                                                                                                                                                                                                                              var r = rgb[0]/255,
                                                                                                                                                                                                                                                                                                  g = rgb[1]/255,
                                                                                                                                                                                                                                                                                                  b = rgb[2]/255,
                                                                                                                                                                                                                                                                                                  min = Math.min(r, g, b),
                                                                                                                                                                                                                                                                                            Severity: Minor
                                                                                                                                                                                                                                                                                            Found in app/assets/javascripts/blazer/Chart.js - About 1 hr to fix

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

                                                                                                                                                                                                                                                                                              module.exports = function(Chart) {
                                                                                                                                                                                                                                                                                              
                                                                                                                                                                                                                                                                                                  var helpers = Chart.helpers;
                                                                                                                                                                                                                                                                                              
                                                                                                                                                                                                                                                                                                  Chart.scaleService = {
                                                                                                                                                                                                                                                                                              Severity: Minor
                                                                                                                                                                                                                                                                                              Found in app/assets/javascripts/blazer/Chart.js - About 1 hr to fix

                                                                                                                                                                                                                                                                                                Function drawRoundedRectangle has 6 arguments (exceeds 4 allowed). Consider refactoring.
                                                                                                                                                                                                                                                                                                Open

                                                                                                                                                                                                                                                                                                    helpers.drawRoundedRectangle = function(ctx, x, y, width, height, radius) {
                                                                                                                                                                                                                                                                                                Severity: Minor
                                                                                                                                                                                                                                                                                                Found in app/assets/javascripts/blazer/Chart.js - About 45 mins to fix

                                                                                                                                                                                                                                                                                                  Avoid deeply nested control flow statements.
                                                                                                                                                                                                                                                                                                  Open

                                                                                                                                                                                                                                                                                                                              if (lastDrawnIndex !== (index - 1)) {
                                                                                                                                                                                                                                                                                                                                  // There was a gap and this is the first point after the gap. If we've never drawn a point, this is a special case.
                                                                                                                                                                                                                                                                                                                                  // If the first data point is NaN, then there is no real gap to skip
                                                                                                                                                                                                                                                                                                                                  if (spanGaps && lastDrawnIndex !== -1) {
                                                                                                                                                                                                                                                                                                                                      // We are spanning the gap, so simple draw a line to this point
                                                                                                                                                                                                                                                                                                  Severity: Major
                                                                                                                                                                                                                                                                                                  Found in app/assets/javascripts/blazer/Chart.js - About 45 mins to fix

                                                                                                                                                                                                                                                                                                    Avoid deeply nested control flow statements.
                                                                                                                                                                                                                                                                                                    Open

                                                                                                                                                                                                                                                                                                                                if (!spanGaps && lastDrawnIndex === (index - 1)) {
                                                                                                                                                                                                                                                                                                                                    if (loop) {
                                                                                                                                                                                                                                                                                                                                        ctx.lineTo(fillPoint.x, fillPoint.y);
                                                                                                                                                                                                                                                                                                                                    } else {
                                                                                                                                                                                                                                                                                                                                        ctx.lineTo(previous._view.x, fillPoint);
                                                                                                                                                                                                                                                                                                    Severity: Major
                                                                                                                                                                                                                                                                                                    Found in app/assets/javascripts/blazer/Chart.js - About 45 mins to fix

                                                                                                                                                                                                                                                                                                      Avoid deeply nested control flow statements.
                                                                                                                                                                                                                                                                                                      Open

                                                                                                                                                                                                                                                                                                                                  if (unitDefinition.steps[idx] >= Math.ceil(me.scaleSizeInUnits / labelCapacity)) {
                                                                                                                                                                                                                                                                                                                                      me.unitScale = helpers.getValueOrDefault(me.options.time.unitStepSize, unitDefinition.steps[idx]);
                                                                                                                                                                                                                                                                                                                                      break;
                                                                                                                                                                                                                                                                                                                                  }
                                                                                                                                                                                                                                                                                                      Severity: Major
                                                                                                                                                                                                                                                                                                      Found in app/assets/javascripts/blazer/Chart.js - About 45 mins to fix

                                                                                                                                                                                                                                                                                                        Avoid deeply nested control flow statements.
                                                                                                                                                                                                                                                                                                        Open

                                                                                                                                                                                                                                                                                                           else if (match = string.match(keyword)) {
                                                                                                                                                                                                                                                                                                              if (match[1] == "transparent") {
                                                                                                                                                                                                                                                                                                                 return [0, 0, 0, 0];
                                                                                                                                                                                                                                                                                                              }
                                                                                                                                                                                                                                                                                                              rgb = colorNames[match[1]];
                                                                                                                                                                                                                                                                                                        Severity: Major
                                                                                                                                                                                                                                                                                                        Found in app/assets/javascripts/blazer/Chart.js - About 45 mins to fix

                                                                                                                                                                                                                                                                                                          Avoid deeply nested control flow statements.
                                                                                                                                                                                                                                                                                                          Open

                                                                                                                                                                                                                                                                                                                for (var i = 0; i < rgb.length; i++) {
                                                                                                                                                                                                                                                                                                                   rgb[i] = Math.round(parseFloat(match[i + 1]) * 2.55);
                                                                                                                                                                                                                                                                                                                }
                                                                                                                                                                                                                                                                                                          Severity: Major
                                                                                                                                                                                                                                                                                                          Found in app/assets/javascripts/blazer/Chart.js - About 45 mins to fix

                                                                                                                                                                                                                                                                                                            Consider simplifying this complex logical expression.
                                                                                                                                                                                                                                                                                                            Open

                                                                                                                                                                                                                                                                                                                        if (animationOptions && ((typeof duration !== 'undefined' && duration !== 0) || (typeof duration === 'undefined' && animationOptions.duration !== 0))) {
                                                                                                                                                                                                                                                                                                                            var animation = new Chart.Animation();
                                                                                                                                                                                                                                                                                                                            animation.numSteps = (duration || animationOptions.duration) / 16.66; // 60 fps
                                                                                                                                                                                                                                                                                                                            animation.easing = animationOptions.easing;
                                                                                                                                                                                                                                                                                                            
                                                                                                                                                                                                                                                                                                            
                                                                                                                                                                                                                                                                                                            Severity: Major
                                                                                                                                                                                                                                                                                                            Found in app/assets/javascripts/blazer/Chart.js - About 40 mins to fix

                                                                                                                                                                                                                                                                                                              Consider simplifying this complex logical expression.
                                                                                                                                                                                                                                                                                                              Open

                                                                                                                                                                                                                                                                                                                              } else if (baseHasProperty
                                                                                                                                                                                                                                                                                                                                      && typeof baseVal === 'object'
                                                                                                                                                                                                                                                                                                                                      && !helpers.isArray(baseVal)
                                                                                                                                                                                                                                                                                                                                      && baseVal !== null
                                                                                                                                                                                                                                                                                                                                      && typeof value === 'object'
                                                                                                                                                                                                                                                                                                              Severity: Major
                                                                                                                                                                                                                                                                                                              Found in app/assets/javascripts/blazer/Chart.js - About 40 mins to fix

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

                                                                                                                                                                                                                                                                                                                    helpers.drawPoint = function(ctx, pointStyle, radius, x, y) {
                                                                                                                                                                                                                                                                                                                Severity: Minor
                                                                                                                                                                                                                                                                                                                Found in app/assets/javascripts/blazer/Chart.js - About 35 mins to fix

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

                                                                                                                                                                                                                                                                                                                      function determineLimits(angle, pos, size, min, max) {
                                                                                                                                                                                                                                                                                                                  Severity: Minor
                                                                                                                                                                                                                                                                                                                  Found in app/assets/javascripts/blazer/Chart.js - About 35 mins to fix

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

                                                                                                                                                                                                                                                                                                                        helpers.measureText = function(ctx, data, gc, longest, string) {
                                                                                                                                                                                                                                                                                                                    Severity: Minor
                                                                                                                                                                                                                                                                                                                    Found in app/assets/javascripts/blazer/Chart.js - About 35 mins to fix

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

                                                                                                                                                                                                                                                                                                                          function createEvent(type, chart, x, y, native) {
                                                                                                                                                                                                                                                                                                                      Severity: Minor
                                                                                                                                                                                                                                                                                                                      Found in app/assets/javascripts/blazer/Chart.js - About 35 mins to fix

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

                                                                                                                                                                                                                                                                                                                                drawBackground: function(pt, vm, ctx, tooltipSize, opacity) {
                                                                                                                                                                                                                                                                                                                        Severity: Minor
                                                                                                                                                                                                                                                                                                                        Found in app/assets/javascripts/blazer/Chart.js - About 35 mins to fix

                                                                                                                                                                                                                                                                                                                          Avoid too many return statements within this function.
                                                                                                                                                                                                                                                                                                                          Open

                                                                                                                                                                                                                                                                                                                                      return rawValue;
                                                                                                                                                                                                                                                                                                                          Severity: Major
                                                                                                                                                                                                                                                                                                                          Found in app/assets/javascripts/blazer/Chart.js - About 30 mins to fix

                                                                                                                                                                                                                                                                                                                            Avoid too many return statements within this function.
                                                                                                                                                                                                                                                                                                                            Open

                                                                                                                                                                                                                                                                                                                                            return me.options.time.format(label);
                                                                                                                                                                                                                                                                                                                            Severity: Major
                                                                                                                                                                                                                                                                                                                            Found in app/assets/javascripts/blazer/Chart.js - About 30 mins to fix

                                                                                                                                                                                                                                                                                                                              Avoid too many return statements within this function.
                                                                                                                                                                                                                                                                                                                              Open

                                                                                                                                                                                                                                                                                                                                          return moment(label, me.options.time.format);
                                                                                                                                                                                                                                                                                                                              Severity: Major
                                                                                                                                                                                                                                                                                                                              Found in app/assets/javascripts/blazer/Chart.js - About 30 mins to fix

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

                                                                                                                                                                                                                                                                                                                                        calculateBarY: function(index, datasetIndex) {
                                                                                                                                                                                                                                                                                                                                            var me = this;
                                                                                                                                                                                                                                                                                                                                            var meta = me.getMeta();
                                                                                                                                                                                                                                                                                                                                            var yScale = me.getScaleForId(meta.yAxisID);
                                                                                                                                                                                                                                                                                                                                            var value = Number(me.getDataset().data[index]);
                                                                                                                                                                                                                                                                                                                                Severity: Major
                                                                                                                                                                                                                                                                                                                                Found in app/assets/javascripts/blazer/Chart.js and 1 other location - About 2 days to fix
                                                                                                                                                                                                                                                                                                                                app/assets/javascripts/blazer/Chart.js on lines 2333..2366

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

                                                                                                                                                                                                                                                                                                                                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

                                                                                                                                                                                                                                                                                                                                        calculateBarX: function(index, datasetIndex) {
                                                                                                                                                                                                                                                                                                                                            var me = this;
                                                                                                                                                                                                                                                                                                                                            var meta = me.getMeta();
                                                                                                                                                                                                                                                                                                                                            var xScale = me.getScaleForId(meta.xAxisID);
                                                                                                                                                                                                                                                                                                                                            var value = Number(me.getDataset().data[index]);
                                                                                                                                                                                                                                                                                                                                Severity: Major
                                                                                                                                                                                                                                                                                                                                Found in app/assets/javascripts/blazer/Chart.js and 1 other location - About 2 days to fix
                                                                                                                                                                                                                                                                                                                                app/assets/javascripts/blazer/Chart.js on lines 2056..2089

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

                                                                                                                                                                                                                                                                                                                                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

                                                                                                                                                                                                                                                                                                                                        getStackIndex: function(datasetIndex) {
                                                                                                                                                                                                                                                                                                                                            var me = this;
                                                                                                                                                                                                                                                                                                                                            var meta = me.chart.getDatasetMeta(datasetIndex);
                                                                                                                                                                                                                                                                                                                                            var yScale = me.getScaleForId(meta.yAxisID);
                                                                                                                                                                                                                                                                                                                                            var dsMeta, j;
                                                                                                                                                                                                                                                                                                                                Severity: Major
                                                                                                                                                                                                                                                                                                                                Found in app/assets/javascripts/blazer/Chart.js and 1 other location - About 1 day to fix
                                                                                                                                                                                                                                                                                                                                app/assets/javascripts/blazer/Chart.js on lines 2313..2331

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

                                                                                                                                                                                                                                                                                                                                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

                                                                                                                                                                                                                                                                                                                                        getStackIndex: function(datasetIndex) {
                                                                                                                                                                                                                                                                                                                                            var me = this;
                                                                                                                                                                                                                                                                                                                                            var meta = me.chart.getDatasetMeta(datasetIndex);
                                                                                                                                                                                                                                                                                                                                            var xScale = me.getScaleForId(meta.xAxisID);
                                                                                                                                                                                                                                                                                                                                            var dsMeta, j;
                                                                                                                                                                                                                                                                                                                                Severity: Major
                                                                                                                                                                                                                                                                                                                                Found in app/assets/javascripts/blazer/Chart.js and 1 other location - About 1 day to fix
                                                                                                                                                                                                                                                                                                                                app/assets/javascripts/blazer/Chart.js on lines 2020..2038

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

                                                                                                                                                                                                                                                                                                                                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

                                                                                                                                                                                                                                                                                                                                        getStackCount: function() {
                                                                                                                                                                                                                                                                                                                                            var me = this;
                                                                                                                                                                                                                                                                                                                                            var meta = me.getMeta();
                                                                                                                                                                                                                                                                                                                                            var xScale = me.getScaleForId(meta.xAxisID);
                                                                                                                                                                                                                                                                                                                                
                                                                                                                                                                                                                                                                                                                                
                                                                                                                                                                                                                                                                                                                                Severity: Major
                                                                                                                                                                                                                                                                                                                                Found in app/assets/javascripts/blazer/Chart.js and 1 other location - About 1 day to fix
                                                                                                                                                                                                                                                                                                                                app/assets/javascripts/blazer/Chart.js on lines 1892..1909

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

                                                                                                                                                                                                                                                                                                                                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

                                                                                                                                                                                                                                                                                                                                        getStackCount: function() {
                                                                                                                                                                                                                                                                                                                                            var me = this;
                                                                                                                                                                                                                                                                                                                                            var meta = me.getMeta();
                                                                                                                                                                                                                                                                                                                                            var yScale = me.getScaleForId(meta.yAxisID);
                                                                                                                                                                                                                                                                                                                                
                                                                                                                                                                                                                                                                                                                                
                                                                                                                                                                                                                                                                                                                                Severity: Major
                                                                                                                                                                                                                                                                                                                                Found in app/assets/javascripts/blazer/Chart.js and 1 other location - About 1 day to fix
                                                                                                                                                                                                                                                                                                                                app/assets/javascripts/blazer/Chart.js on lines 2192..2209

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

                                                                                                                                                                                                                                                                                                                                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

                                                                                                                                                                                                                                                                                                                                        getRuler: function() {
                                                                                                                                                                                                                                                                                                                                            var me = this;
                                                                                                                                                                                                                                                                                                                                            var meta = me.getMeta();
                                                                                                                                                                                                                                                                                                                                            var yScale = me.getScaleForId(meta.yAxisID);
                                                                                                                                                                                                                                                                                                                                            var stackCount = me.getStackCount();
                                                                                                                                                                                                                                                                                                                                Severity: Major
                                                                                                                                                                                                                                                                                                                                Found in app/assets/javascripts/blazer/Chart.js and 1 other location - About 1 day to fix
                                                                                                                                                                                                                                                                                                                                app/assets/javascripts/blazer/Chart.js on lines 1984..2007

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

                                                                                                                                                                                                                                                                                                                                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

                                                                                                                                                                                                                                                                                                                                        getRuler: function() {
                                                                                                                                                                                                                                                                                                                                            var me = this;
                                                                                                                                                                                                                                                                                                                                            var meta = me.getMeta();
                                                                                                                                                                                                                                                                                                                                            var xScale = me.getScaleForId(meta.xAxisID);
                                                                                                                                                                                                                                                                                                                                            var stackCount = me.getStackCount();
                                                                                                                                                                                                                                                                                                                                Severity: Major
                                                                                                                                                                                                                                                                                                                                Found in app/assets/javascripts/blazer/Chart.js and 1 other location - About 1 day to fix
                                                                                                                                                                                                                                                                                                                                app/assets/javascripts/blazer/Chart.js on lines 2277..2300

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

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

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

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

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

                                                                                                                                                                                                                                                                                                                                Refactorings

                                                                                                                                                                                                                                                                                                                                Further Reading

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

                                                                                                                                                                                                                                                                                                                                            if (xScale.options.stacked ||
                                                                                                                                                                                                                                                                                                                                                (xScale.options.stacked === undefined && meta.stack !== undefined)) {
                                                                                                                                                                                                                                                                                                                                                var chart = me.chart;
                                                                                                                                                                                                                                                                                                                                                var datasets = chart.data.datasets;
                                                                                                                                                                                                                                                                                                                                                var value = Number(datasets[datasetIndex].data[index]);
                                                                                                                                                                                                                                                                                                                                Severity: Major
                                                                                                                                                                                                                                                                                                                                Found in app/assets/javascripts/blazer/Chart.js and 1 other location - About 1 day to fix
                                                                                                                                                                                                                                                                                                                                app/assets/javascripts/blazer/Chart.js on lines 1962..1979

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

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

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

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

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

                                                                                                                                                                                                                                                                                                                                Refactorings

                                                                                                                                                                                                                                                                                                                                Further Reading

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

                                                                                                                                                                                                                                                                                                                                            if ((yScale.options.stacked === true) ||
                                                                                                                                                                                                                                                                                                                                                (yScale.options.stacked === undefined && meta.stack !== undefined)) {
                                                                                                                                                                                                                                                                                                                                                var chart = me.chart;
                                                                                                                                                                                                                                                                                                                                                var datasets = chart.data.datasets;
                                                                                                                                                                                                                                                                                                                                                var value = Number(datasets[datasetIndex].data[index]);
                                                                                                                                                                                                                                                                                                                                Severity: Major
                                                                                                                                                                                                                                                                                                                                Found in app/assets/javascripts/blazer/Chart.js and 1 other location - About 1 day to fix
                                                                                                                                                                                                                                                                                                                                app/assets/javascripts/blazer/Chart.js on lines 2255..2272

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

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

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

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

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

                                                                                                                                                                                                                                                                                                                                Refactorings

                                                                                                                                                                                                                                                                                                                                Further Reading

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

                                                                                                                                                                                                                                                                                                                                        legendCallback: function(chart) {
                                                                                                                                                                                                                                                                                                                                            var text = [];
                                                                                                                                                                                                                                                                                                                                            text.push('<ul class="' + chart.id + '-legend">');
                                                                                                                                                                                                                                                                                                                                
                                                                                                                                                                                                                                                                                                                                            var data = chart.data;
                                                                                                                                                                                                                                                                                                                                Severity: Major
                                                                                                                                                                                                                                                                                                                                Found in app/assets/javascripts/blazer/Chart.js and 1 other location - About 1 day to fix
                                                                                                                                                                                                                                                                                                                                app/assets/javascripts/blazer/Chart.js on lines 2529..2549

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

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

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

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

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

                                                                                                                                                                                                                                                                                                                                Refactorings

                                                                                                                                                                                                                                                                                                                                Further Reading

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

                                                                                                                                                                                                                                                                                                                                        legendCallback: function(chart) {
                                                                                                                                                                                                                                                                                                                                            var text = [];
                                                                                                                                                                                                                                                                                                                                            text.push('<ul class="' + chart.id + '-legend">');
                                                                                                                                                                                                                                                                                                                                
                                                                                                                                                                                                                                                                                                                                            var data = chart.data;
                                                                                                                                                                                                                                                                                                                                Severity: Major
                                                                                                                                                                                                                                                                                                                                Found in app/assets/javascripts/blazer/Chart.js and 1 other location - About 1 day to fix
                                                                                                                                                                                                                                                                                                                                app/assets/javascripts/blazer/Chart.js on lines 3181..3201

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

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

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

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

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

                                                                                                                                                                                                                                                                                                                                Refactorings

                                                                                                                                                                                                                                                                                                                                Further Reading

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

                                                                                                                                                                                                                                                                                                                                        setDimensions: function() {
                                                                                                                                                                                                                                                                                                                                            var me = this;
                                                                                                                                                                                                                                                                                                                                            // Set the unconstrained dimension before label rotation
                                                                                                                                                                                                                                                                                                                                            if (me.isHorizontal()) {
                                                                                                                                                                                                                                                                                                                                                // Reset position before calculating rotation
                                                                                                                                                                                                                                                                                                                                Severity: Major
                                                                                                                                                                                                                                                                                                                                Found in app/assets/javascripts/blazer/Chart.js and 1 other location - About 1 day to fix
                                                                                                                                                                                                                                                                                                                                app/assets/javascripts/blazer/Chart.js on lines 6830..6857

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

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

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

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

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

                                                                                                                                                                                                                                                                                                                                Refactorings

                                                                                                                                                                                                                                                                                                                                Further Reading

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

                                                                                                                                                                                                                                                                                                                                        setDimensions: function() {
                                                                                                                                                                                                                                                                                                                                            var me = this;
                                                                                                                                                                                                                                                                                                                                            // Set the unconstrained dimension before label rotation
                                                                                                                                                                                                                                                                                                                                            if (me.isHorizontal()) {
                                                                                                                                                                                                                                                                                                                                                // Reset position before calculating rotation
                                                                                                                                                                                                                                                                                                                                Severity: Major
                                                                                                                                                                                                                                                                                                                                Found in app/assets/javascripts/blazer/Chart.js and 1 other location - About 1 day to fix
                                                                                                                                                                                                                                                                                                                                app/assets/javascripts/blazer/Chart.js on lines 8646..8673

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

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

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

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

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

                                                                                                                                                                                                                                                                                                                                Refactorings

                                                                                                                                                                                                                                                                                                                                Further Reading

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

                                                                                                                                                                                                                                                                                                                                        update: function(maxWidth, maxHeight, margins) {
                                                                                                                                                                                                                                                                                                                                            var me = this;
                                                                                                                                                                                                                                                                                                                                
                                                                                                                                                                                                                                                                                                                                            // Update Lifecycle - Probably don't want to ever extend or overwrite this function ;)
                                                                                                                                                                                                                                                                                                                                            me.beforeUpdate();
                                                                                                                                                                                                                                                                                                                                Severity: Major
                                                                                                                                                                                                                                                                                                                                Found in app/assets/javascripts/blazer/Chart.js and 1 other location - About 7 hrs to fix
                                                                                                                                                                                                                                                                                                                                app/assets/javascripts/blazer/Chart.js on lines 6796..6824

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

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

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

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

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

                                                                                                                                                                                                                                                                                                                                Refactorings

                                                                                                                                                                                                                                                                                                                                Further Reading

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

                                                                                                                                                                                                                                                                                                                                        update: function(maxWidth, maxHeight, margins) {
                                                                                                                                                                                                                                                                                                                                            var me = this;
                                                                                                                                                                                                                                                                                                                                
                                                                                                                                                                                                                                                                                                                                            // Update Lifecycle - Probably don't want to ever extend or overwrite this function ;)
                                                                                                                                                                                                                                                                                                                                            me.beforeUpdate();
                                                                                                                                                                                                                                                                                                                                Severity: Major
                                                                                                                                                                                                                                                                                                                                Found in app/assets/javascripts/blazer/Chart.js and 1 other location - About 7 hrs to fix
                                                                                                                                                                                                                                                                                                                                app/assets/javascripts/blazer/Chart.js on lines 8611..8640

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

                                                                                                                                                                                                                                                                                                                                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

                                                                                                                                                                                                                                                                                                                                        calculateBarY: function(index, datasetIndex, ruler) {
                                                                                                                                                                                                                                                                                                                                            var me = this;
                                                                                                                                                                                                                                                                                                                                            var meta = me.getMeta();
                                                                                                                                                                                                                                                                                                                                            var yScale = me.getScaleForId(meta.yAxisID);
                                                                                                                                                                                                                                                                                                                                            var stackIndex = me.getStackIndex(datasetIndex);
                                                                                                                                                                                                                                                                                                                                Severity: Major
                                                                                                                                                                                                                                                                                                                                Found in app/assets/javascripts/blazer/Chart.js and 1 other location - About 7 hrs to fix
                                                                                                                                                                                                                                                                                                                                app/assets/javascripts/blazer/Chart.js on lines 2040..2054

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

                                                                                                                                                                                                                                                                                                                                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

                                                                                                                                                                                                                                                                                                                                        calculateBarX: function(index, datasetIndex, ruler) {
                                                                                                                                                                                                                                                                                                                                            var me = this;
                                                                                                                                                                                                                                                                                                                                            var meta = me.getMeta();
                                                                                                                                                                                                                                                                                                                                            var xScale = me.getScaleForId(meta.xAxisID);
                                                                                                                                                                                                                                                                                                                                            var stackIndex = me.getStackIndex(datasetIndex);
                                                                                                                                                                                                                                                                                                                                Severity: Major
                                                                                                                                                                                                                                                                                                                                Found in app/assets/javascripts/blazer/Chart.js and 1 other location - About 7 hrs to fix
                                                                                                                                                                                                                                                                                                                                app/assets/javascripts/blazer/Chart.js on lines 2368..2382

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

                                                                                                                                                                                                                                                                                                                                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

                                                                                                                                                                                                                                                                                                                                            y: function(chart, e, options) {
                                                                                                                                                                                                                                                                                                                                                var position = getRelativePosition(e, chart.chart);
                                                                                                                                                                                                                                                                                                                                                var items = [];
                                                                                                                                                                                                                                                                                                                                                var intersectsItem = false;
                                                                                                                                                                                                                                                                                                                                
                                                                                                                                                                                                                                                                                                                                
                                                                                                                                                                                                                                                                                                                                Severity: Major
                                                                                                                                                                                                                                                                                                                                Found in app/assets/javascripts/blazer/Chart.js and 1 other location - About 6 hrs to fix
                                                                                                                                                                                                                                                                                                                                app/assets/javascripts/blazer/Chart.js on lines 6214..6235

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

                                                                                                                                                                                                                                                                                                                                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

                                                                                                                                                                                                                                                                                                                                            x: function(chart, e, options) {
                                                                                                                                                                                                                                                                                                                                                var position = getRelativePosition(e, chart.chart);
                                                                                                                                                                                                                                                                                                                                                var items = [];
                                                                                                                                                                                                                                                                                                                                                var intersectsItem = false;
                                                                                                                                                                                                                                                                                                                                
                                                                                                                                                                                                                                                                                                                                
                                                                                                                                                                                                                                                                                                                                Severity: Major
                                                                                                                                                                                                                                                                                                                                Found in app/assets/javascripts/blazer/Chart.js and 1 other location - About 6 hrs to fix
                                                                                                                                                                                                                                                                                                                                app/assets/javascripts/blazer/Chart.js on lines 6245..6266

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

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

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

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

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

                                                                                                                                                                                                                                                                                                                                Refactorings

                                                                                                                                                                                                                                                                                                                                Further Reading

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

                                                                                                                                                                                                                                                                                                                                function getHwb(string) {
                                                                                                                                                                                                                                                                                                                                   if (!string) {
                                                                                                                                                                                                                                                                                                                                      return;
                                                                                                                                                                                                                                                                                                                                   }
                                                                                                                                                                                                                                                                                                                                   var hwb = /^hwb\(\s*([+-]?\d+)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)/;
                                                                                                                                                                                                                                                                                                                                Severity: Major
                                                                                                                                                                                                                                                                                                                                Found in app/assets/javascripts/blazer/Chart.js and 1 other location - About 5 hrs to fix
                                                                                                                                                                                                                                                                                                                                app/assets/javascripts/blazer/Chart.js on lines 95..109

                                                                                                                                                                                                                                                                                                                                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

                                                                                                                                                                                                                                                                                                                                function getHsla(string) {
                                                                                                                                                                                                                                                                                                                                   if (!string) {
                                                                                                                                                                                                                                                                                                                                      return;
                                                                                                                                                                                                                                                                                                                                   }
                                                                                                                                                                                                                                                                                                                                   var hsl = /^hsla?\(\s*([+-]?\d+)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)/;
                                                                                                                                                                                                                                                                                                                                Severity: Major
                                                                                                                                                                                                                                                                                                                                Found in app/assets/javascripts/blazer/Chart.js and 1 other location - About 5 hrs to fix
                                                                                                                                                                                                                                                                                                                                app/assets/javascripts/blazer/Chart.js on lines 111..125

                                                                                                                                                                                                                                                                                                                                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

                                                                                                                                                                                                                                                                                                                                        getPointBorderColor: function(point, index) {
                                                                                                                                                                                                                                                                                                                                            var borderColor = this.chart.options.elements.point.borderColor;
                                                                                                                                                                                                                                                                                                                                            var dataset = this.getDataset();
                                                                                                                                                                                                                                                                                                                                            var custom = point.custom || {};
                                                                                                                                                                                                                                                                                                                                
                                                                                                                                                                                                                                                                                                                                
                                                                                                                                                                                                                                                                                                                                Severity: Major
                                                                                                                                                                                                                                                                                                                                Found in app/assets/javascripts/blazer/Chart.js and 1 other location - About 5 hrs to fix
                                                                                                                                                                                                                                                                                                                                app/assets/javascripts/blazer/Chart.js on lines 2920..2934

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

                                                                                                                                                                                                                                                                                                                                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

                                                                                                                                                                                                                                                                                                                                        getPointBackgroundColor: function(point, index) {
                                                                                                                                                                                                                                                                                                                                            var backgroundColor = this.chart.options.elements.point.backgroundColor;
                                                                                                                                                                                                                                                                                                                                            var dataset = this.getDataset();
                                                                                                                                                                                                                                                                                                                                            var custom = point.custom || {};
                                                                                                                                                                                                                                                                                                                                
                                                                                                                                                                                                                                                                                                                                
                                                                                                                                                                                                                                                                                                                                Severity: Major
                                                                                                                                                                                                                                                                                                                                Found in app/assets/javascripts/blazer/Chart.js and 1 other location - About 5 hrs to fix
                                                                                                                                                                                                                                                                                                                                app/assets/javascripts/blazer/Chart.js on lines 2936..2950

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

                                                                                                                                                                                                                                                                                                                                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

                                                                                                                                                                                                                                                                                                                                        beforeUpdate: function(chartInstance) {
                                                                                                                                                                                                                                                                                                                                            var legendOpts = chartInstance.options.legend;
                                                                                                                                                                                                                                                                                                                                
                                                                                                                                                                                                                                                                                                                                            if (legendOpts) {
                                                                                                                                                                                                                                                                                                                                                legendOpts = helpers.configMerge(Chart.defaults.global.legend, legendOpts);
                                                                                                                                                                                                                                                                                                                                Severity: Major
                                                                                                                                                                                                                                                                                                                                Found in app/assets/javascripts/blazer/Chart.js and 1 other location - About 4 hrs to fix
                                                                                                                                                                                                                                                                                                                                app/assets/javascripts/blazer/Chart.js on lines 8781..8796

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

                                                                                                                                                                                                                                                                                                                                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

                                                                                                                                                                                                                                                                                                                                        beforeUpdate: function(chartInstance) {
                                                                                                                                                                                                                                                                                                                                            var titleOpts = chartInstance.options.title;
                                                                                                                                                                                                                                                                                                                                
                                                                                                                                                                                                                                                                                                                                            if (titleOpts) {
                                                                                                                                                                                                                                                                                                                                                titleOpts = helpers.configMerge(Chart.defaults.global.title, titleOpts);
                                                                                                                                                                                                                                                                                                                                Severity: Major
                                                                                                                                                                                                                                                                                                                                Found in app/assets/javascripts/blazer/Chart.js and 1 other location - About 4 hrs to fix
                                                                                                                                                                                                                                                                                                                                app/assets/javascripts/blazer/Chart.js on lines 7213..7228

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

                                                                                                                                                                                                                                                                                                                                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

                                                                                                                                                                                                                                                                                                                                    helpers.getMaximumHeight = function(domNode) {
                                                                                                                                                                                                                                                                                                                                        var container = domNode.parentNode;
                                                                                                                                                                                                                                                                                                                                        var paddingTop = parseInt(helpers.getStyle(container, 'padding-top'), 10);
                                                                                                                                                                                                                                                                                                                                        var paddingBottom = parseInt(helpers.getStyle(container, 'padding-bottom'), 10);
                                                                                                                                                                                                                                                                                                                                        var h = container.clientHeight - paddingTop - paddingBottom;
                                                                                                                                                                                                                                                                                                                                Severity: Major
                                                                                                                                                                                                                                                                                                                                Found in app/assets/javascripts/blazer/Chart.js and 1 other location - About 4 hrs to fix
                                                                                                                                                                                                                                                                                                                                app/assets/javascripts/blazer/Chart.js on lines 5779..5786

                                                                                                                                                                                                                                                                                                                                Duplicated Code

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

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

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

                                                                                                                                                                                                                                                                                                                                Tuning

                                                                                                                                                                                                                                                                                                                                This issue has a mass of 126.

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

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

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

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

                                                                                                                                                                                                                                                                                                                                Refactorings

                                                                                                                                                                                                                                                                                                                                Further Reading

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

                                                                                                                                                                                                                                                                                                                                    helpers.getMaximumWidth = function(domNode) {
                                                                                                                                                                                                                                                                                                                                        var container = domNode.parentNode;
                                                                                                                                                                                                                                                                                                                                        var paddingLeft = parseInt(helpers.getStyle(container, 'padding-left'), 10);
                                                                                                                                                                                                                                                                                                                                        var paddingRight = parseInt(helpers.getStyle(container, 'padding-right'), 10);
                                                                                                                                                                                                                                                                                                                                        var w = container.clientWidth - paddingLeft - paddingRight;
                                                                                                                                                                                                                                                                                                                                Severity: Major
                                                                                                                                                                                                                                                                                                                                Found in app/assets/javascripts/blazer/Chart.js and 1 other location - About 4 hrs to fix
                                                                                                                                                                                                                                                                                                                                app/assets/javascripts/blazer/Chart.js on lines 5787..5794

                                                                                                                                                                                                                                                                                                                                Duplicated Code

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

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

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

                                                                                                                                                                                                                                                                                                                                Tuning

                                                                                                                                                                                                                                                                                                                                This issue has a mass of 126.

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

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

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

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

                                                                                                                                                                                                                                                                                                                                Refactorings

                                                                                                                                                                                                                                                                                                                                Further Reading

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

                                                                                                                                                                                                                                                                                                                                            if (pointBefore && !pointBefore.model.skip) {
                                                                                                                                                                                                                                                                                                                                                deltaX = (pointCurrent.model.x - pointBefore.model.x) / 3;
                                                                                                                                                                                                                                                                                                                                                pointCurrent.model.controlPointPreviousX = pointCurrent.model.x - deltaX;
                                                                                                                                                                                                                                                                                                                                                pointCurrent.model.controlPointPreviousY = pointCurrent.model.y - deltaX * pointCurrent.mK;
                                                                                                                                                                                                                                                                                                                                            }
                                                                                                                                                                                                                                                                                                                                Severity: Major
                                                                                                                                                                                                                                                                                                                                Found in app/assets/javascripts/blazer/Chart.js and 1 other location - About 3 hrs to fix
                                                                                                                                                                                                                                                                                                                                app/assets/javascripts/blazer/Chart.js on lines 5412..5416

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

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

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

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

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

                                                                                                                                                                                                                                                                                                                                Refactorings

                                                                                                                                                                                                                                                                                                                                Further Reading

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

                                                                                                                                                                                                                                                                                                                                            if (pointAfter && !pointAfter.model.skip) {
                                                                                                                                                                                                                                                                                                                                                deltaX = (pointAfter.model.x - pointCurrent.model.x) / 3;
                                                                                                                                                                                                                                                                                                                                                pointCurrent.model.controlPointNextX = pointCurrent.model.x + deltaX;
                                                                                                                                                                                                                                                                                                                                                pointCurrent.model.controlPointNextY = pointCurrent.model.y + deltaX * pointCurrent.mK;
                                                                                                                                                                                                                                                                                                                                            }
                                                                                                                                                                                                                                                                                                                                Severity: Major
                                                                                                                                                                                                                                                                                                                                Found in app/assets/javascripts/blazer/Chart.js and 1 other location - About 3 hrs to fix
                                                                                                                                                                                                                                                                                                                                app/assets/javascripts/blazer/Chart.js on lines 5407..5411

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

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

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

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

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

                                                                                                                                                                                                                                                                                                                                Refactorings

                                                                                                                                                                                                                                                                                                                                Further Reading

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

                                                                                                                                                                                                                                                                                                                                                    if (newVal === me.end) {
                                                                                                                                                                                                                                                                                                                                                        pixel = me.top;
                                                                                                                                                                                                                                                                                                                                                    } else if (newVal === me.minNotZero) {
                                                                                                                                                                                                                                                                                                                                                        pixel = me.top + innerDimension * 0.02;
                                                                                                                                                                                                                                                                                                                                                    } else {
                                                                                                                                                                                                                                                                                                                                Severity: Major
                                                                                                                                                                                                                                                                                                                                Found in app/assets/javascripts/blazer/Chart.js and 1 other location - About 3 hrs to fix
                                                                                                                                                                                                                                                                                                                                app/assets/javascripts/blazer/Chart.js on lines 11252..11258

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

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

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

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

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

                                                                                                                                                                                                                                                                                                                                Refactorings

                                                                                                                                                                                                                                                                                                                                Further Reading

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

                                                                                                                                                                                                                                                                                                                                                    if (newVal === start) {
                                                                                                                                                                                                                                                                                                                                                        pixel = me.bottom;
                                                                                                                                                                                                                                                                                                                                                    } else if (newVal === me.minNotZero) {
                                                                                                                                                                                                                                                                                                                                                        pixel = me.bottom - innerDimension * 0.02;
                                                                                                                                                                                                                                                                                                                                                    } else {
                                                                                                                                                                                                                                                                                                                                Severity: Major
                                                                                                                                                                                                                                                                                                                                Found in app/assets/javascripts/blazer/Chart.js and 1 other location - About 3 hrs to fix
                                                                                                                                                                                                                                                                                                                                app/assets/javascripts/blazer/Chart.js on lines 11261..11267

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

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

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

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

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

                                                                                                                                                                                                                                                                                                                                Refactorings

                                                                                                                                                                                                                                                                                                                                Further Reading

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

                                                                                                                                                                                                                                                                                                                                  if (max == min)
                                                                                                                                                                                                                                                                                                                                    h = 0;
                                                                                                                                                                                                                                                                                                                                  else if (r == max)
                                                                                                                                                                                                                                                                                                                                    h = (g - b) / delta;
                                                                                                                                                                                                                                                                                                                                  else if (g == max)
                                                                                                                                                                                                                                                                                                                                Severity: Major
                                                                                                                                                                                                                                                                                                                                Found in app/assets/javascripts/blazer/Chart.js and 1 other location - About 3 hrs to fix
                                                                                                                                                                                                                                                                                                                                app/assets/javascripts/blazer/Chart.js on lines 828..835

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

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

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

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

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

                                                                                                                                                                                                                                                                                                                                Refactorings

                                                                                                                                                                                                                                                                                                                                Further Reading

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

                                                                                                                                                                                                                                                                                                                                            if (hasStacks === undefined) {
                                                                                                                                                                                                                                                                                                                                                helpers.each(datasets, function(dataset, datasetIndex) {
                                                                                                                                                                                                                                                                                                                                                    if (hasStacks) {
                                                                                                                                                                                                                                                                                                                                                        return;
                                                                                                                                                                                                                                                                                                                                                    }
                                                                                                                                                                                                                                                                                                                                Severity: Major
                                                                                                                                                                                                                                                                                                                                Found in app/assets/javascripts/blazer/Chart.js and 1 other location - About 3 hrs to fix
                                                                                                                                                                                                                                                                                                                                app/assets/javascripts/blazer/Chart.js on lines 11085..11097

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

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

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

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

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

                                                                                                                                                                                                                                                                                                                                Refactorings

                                                                                                                                                                                                                                                                                                                                Further Reading

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

                                                                                                                                                                                                                                                                                                                                  if (max == min)
                                                                                                                                                                                                                                                                                                                                    h = 0;
                                                                                                                                                                                                                                                                                                                                  else if (r == max)
                                                                                                                                                                                                                                                                                                                                    h = (g - b) / delta;
                                                                                                                                                                                                                                                                                                                                  else if (g == max)
                                                                                                                                                                                                                                                                                                                                Severity: Major
                                                                                                                                                                                                                                                                                                                                Found in app/assets/javascripts/blazer/Chart.js and 1 other location - About 3 hrs to fix
                                                                                                                                                                                                                                                                                                                                app/assets/javascripts/blazer/Chart.js on lines 788..795

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

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

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

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

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

                                                                                                                                                                                                                                                                                                                                Refactorings

                                                                                                                                                                                                                                                                                                                                Further Reading

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

                                                                                                                                                                                                                                                                                                                                            if (hasStacks === undefined) {
                                                                                                                                                                                                                                                                                                                                                helpers.each(datasets, function(dataset, datasetIndex) {
                                                                                                                                                                                                                                                                                                                                                    if (hasStacks) {
                                                                                                                                                                                                                                                                                                                                                        return;
                                                                                                                                                                                                                                                                                                                                                    }
                                                                                                                                                                                                                                                                                                                                Severity: Major
                                                                                                                                                                                                                                                                                                                                Found in app/assets/javascripts/blazer/Chart.js and 1 other location - About 3 hrs to fix
                                                                                                                                                                                                                                                                                                                                app/assets/javascripts/blazer/Chart.js on lines 10795..10807

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

                                                                                                                                                                                                                                                                                                                                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

                                                                                                                                                                                                                                                                                                                                            helpers.each(topBoxes.concat(bottomBoxes), function(horizontalBox) {
                                                                                                                                                                                                                                                                                                                                                if (horizontalBox.getPadding) {
                                                                                                                                                                                                                                                                                                                                                    var boxPadding = horizontalBox.getPadding();
                                                                                                                                                                                                                                                                                                                                                    maxHorizontalLeftPadding = Math.max(maxHorizontalLeftPadding, boxPadding.left);
                                                                                                                                                                                                                                                                                                                                                    maxHorizontalRightPadding = Math.max(maxHorizontalRightPadding, boxPadding.right);
                                                                                                                                                                                                                                                                                                                                Severity: Major
                                                                                                                                                                                                                                                                                                                                Found in app/assets/javascripts/blazer/Chart.js and 1 other location - About 2 hrs to fix
                                                                                                                                                                                                                                                                                                                                app/assets/javascripts/blazer/Chart.js on lines 6500..6506

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

                                                                                                                                                                                                                                                                                                                                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

                                                                                                                                                                                                                                                                                                                                            helpers.each(leftBoxes.concat(rightBoxes), function(verticalBox) {
                                                                                                                                                                                                                                                                                                                                                if (verticalBox.getPadding) {
                                                                                                                                                                                                                                                                                                                                                    var boxPadding = verticalBox.getPadding();
                                                                                                                                                                                                                                                                                                                                                    maxVerticalTopPadding = Math.max(maxVerticalTopPadding, boxPadding.top);
                                                                                                                                                                                                                                                                                                                                                    maxVerticalBottomPadding = Math.max(maxVerticalBottomPadding, boxPadding.bottom);
                                                                                                                                                                                                                                                                                                                                Severity: Major
                                                                                                                                                                                                                                                                                                                                Found in app/assets/javascripts/blazer/Chart.js and 1 other location - About 2 hrs to fix
                                                                                                                                                                                                                                                                                                                                app/assets/javascripts/blazer/Chart.js on lines 6492..6498

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

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

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

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

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

                                                                                                                                                                                                                                                                                                                                Refactorings

                                                                                                                                                                                                                                                                                                                                Further Reading

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

                                                                                                                                                                                                                                                                                                                                function rgbString(rgba, alpha) {
                                                                                                                                                                                                                                                                                                                                   if (alpha < 1 || (rgba[3] && rgba[3] < 1)) {
                                                                                                                                                                                                                                                                                                                                      return rgbaString(rgba, alpha);
                                                                                                                                                                                                                                                                                                                                   }
                                                                                                                                                                                                                                                                                                                                   return "rgb(" + rgba[0] + ", " + rgba[1] + ", " + rgba[2] + ")";
                                                                                                                                                                                                                                                                                                                                Severity: Major
                                                                                                                                                                                                                                                                                                                                Found in app/assets/javascripts/blazer/Chart.js and 1 other location - About 2 hrs to fix
                                                                                                                                                                                                                                                                                                                                app/assets/javascripts/blazer/Chart.js on lines 189..194

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

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

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

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

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

                                                                                                                                                                                                                                                                                                                                Refactorings

                                                                                                                                                                                                                                                                                                                                Further Reading

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

                                                                                                                                                                                                                                                                                                                                function hslString(hsla, alpha) {
                                                                                                                                                                                                                                                                                                                                   if (alpha < 1 || (hsla[3] && hsla[3] < 1)) {
                                                                                                                                                                                                                                                                                                                                      return hslaString(hsla, alpha);
                                                                                                                                                                                                                                                                                                                                   }
                                                                                                                                                                                                                                                                                                                                   return "hsl(" + hsla[0] + ", " + hsla[1] + "%, " + hsla[2] + "%)";
                                                                                                                                                                                                                                                                                                                                Severity: Major
                                                                                                                                                                                                                                                                                                                                Found in app/assets/javascripts/blazer/Chart.js and 1 other location - About 2 hrs to fix
                                                                                                                                                                                                                                                                                                                                app/assets/javascripts/blazer/Chart.js on lines 156..161

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

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

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

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

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

                                                                                                                                                                                                                                                                                                                                Refactorings

                                                                                                                                                                                                                                                                                                                                Further Reading

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

                                                                                                                                                                                                                                                                                                                                function rgbaString(rgba, alpha) {
                                                                                                                                                                                                                                                                                                                                   if (alpha === undefined) {
                                                                                                                                                                                                                                                                                                                                      alpha = (rgba[3] !== undefined ? rgba[3] : 1);
                                                                                                                                                                                                                                                                                                                                   }
                                                                                                                                                                                                                                                                                                                                   return "rgba(" + rgba[0] + ", " + rgba[1] + ", " + rgba[2]
                                                                                                                                                                                                                                                                                                                                Severity: Major
                                                                                                                                                                                                                                                                                                                                Found in app/assets/javascripts/blazer/Chart.js and 1 other location - About 2 hrs to fix
                                                                                                                                                                                                                                                                                                                                app/assets/javascripts/blazer/Chart.js on lines 196..202

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

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

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

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

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

                                                                                                                                                                                                                                                                                                                                Refactorings

                                                                                                                                                                                                                                                                                                                                Further Reading

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

                                                                                                                                                                                                                                                                                                                                function hslaString(hsla, alpha) {
                                                                                                                                                                                                                                                                                                                                   if (alpha === undefined) {
                                                                                                                                                                                                                                                                                                                                      alpha = (hsla[3] !== undefined ? hsla[3] : 1);
                                                                                                                                                                                                                                                                                                                                   }
                                                                                                                                                                                                                                                                                                                                   return "hsla(" + hsla[0] + ", " + hsla[1] + "%, " + hsla[2] + "%, "
                                                                                                                                                                                                                                                                                                                                Severity: Major
                                                                                                                                                                                                                                                                                                                                Found in app/assets/javascripts/blazer/Chart.js and 1 other location - About 2 hrs to fix
                                                                                                                                                                                                                                                                                                                                app/assets/javascripts/blazer/Chart.js on lines 163..169

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

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

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

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

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

                                                                                                                                                                                                                                                                                                                                Refactorings

                                                                                                                                                                                                                                                                                                                                Further Reading

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

                                                                                                                                                                                                                                                                                                                                            if (tickOpts.reverse) {
                                                                                                                                                                                                                                                                                                                                                ticks.reverse();
                                                                                                                                                                                                                                                                                                                                
                                                                                                                                                                                                                                                                                                                                                me.start = me.max;
                                                                                                                                                                                                                                                                                                                                                me.end = me.min;
                                                                                                                                                                                                                                                                                                                                Severity: Major
                                                                                                                                                                                                                                                                                                                                Found in app/assets/javascripts/blazer/Chart.js and 1 other location - About 2 hrs to fix
                                                                                                                                                                                                                                                                                                                                app/assets/javascripts/blazer/Chart.js on lines 11206..11214

                                                                                                                                                                                                                                                                                                                                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

                                                                                                                                                                                                                                                                                                                                                        if (labelMoment.isValid()) {
                                                                                                                                                                                                                                                                                                                                                            if (me.options.time.round) {
                                                                                                                                                                                                                                                                                                                                                                labelMoment.startOf(me.options.time.round);
                                                                                                                                                                                                                                                                                                                                                            }
                                                                                                                                                                                                                                                                                                                                                            diffsForDataset.push(labelMoment.diff(me.firstTick, me.tickUnit, true));
                                                                                                                                                                                                                                                                                                                                Severity: Major
                                                                                                                                                                                                                                                                                                                                Found in app/assets/javascripts/blazer/Chart.js and 1 other location - About 2 hrs to fix
                                                                                                                                                                                                                                                                                                                                app/assets/javascripts/blazer/Chart.js on lines 12000..12005

                                                                                                                                                                                                                                                                                                                                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

                                                                                                                                                                                                                                                                                                                                                    if (labelMoment.isValid()) {
                                                                                                                                                                                                                                                                                                                                                        if (me.options.time.round) {
                                                                                                                                                                                                                                                                                                                                                            labelMoment.startOf(me.options.time.round);
                                                                                                                                                                                                                                                                                                                                                        }
                                                                                                                                                                                                                                                                                                                                                        scaleLabelDiffs.push(labelMoment.diff(me.firstTick, me.tickUnit, true));
                                                                                                                                                                                                                                                                                                                                Severity: Major
                                                                                                                                                                                                                                                                                                                                Found in app/assets/javascripts/blazer/Chart.js and 1 other location - About 2 hrs to fix
                                                                                                                                                                                                                                                                                                                                app/assets/javascripts/blazer/Chart.js on lines 12016..12021

                                                                                                                                                                                                                                                                                                                                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

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

                                                                                                                                                                                                                                                                                                                                            if (tickOpts.reverse) {
                                                                                                                                                                                                                                                                                                                                                ticks.reverse();
                                                                                                                                                                                                                                                                                                                                
                                                                                                                                                                                                                                                                                                                                                me.start = me.max;
                                                                                                                                                                                                                                                                                                                                                me.end = me.min;
                                                                                                                                                                                                                                                                                                                                Severity: Major
                                                                                                                                                                                                                                                                                                                                Found in app/assets/javascripts/blazer/Chart.js and 1 other location - About 2 hrs to fix
                                                                                                                                                                                                                                                                                                                                app/assets/javascripts/blazer/Chart.js on lines 11029..11037

                                                                                                                                                                                                                                                                                                                                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

                                                                                                                                                                                                                                                                                                                                        calculateBarHeight: function(ruler) {
                                                                                                                                                                                                                                                                                                                                            var me = this;
                                                                                                                                                                                                                                                                                                                                            var meta = me.getMeta();
                                                                                                                                                                                                                                                                                                                                            var yScale = me.getScaleForId(meta.yAxisID);
                                                                                                                                                                                                                                                                                                                                            if (yScale.options.barThickness) {
                                                                                                                                                                                                                                                                                                                                Severity: Major
                                                                                                                                                                                                                                                                                                                                Found in app/assets/javascripts/blazer/Chart.js and 1 other location - About 2 hrs to fix
                                                                                                                                                                                                                                                                                                                                app/assets/javascripts/blazer/Chart.js on lines 2009..2017

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

                                                                                                                                                                                                                                                                                                                                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

                                                                                                                                                                                                                                                                                                                                        calculateBarWidth: function(ruler) {
                                                                                                                                                                                                                                                                                                                                            var me = this;
                                                                                                                                                                                                                                                                                                                                            var meta = me.getMeta();
                                                                                                                                                                                                                                                                                                                                            var xScale = me.getScaleForId(meta.xAxisID);
                                                                                                                                                                                                                                                                                                                                            if (xScale.options.barThickness) {
                                                                                                                                                                                                                                                                                                                                Severity: Major
                                                                                                                                                                                                                                                                                                                                Found in app/assets/javascripts/blazer/Chart.js and 1 other location - About 2 hrs to fix
                                                                                                                                                                                                                                                                                                                                app/assets/javascripts/blazer/Chart.js on lines 2302..2310

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

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

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

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

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

                                                                                                                                                                                                                                                                                                                                Refactorings

                                                                                                                                                                                                                                                                                                                                Further Reading

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

                                                                                                                                                                                                                                                                                                                                            if (me.options.ticks.max !== undefined) {
                                                                                                                                                                                                                                                                                                                                                // user specified max value
                                                                                                                                                                                                                                                                                                                                                findIndex = helpers.indexOf(labels, me.options.ticks.max);
                                                                                                                                                                                                                                                                                                                                                me.maxIndex = findIndex !== -1 ? findIndex : me.maxIndex;
                                                                                                                                                                                                                                                                                                                                            }
                                                                                                                                                                                                                                                                                                                                Severity: Major
                                                                                                                                                                                                                                                                                                                                Found in app/assets/javascripts/blazer/Chart.js and 1 other location - About 2 hrs to fix
                                                                                                                                                                                                                                                                                                                                app/assets/javascripts/blazer/Chart.js on lines 10665..10669

                                                                                                                                                                                                                                                                                                                                Duplicated Code

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

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

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

                                                                                                                                                                                                                                                                                                                                Tuning

                                                                                                                                                                                                                                                                                                                                This issue has a mass of 80.

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

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

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

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

                                                                                                                                                                                                                                                                                                                                Refactorings

                                                                                                                                                                                                                                                                                                                                Further Reading

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

                                                                                                                                                                                                                                                                                                                                            if (me.options.ticks.min !== undefined) {
                                                                                                                                                                                                                                                                                                                                                // user specified min value
                                                                                                                                                                                                                                                                                                                                                findIndex = helpers.indexOf(labels, me.options.ticks.min);
                                                                                                                                                                                                                                                                                                                                                me.minIndex = findIndex !== -1 ? findIndex : me.minIndex;
                                                                                                                                                                                                                                                                                                                                            }
                                                                                                                                                                                                                                                                                                                                Severity: Major
                                                                                                                                                                                                                                                                                                                                Found in app/assets/javascripts/blazer/Chart.js and 1 other location - About 2 hrs to fix
                                                                                                                                                                                                                                                                                                                                app/assets/javascripts/blazer/Chart.js on lines 10671..10675

                                                                                                                                                                                                                                                                                                                                Duplicated Code

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

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

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

                                                                                                                                                                                                                                                                                                                                Tuning

                                                                                                                                                                                                                                                                                                                                This issue has a mass of 80.

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

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

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

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

                                                                                                                                                                                                                                                                                                                                Refactorings

                                                                                                                                                                                                                                                                                                                                Further Reading

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

                                                                                                                                                                                                                                                                                                                                    function createNewLegendAndAttach(chartInstance, legendOpts) {
                                                                                                                                                                                                                                                                                                                                        var legend = new Chart.Legend({
                                                                                                                                                                                                                                                                                                                                            ctx: chartInstance.chart.ctx,
                                                                                                                                                                                                                                                                                                                                            options: legendOpts,
                                                                                                                                                                                                                                                                                                                                            chart: chartInstance
                                                                                                                                                                                                                                                                                                                                Severity: Major
                                                                                                                                                                                                                                                                                                                                Found in app/assets/javascripts/blazer/Chart.js and 1 other location - About 2 hrs to fix
                                                                                                                                                                                                                                                                                                                                app/assets/javascripts/blazer/Chart.js on lines 8762..8770

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

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

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

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

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

                                                                                                                                                                                                                                                                                                                                Refactorings

                                                                                                                                                                                                                                                                                                                                Further Reading

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

                                                                                                                                                                                                                                                                                                                                    function createNewTitleBlockAndAttach(chartInstance, titleOpts) {
                                                                                                                                                                                                                                                                                                                                        var title = new Chart.Title({
                                                                                                                                                                                                                                                                                                                                            ctx: chartInstance.chart.ctx,
                                                                                                                                                                                                                                                                                                                                            options: titleOpts,
                                                                                                                                                                                                                                                                                                                                            chart: chartInstance
                                                                                                                                                                                                                                                                                                                                Severity: Major
                                                                                                                                                                                                                                                                                                                                Found in app/assets/javascripts/blazer/Chart.js and 1 other location - About 2 hrs to fix
                                                                                                                                                                                                                                                                                                                                app/assets/javascripts/blazer/Chart.js on lines 7194..7202

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

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

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

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

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

                                                                                                                                                                                                                                                                                                                                Refactorings

                                                                                                                                                                                                                                                                                                                                Further Reading

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

                                                                                                                                                                                                                                                                                                                                   var r = Math.round(rgba[0]/255 * 100),
                                                                                                                                                                                                                                                                                                                                       g = Math.round(rgba[1]/255 * 100),
                                                                                                                                                                                                                                                                                                                                       b = Math.round(rgba[2]/255 * 100);
                                                                                                                                                                                                                                                                                                                                Severity: Major
                                                                                                                                                                                                                                                                                                                                Found in app/assets/javascripts/blazer/Chart.js and 1 other location - About 2 hrs to fix
                                                                                                                                                                                                                                                                                                                                app/assets/javascripts/blazer/Chart.js on lines 175..177

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

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

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

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

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

                                                                                                                                                                                                                                                                                                                                Refactorings

                                                                                                                                                                                                                                                                                                                                Further Reading

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

                                                                                                                                                                                                                                                                                                                                   var r = Math.round(rgba[0]/255 * 100),
                                                                                                                                                                                                                                                                                                                                       g = Math.round(rgba[1]/255 * 100),
                                                                                                                                                                                                                                                                                                                                       b = Math.round(rgba[2]/255 * 100);
                                                                                                                                                                                                                                                                                                                                Severity: Major
                                                                                                                                                                                                                                                                                                                                Found in app/assets/javascripts/blazer/Chart.js and 1 other location - About 2 hrs to fix
                                                                                                                                                                                                                                                                                                                                app/assets/javascripts/blazer/Chart.js on lines 183..185

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

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

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

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

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

                                                                                                                                                                                                                                                                                                                                Refactorings

                                                                                                                                                                                                                                                                                                                                Further Reading

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

                                                                                                                                                                                                                                                                                                                                            if (a < Math.abs(1)) {
                                                                                                                                                                                                                                                                                                                                                a = 1;
                                                                                                                                                                                                                                                                                                                                                s = p / 4;
                                                                                                                                                                                                                                                                                                                                            } else {
                                                                                                                                                                                                                                                                                                                                                s = p / (2 * Math.PI) * Math.asin(1 / a);
                                                                                                                                                                                                                                                                                                                                Severity: Major
                                                                                                                                                                                                                                                                                                                                Found in app/assets/javascripts/blazer/Chart.js and 2 other locations - About 2 hrs to fix
                                                                                                                                                                                                                                                                                                                                app/assets/javascripts/blazer/Chart.js on lines 5568..5573
                                                                                                                                                                                                                                                                                                                                app/assets/javascripts/blazer/Chart.js on lines 5589..5594

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

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

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

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

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

                                                                                                                                                                                                                                                                                                                                Refactorings

                                                                                                                                                                                                                                                                                                                                Further Reading

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

                                                                                                                                                                                                                                                                                                                                            if (a < Math.abs(1)) {
                                                                                                                                                                                                                                                                                                                                                a = 1;
                                                                                                                                                                                                                                                                                                                                                s = p / 4;
                                                                                                                                                                                                                                                                                                                                            } else {
                                                                                                                                                                                                                                                                                                                                                s = p / (2 * Math.PI) * Math.asin(1 / a);
                                                                                                                                                                                                                                                                                                                                Severity: Major
                                                                                                                                                                                                                                                                                                                                Found in app/assets/javascripts/blazer/Chart.js and 2 other locations - About 2 hrs to fix
                                                                                                                                                                                                                                                                                                                                app/assets/javascripts/blazer/Chart.js on lines 5589..5594
                                                                                                                                                                                                                                                                                                                                app/assets/javascripts/blazer/Chart.js on lines 5610..5615

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

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

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

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

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

                                                                                                                                                                                                                                                                                                                                Refactorings

                                                                                                                                                                                                                                                                                                                                Further Reading

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

                                                                                                                                                                                                                                                                                                                                            if (a < Math.abs(1)) {
                                                                                                                                                                                                                                                                                                                                                a = 1;
                                                                                                                                                                                                                                                                                                                                                s = p / 4;
                                                                                                                                                                                                                                                                                                                                            } else {
                                                                                                                                                                                                                                                                                                                                                s = p / (2 * Math.PI) * Math.asin(1 / a);
                                                                                                                                                                                                                                                                                                                                Severity: Major
                                                                                                                                                                                                                                                                                                                                Found in app/assets/javascripts/blazer/Chart.js and 2 other locations - About 2 hrs to fix
                                                                                                                                                                                                                                                                                                                                app/assets/javascripts/blazer/Chart.js on lines 5568..5573
                                                                                                                                                                                                                                                                                                                                app/assets/javascripts/blazer/Chart.js on lines 5610..5615

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

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

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

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

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

                                                                                                                                                                                                                                                                                                                                Refactorings

                                                                                                                                                                                                                                                                                                                                Further Reading

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

                                                                                                                                                                                                                                                                                                                                            if (tickOpts.max !== undefined) {
                                                                                                                                                                                                                                                                                                                                                me.max = tickOpts.max;
                                                                                                                                                                                                                                                                                                                                            } else if (tickOpts.suggestedMax !== undefined) {
                                                                                                                                                                                                                                                                                                                                                me.max = Math.max(me.max, tickOpts.suggestedMax);
                                                                                                                                                                                                                                                                                                                                            }
                                                                                                                                                                                                                                                                                                                                Severity: Major
                                                                                                                                                                                                                                                                                                                                Found in app/assets/javascripts/blazer/Chart.js and 1 other location - About 1 hr to fix
                                                                                                                                                                                                                                                                                                                                app/assets/javascripts/blazer/Chart.js on lines 10979..10983

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

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

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

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

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

                                                                                                                                                                                                                                                                                                                                Refactorings

                                                                                                                                                                                                                                                                                                                                Further Reading

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

                                                                                                                                                                                                                                                                                                                                            if (tickOpts.min !== undefined) {
                                                                                                                                                                                                                                                                                                                                                me.min = tickOpts.min;
                                                                                                                                                                                                                                                                                                                                            } else if (tickOpts.suggestedMin !== undefined) {
                                                                                                                                                                                                                                                                                                                                                me.min = Math.min(me.min, tickOpts.suggestedMin);
                                                                                                                                                                                                                                                                                                                                            }
                                                                                                                                                                                                                                                                                                                                Severity: Major
                                                                                                                                                                                                                                                                                                                                Found in app/assets/javascripts/blazer/Chart.js and 1 other location - About 1 hr to fix
                                                                                                                                                                                                                                                                                                                                app/assets/javascripts/blazer/Chart.js on lines 10985..10989

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

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

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

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

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

                                                                                                                                                                                                                                                                                                                                Refactorings

                                                                                                                                                                                                                                                                                                                                Further Reading

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

                                                                                                                                                                                                                                                                                                                                    function xRange(mouseX) {
                                                                                                                                                                                                                                                                                                                                        var vm = this._view;
                                                                                                                                                                                                                                                                                                                                        return vm ? (Math.pow(mouseX - vm.x, 2) < Math.pow(vm.radius + vm.hitRadius, 2)) : false;
                                                                                                                                                                                                                                                                                                                                    }
                                                                                                                                                                                                                                                                                                                                Severity: Major
                                                                                                                                                                                                                                                                                                                                Found in app/assets/javascripts/blazer/Chart.js and 1 other location - About 1 hr to fix
                                                                                                                                                                                                                                                                                                                                app/assets/javascripts/blazer/Chart.js on lines 10000..10003

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

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

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

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

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

                                                                                                                                                                                                                                                                                                                                Refactorings

                                                                                                                                                                                                                                                                                                                                Further Reading

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

                                                                                                                                                                                                                                                                                                                                    function yRange(mouseY) {
                                                                                                                                                                                                                                                                                                                                        var vm = this._view;
                                                                                                                                                                                                                                                                                                                                        return vm ? (Math.pow(mouseY - vm.y, 2) < Math.pow(vm.radius + vm.hitRadius, 2)) : false;
                                                                                                                                                                                                                                                                                                                                    }
                                                                                                                                                                                                                                                                                                                                Severity: Major
                                                                                                                                                                                                                                                                                                                                Found in app/assets/javascripts/blazer/Chart.js and 1 other location - About 1 hr to fix
                                                                                                                                                                                                                                                                                                                                app/assets/javascripts/blazer/Chart.js on lines 9995..9998

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

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

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

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

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

                                                                                                                                                                                                                                                                                                                                Refactorings

                                                                                                                                                                                                                                                                                                                                Further Reading

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

                                                                                                                                                                                                                                                                                                                                },{"10":10,"11":11,"12":12,"13":13,"14":14,"15":15,"16":16,"17":17,"18":18,"19":19,"20":20,"21":21,"22":22,"23":23,"24":24,"25":25,"26":26,"27":27,"28":28,"29":29,"30":30,"31":31,"32":32,"33":33,"34":34,"35":35,"36":36,"37":37,"38":38,"39":39,"40":40,"42":42,"43":43,"44":44,"45":45,"46":46,"47":47,"48":48,"8":8,"9":9}],8:[function(require,module,exports){
                                                                                                                                                                                                                                                                                                                                'use strict';
                                                                                                                                                                                                                                                                                                                                
                                                                                                                                                                                                                                                                                                                                module.exports = function(Chart) {
                                                                                                                                                                                                                                                                                                                                
                                                                                                                                                                                                                                                                                                                                
                                                                                                                                                                                                                                                                                                                                Severity: Major
                                                                                                                                                                                                                                                                                                                                Found in app/assets/javascripts/blazer/Chart.js and 5 other locations - About 1 hr to fix
                                                                                                                                                                                                                                                                                                                                app/assets/javascripts/blazer/Chart.js on lines 1731..1743
                                                                                                                                                                                                                                                                                                                                app/assets/javascripts/blazer/Chart.js on lines 1743..1756
                                                                                                                                                                                                                                                                                                                                app/assets/javascripts/blazer/Chart.js on lines 1756..1769
                                                                                                                                                                                                                                                                                                                                app/assets/javascripts/blazer/Chart.js on lines 1769..1782
                                                                                                                                                                                                                                                                                                                                app/assets/javascripts/blazer/Chart.js on lines 1782..1795

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

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

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

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

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

                                                                                                                                                                                                                                                                                                                                Refactorings

                                                                                                                                                                                                                                                                                                                                Further Reading

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

                                                                                                                                                                                                                                                                                                                                },{}],10:[function(require,module,exports){
                                                                                                                                                                                                                                                                                                                                'use strict';
                                                                                                                                                                                                                                                                                                                                
                                                                                                                                                                                                                                                                                                                                module.exports = function(Chart) {
                                                                                                                                                                                                                                                                                                                                
                                                                                                                                                                                                                                                                                                                                
                                                                                                                                                                                                                                                                                                                                Severity: Major
                                                                                                                                                                                                                                                                                                                                Found in app/assets/javascripts/blazer/Chart.js and 5 other locations - About 1 hr to fix
                                                                                                                                                                                                                                                                                                                                app/assets/javascripts/blazer/Chart.js on lines 1718..1731
                                                                                                                                                                                                                                                                                                                                app/assets/javascripts/blazer/Chart.js on lines 1731..1743
                                                                                                                                                                                                                                                                                                                                app/assets/javascripts/blazer/Chart.js on lines 1756..1769
                                                                                                                                                                                                                                                                                                                                app/assets/javascripts/blazer/Chart.js on lines 1769..1782
                                                                                                                                                                                                                                                                                                                                app/assets/javascripts/blazer/Chart.js on lines 1782..1795

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

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

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

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

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

                                                                                                                                                                                                                                                                                                                                Refactorings

                                                                                                                                                                                                                                                                                                                                Further Reading

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

                                                                                                                                                                                                                                                                                                                                },{}],11:[function(require,module,exports){
                                                                                                                                                                                                                                                                                                                                'use strict';
                                                                                                                                                                                                                                                                                                                                
                                                                                                                                                                                                                                                                                                                                module.exports = function(Chart) {
                                                                                                                                                                                                                                                                                                                                
                                                                                                                                                                                                                                                                                                                                
                                                                                                                                                                                                                                                                                                                                Severity: Major
                                                                                                                                                                                                                                                                                                                                Found in app/assets/javascripts/blazer/Chart.js and 5 other locations - About 1 hr to fix
                                                                                                                                                                                                                                                                                                                                app/assets/javascripts/blazer/Chart.js on lines 1718..1731
                                                                                                                                                                                                                                                                                                                                app/assets/javascripts/blazer/Chart.js on lines 1731..1743
                                                                                                                                                                                                                                                                                                                                app/assets/javascripts/blazer/Chart.js on lines 1743..1756
                                                                                                                                                                                                                                                                                                                                app/assets/javascripts/blazer/Chart.js on lines 1769..1782
                                                                                                                                                                                                                                                                                                                                app/assets/javascripts/blazer/Chart.js on lines 1782..1795

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

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

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

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

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

                                                                                                                                                                                                                                                                                                                                Refactorings

                                                                                                                                                                                                                                                                                                                                Further Reading

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

                                                                                                                                                                                                                                                                                                                                },{}],13:[function(require,module,exports){
                                                                                                                                                                                                                                                                                                                                'use strict';
                                                                                                                                                                                                                                                                                                                                
                                                                                                                                                                                                                                                                                                                                module.exports = function(Chart) {
                                                                                                                                                                                                                                                                                                                                
                                                                                                                                                                                                                                                                                                                                
                                                                                                                                                                                                                                                                                                                                Severity: Major
                                                                                                                                                                                                                                                                                                                                Found in app/assets/javascripts/blazer/Chart.js and 5 other locations - About 1 hr to fix
                                                                                                                                                                                                                                                                                                                                app/assets/javascripts/blazer/Chart.js on lines 1718..1731
                                                                                                                                                                                                                                                                                                                                app/assets/javascripts/blazer/Chart.js on lines 1731..1743
                                                                                                                                                                                                                                                                                                                                app/assets/javascripts/blazer/Chart.js on lines 1743..1756
                                                                                                                                                                                                                                                                                                                                app/assets/javascripts/blazer/Chart.js on lines 1756..1769
                                                                                                                                                                                                                                                                                                                                app/assets/javascripts/blazer/Chart.js on lines 1769..1782

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

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

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

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

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

                                                                                                                                                                                                                                                                                                                                Refactorings

                                                                                                                                                                                                                                                                                                                                Further Reading

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

                                                                                                                                                                                                                                                                                                                                },{}],9:[function(require,module,exports){
                                                                                                                                                                                                                                                                                                                                'use strict';
                                                                                                                                                                                                                                                                                                                                
                                                                                                                                                                                                                                                                                                                                module.exports = function(Chart) {
                                                                                                                                                                                                                                                                                                                                
                                                                                                                                                                                                                                                                                                                                
                                                                                                                                                                                                                                                                                                                                Severity: Major
                                                                                                                                                                                                                                                                                                                                Found in app/assets/javascripts/blazer/Chart.js and 5 other locations - About 1 hr to fix
                                                                                                                                                                                                                                                                                                                                app/assets/javascripts/blazer/Chart.js on lines 1718..1731
                                                                                                                                                                                                                                                                                                                                app/assets/javascripts/blazer/Chart.js on lines 1743..1756
                                                                                                                                                                                                                                                                                                                                app/assets/javascripts/blazer/Chart.js on lines 1756..1769
                                                                                                                                                                                                                                                                                                                                app/assets/javascripts/blazer/Chart.js on lines 1769..1782
                                                                                                                                                                                                                                                                                                                                app/assets/javascripts/blazer/Chart.js on lines 1782..1795

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

                                                                                                                                                                                                                                                                                                                                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

                                                                                                                                                                                                                                                                                                                                        getBeforeBody: function() {
                                                                                                                                                                                                                                                                                                                                            var lines = this._options.callbacks.beforeBody.apply(this, arguments);
                                                                                                                                                                                                                                                                                                                                            return helpers.isArray(lines) ? lines : lines !== undefined ? [lines] : [];
                                                                                                                                                                                                                                                                                                                                        },
                                                                                                                                                                                                                                                                                                                                Severity: Major
                                                                                                                                                                                                                                                                                                                                Found in app/assets/javascripts/blazer/Chart.js and 1 other location - About 1 hr to fix
                                                                                                                                                                                                                                                                                                                                app/assets/javascripts/blazer/Chart.js on lines 9220..9223

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

                                                                                                                                                                                                                                                                                                                                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

                                                                                                                                                                                                                                                                                                                                        getAfterBody: function() {
                                                                                                                                                                                                                                                                                                                                            var lines = this._options.callbacks.afterBody.apply(this, arguments);
                                                                                                                                                                                                                                                                                                                                            return helpers.isArray(lines) ? lines : lines !== undefined ? [lines] : [];
                                                                                                                                                                                                                                                                                                                                        },
                                                                                                                                                                                                                                                                                                                                Severity: Major
                                                                                                                                                                                                                                                                                                                                Found in app/assets/javascripts/blazer/Chart.js and 1 other location - About 1 hr to fix
                                                                                                                                                                                                                                                                                                                                app/assets/javascripts/blazer/Chart.js on lines 9192..9195

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

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

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

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

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

                                                                                                                                                                                                                                                                                                                                Refactorings

                                                                                                                                                                                                                                                                                                                                Further Reading

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

                                                                                                                                                                                                                                                                                                                                },{}],12:[function(require,module,exports){
                                                                                                                                                                                                                                                                                                                                'use strict';
                                                                                                                                                                                                                                                                                                                                
                                                                                                                                                                                                                                                                                                                                module.exports = function(Chart) {
                                                                                                                                                                                                                                                                                                                                
                                                                                                                                                                                                                                                                                                                                
                                                                                                                                                                                                                                                                                                                                Severity: Major
                                                                                                                                                                                                                                                                                                                                Found in app/assets/javascripts/blazer/Chart.js and 5 other locations - About 1 hr to fix
                                                                                                                                                                                                                                                                                                                                app/assets/javascripts/blazer/Chart.js on lines 1718..1731
                                                                                                                                                                                                                                                                                                                                app/assets/javascripts/blazer/Chart.js on lines 1731..1743
                                                                                                                                                                                                                                                                                                                                app/assets/javascripts/blazer/Chart.js on lines 1743..1756
                                                                                                                                                                                                                                                                                                                                app/assets/javascripts/blazer/Chart.js on lines 1756..1769
                                                                                                                                                                                                                                                                                                                                app/assets/javascripts/blazer/Chart.js on lines 1782..1795

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

                                                                                                                                                                                                                                                                                                                                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

                                                                                                                                                                                                                                                                                                                                    helpers.min = function(array) {
                                                                                                                                                                                                                                                                                                                                        return array.reduce(function(min, value) {
                                                                                                                                                                                                                                                                                                                                            if (!isNaN(value)) {
                                                                                                                                                                                                                                                                                                                                                return Math.min(min, value);
                                                                                                                                                                                                                                                                                                                                            }
                                                                                                                                                                                                                                                                                                                                Severity: Major
                                                                                                                                                                                                                                                                                                                                Found in app/assets/javascripts/blazer/Chart.js and 1 other location - About 1 hr to fix
                                                                                                                                                                                                                                                                                                                                app/assets/javascripts/blazer/Chart.js on lines 5230..5237

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

                                                                                                                                                                                                                                                                                                                                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

                                                                                                                                                                                                                                                                                                                                    helpers.max = function(array) {
                                                                                                                                                                                                                                                                                                                                        return array.reduce(function(max, value) {
                                                                                                                                                                                                                                                                                                                                            if (!isNaN(value)) {
                                                                                                                                                                                                                                                                                                                                                return Math.max(max, value);
                                                                                                                                                                                                                                                                                                                                            }
                                                                                                                                                                                                                                                                                                                                Severity: Major
                                                                                                                                                                                                                                                                                                                                Found in app/assets/javascripts/blazer/Chart.js and 1 other location - About 1 hr to fix
                                                                                                                                                                                                                                                                                                                                app/assets/javascripts/blazer/Chart.js on lines 5238..5245

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

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

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

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

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

                                                                                                                                                                                                                                                                                                                                Refactorings

                                                                                                                                                                                                                                                                                                                                Further Reading

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

                                                                                                                                                                                                                                                                                                                                            if (fraction < 1.5) {
                                                                                                                                                                                                                                                                                                                                                niceFraction = 1;
                                                                                                                                                                                                                                                                                                                                            } else if (fraction < 3) {
                                                                                                                                                                                                                                                                                                                                                niceFraction = 2;
                                                                                                                                                                                                                                                                                                                                            } else if (fraction < 7) {
                                                                                                                                                                                                                                                                                                                                Severity: Major
                                                                                                                                                                                                                                                                                                                                Found in app/assets/javascripts/blazer/Chart.js and 1 other location - About 1 hr to fix
                                                                                                                                                                                                                                                                                                                                app/assets/javascripts/blazer/Chart.js on lines 5447..5455

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

                                                                                                                                                                                                                                                                                                                                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

                                                                                                                                                                                                                                                                                                                                        } else if (fraction <= 1.0) {
                                                                                                                                                                                                                                                                                                                                            niceFraction = 1;
                                                                                                                                                                                                                                                                                                                                        } else if (fraction <= 2) {
                                                                                                                                                                                                                                                                                                                                            niceFraction = 2;
                                                                                                                                                                                                                                                                                                                                        } else if (fraction <= 5) {
                                                                                                                                                                                                                                                                                                                                Severity: Major
                                                                                                                                                                                                                                                                                                                                Found in app/assets/javascripts/blazer/Chart.js and 1 other location - About 1 hr to fix
                                                                                                                                                                                                                                                                                                                                app/assets/javascripts/blazer/Chart.js on lines 5438..5446

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

                                                                                                                                                                                                                                                                                                                                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

                                                                                                                                                                                                                                                                                                                                                var min = {x: contains180 ? -1 : Math.min(start.x * (start.x < 0 ? 1 : cutout), end.x * (end.x < 0 ? 1 : cutout)), y: contains270 ? -1 : Math.min(start.y * (start.y < 0 ? 1 : cutout), end.y * (end.y < 0 ? 1 : cutout))};
                                                                                                                                                                                                                                                                                                                                Severity: Major
                                                                                                                                                                                                                                                                                                                                Found in app/assets/javascripts/blazer/Chart.js and 1 other location - About 1 hr to fix
                                                                                                                                                                                                                                                                                                                                app/assets/javascripts/blazer/Chart.js on lines 2687..2687

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

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

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

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

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

                                                                                                                                                                                                                                                                                                                                Refactorings

                                                                                                                                                                                                                                                                                                                                Further Reading

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

                                                                                                                                                                                                                                                                                                                                                            return {
                                                                                                                                                                                                                                                                                                                                                                text: label,
                                                                                                                                                                                                                                                                                                                                                                fillStyle: fill,
                                                                                                                                                                                                                                                                                                                                                                strokeStyle: stroke,
                                                                                                                                                                                                                                                                                                                                                                lineWidth: bw,
                                                                                                                                                                                                                                                                                                                                Severity: Major
                                                                                                                                                                                                                                                                                                                                Found in app/assets/javascripts/blazer/Chart.js and 1 other location - About 1 hr to fix
                                                                                                                                                                                                                                                                                                                                app/assets/javascripts/blazer/Chart.js on lines 2566..2575

                                                                                                                                                                                                                                                                                                                                Duplicated Code

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

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

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

                                                                                                                                                                                                                                                                                                                                Tuning

                                                                                                                                                                                                                                                                                                                                This issue has a mass of 64.

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

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

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

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

                                                                                                                                                                                                                                                                                                                                Refactorings

                                                                                                                                                                                                                                                                                                                                Further Reading

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

                                                                                                                                                                                                                                                                                                                                            previous: {
                                                                                                                                                                                                                                                                                                                                                x: current.x - fa * (next.x - previous.x),
                                                                                                                                                                                                                                                                                                                                                y: current.y - fa * (next.y - previous.y)
                                                                                                                                                                                                                                                                                                                                            },
                                                                                                                                                                                                                                                                                                                                Severity: Major
                                                                                                                                                                                                                                                                                                                                Found in app/assets/javascripts/blazer/Chart.js and 1 other location - About 1 hr to fix
                                                                                                                                                                                                                                                                                                                                app/assets/javascripts/blazer/Chart.js on lines 5321..5324

                                                                                                                                                                                                                                                                                                                                Duplicated Code

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

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

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

                                                                                                                                                                                                                                                                                                                                Tuning

                                                                                                                                                                                                                                                                                                                                This issue has a mass of 64.

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

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

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

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

                                                                                                                                                                                                                                                                                                                                Refactorings

                                                                                                                                                                                                                                                                                                                                Further Reading

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

                                                                                                                                                                                                                                                                                                                                            next: {
                                                                                                                                                                                                                                                                                                                                                x: current.x + fb * (next.x - previous.x),
                                                                                                                                                                                                                                                                                                                                                y: current.y + fb * (next.y - previous.y)
                                                                                                                                                                                                                                                                                                                                            }
                                                                                                                                                                                                                                                                                                                                Severity: Major
                                                                                                                                                                                                                                                                                                                                Found in app/assets/javascripts/blazer/Chart.js and 1 other location - About 1 hr to fix
                                                                                                                                                                                                                                                                                                                                app/assets/javascripts/blazer/Chart.js on lines 5317..5320

                                                                                                                                                                                                                                                                                                                                Duplicated Code

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

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

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

                                                                                                                                                                                                                                                                                                                                Tuning

                                                                                                                                                                                                                                                                                                                                This issue has a mass of 64.

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

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

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

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

                                                                                                                                                                                                                                                                                                                                Refactorings

                                                                                                                                                                                                                                                                                                                                Further Reading

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

                                                                                                                                                                                                                                                                                                                                                            return {
                                                                                                                                                                                                                                                                                                                                                                text: label,
                                                                                                                                                                                                                                                                                                                                                                fillStyle: fill,
                                                                                                                                                                                                                                                                                                                                                                strokeStyle: stroke,
                                                                                                                                                                                                                                                                                                                                                                lineWidth: bw,
                                                                                                                                                                                                                                                                                                                                Severity: Major
                                                                                                                                                                                                                                                                                                                                Found in app/assets/javascripts/blazer/Chart.js and 1 other location - About 1 hr to fix
                                                                                                                                                                                                                                                                                                                                app/assets/javascripts/blazer/Chart.js on lines 3218..3227

                                                                                                                                                                                                                                                                                                                                Duplicated Code

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

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

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

                                                                                                                                                                                                                                                                                                                                Tuning

                                                                                                                                                                                                                                                                                                                                This issue has a mass of 64.

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

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

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

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

                                                                                                                                                                                                                                                                                                                                Refactorings

                                                                                                                                                                                                                                                                                                                                Further Reading

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

                                                                                                                                                                                                                                                                                                                                                var max = {x: contains0 ? 1 : Math.max(start.x * (start.x > 0 ? 1 : cutout), end.x * (end.x > 0 ? 1 : cutout)), y: contains90 ? 1 : Math.max(start.y * (start.y > 0 ? 1 : cutout), end.y * (end.y > 0 ? 1 : cutout))};
                                                                                                                                                                                                                                                                                                                                Severity: Major
                                                                                                                                                                                                                                                                                                                                Found in app/assets/javascripts/blazer/Chart.js and 1 other location - About 1 hr to fix
                                                                                                                                                                                                                                                                                                                                app/assets/javascripts/blazer/Chart.js on lines 2688..2688

                                                                                                                                                                                                                                                                                                                                Duplicated Code

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

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

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

                                                                                                                                                                                                                                                                                                                                Tuning

                                                                                                                                                                                                                                                                                                                                This issue has a mass of 64.

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

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

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

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

                                                                                                                                                                                                                                                                                                                                Refactorings

                                                                                                                                                                                                                                                                                                                                Further Reading

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

                                                                                                                                                                                                                                                                                                                                        var d12 = Math.sqrt(Math.pow(next.x - current.x, 2) + Math.pow(next.y - current.y, 2));
                                                                                                                                                                                                                                                                                                                                Severity: Major
                                                                                                                                                                                                                                                                                                                                Found in app/assets/javascripts/blazer/Chart.js and 1 other location - About 1 hr to fix
                                                                                                                                                                                                                                                                                                                                app/assets/javascripts/blazer/Chart.js on lines 5303..5303

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

                                                                                                                                                                                                                                                                                                                                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

                                                                                                                                                                                                                                                                                                                                        var d01 = Math.sqrt(Math.pow(current.x - previous.x, 2) + Math.pow(current.y - previous.y, 2));
                                                                                                                                                                                                                                                                                                                                Severity: Major
                                                                                                                                                                                                                                                                                                                                Found in app/assets/javascripts/blazer/Chart.js and 1 other location - About 1 hr to fix
                                                                                                                                                                                                                                                                                                                                app/assets/javascripts/blazer/Chart.js on lines 5304..5304

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

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

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

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

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

                                                                                                                                                                                                                                                                                                                                Refactorings

                                                                                                                                                                                                                                                                                                                                Further Reading

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

                                                                                                                                                                                                                                                                                                                                    saturate: function (ratio) {
                                                                                                                                                                                                                                                                                                                                        var hsl = this.values.hsl;
                                                                                                                                                                                                                                                                                                                                        hsl[1] += hsl[1] * ratio;
                                                                                                                                                                                                                                                                                                                                        this.setValues('hsl', hsl);
                                                                                                                                                                                                                                                                                                                                        return this;
                                                                                                                                                                                                                                                                                                                                Severity: Major
                                                                                                                                                                                                                                                                                                                                Found in app/assets/javascripts/blazer/Chart.js and 5 other locations - About 1 hr to fix
                                                                                                                                                                                                                                                                                                                                app/assets/javascripts/blazer/Chart.js on lines 467..472
                                                                                                                                                                                                                                                                                                                                app/assets/javascripts/blazer/Chart.js on lines 474..479
                                                                                                                                                                                                                                                                                                                                app/assets/javascripts/blazer/Chart.js on lines 488..493
                                                                                                                                                                                                                                                                                                                                app/assets/javascripts/blazer/Chart.js on lines 495..500
                                                                                                                                                                                                                                                                                                                                app/assets/javascripts/blazer/Chart.js on lines 502..507

                                                                                                                                                                                                                                                                                                                                Duplicated Code

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

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

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

                                                                                                                                                                                                                                                                                                                                Tuning

                                                                                                                                                                                                                                                                                                                                This issue has a mass of 60.

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

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

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

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

                                                                                                                                                                                                                                                                                                                                Refactorings

                                                                                                                                                                                                                                                                                                                                Further Reading

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

                                                                                                                                                                                                                                                                                                                                    whiten: function (ratio) {
                                                                                                                                                                                                                                                                                                                                        var hwb = this.values.hwb;
                                                                                                                                                                                                                                                                                                                                        hwb[1] += hwb[1] * ratio;
                                                                                                                                                                                                                                                                                                                                        this.setValues('hwb', hwb);
                                                                                                                                                                                                                                                                                                                                        return this;
                                                                                                                                                                                                                                                                                                                                Severity: Major
                                                                                                                                                                                                                                                                                                                                Found in app/assets/javascripts/blazer/Chart.js and 5 other locations - About 1 hr to fix
                                                                                                                                                                                                                                                                                                                                app/assets/javascripts/blazer/Chart.js on lines 467..472
                                                                                                                                                                                                                                                                                                                                app/assets/javascripts/blazer/Chart.js on lines 474..479
                                                                                                                                                                                                                                                                                                                                app/assets/javascripts/blazer/Chart.js on lines 481..486
                                                                                                                                                                                                                                                                                                                                app/assets/javascripts/blazer/Chart.js on lines 488..493
                                                                                                                                                                                                                                                                                                                                app/assets/javascripts/blazer/Chart.js on lines 502..507

                                                                                                                                                                                                                                                                                                                                Duplicated Code

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

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

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

                                                                                                                                                                                                                                                                                                                                Tuning

                                                                                                                                                                                                                                                                                                                                This issue has a mass of 60.

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

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

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

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

                                                                                                                                                                                                                                                                                                                                Refactorings

                                                                                                                                                                                                                                                                                                                                Further Reading

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

                                                                                                                                                                                                                                                                                                                                    darken: function (ratio) {
                                                                                                                                                                                                                                                                                                                                        var hsl = this.values.hsl;
                                                                                                                                                                                                                                                                                                                                        hsl[2] -= hsl[2] * ratio;
                                                                                                                                                                                                                                                                                                                                        this.setValues('hsl', hsl);
                                                                                                                                                                                                                                                                                                                                        return this;
                                                                                                                                                                                                                                                                                                                                Severity: Major
                                                                                                                                                                                                                                                                                                                                Found in app/assets/javascripts/blazer/Chart.js and 5 other locations - About 1 hr to fix
                                                                                                                                                                                                                                                                                                                                app/assets/javascripts/blazer/Chart.js on lines 467..472
                                                                                                                                                                                                                                                                                                                                app/assets/javascripts/blazer/Chart.js on lines 481..486
                                                                                                                                                                                                                                                                                                                                app/assets/javascripts/blazer/Chart.js on lines 488..493
                                                                                                                                                                                                                                                                                                                                app/assets/javascripts/blazer/Chart.js on lines 495..500
                                                                                                                                                                                                                                                                                                                                app/assets/javascripts/blazer/Chart.js on lines 502..507

                                                                                                                                                                                                                                                                                                                                Duplicated Code

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

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

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

                                                                                                                                                                                                                                                                                                                                Tuning

                                                                                                                                                                                                                                                                                                                                This issue has a mass of 60.

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

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

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

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

                                                                                                                                                                                                                                                                                                                                Refactorings

                                                                                                                                                                                                                                                                                                                                Further Reading

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

                                                                                                                                                                                                                                                                                                                                    lighten: function (ratio) {
                                                                                                                                                                                                                                                                                                                                        var hsl = this.values.hsl;
                                                                                                                                                                                                                                                                                                                                        hsl[2] += hsl[2] * ratio;
                                                                                                                                                                                                                                                                                                                                        this.setValues('hsl', hsl);
                                                                                                                                                                                                                                                                                                                                        return this;
                                                                                                                                                                                                                                                                                                                                Severity: Major
                                                                                                                                                                                                                                                                                                                                Found in app/assets/javascripts/blazer/Chart.js and 5 other locations - About 1 hr to fix
                                                                                                                                                                                                                                                                                                                                app/assets/javascripts/blazer/Chart.js on lines 474..479
                                                                                                                                                                                                                                                                                                                                app/assets/javascripts/blazer/Chart.js on lines 481..486
                                                                                                                                                                                                                                                                                                                                app/assets/javascripts/blazer/Chart.js on lines 488..493
                                                                                                                                                                                                                                                                                                                                app/assets/javascripts/blazer/Chart.js on lines 495..500
                                                                                                                                                                                                                                                                                                                                app/assets/javascripts/blazer/Chart.js on lines 502..507

                                                                                                                                                                                                                                                                                                                                Duplicated Code

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

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

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

                                                                                                                                                                                                                                                                                                                                Tuning

                                                                                                                                                                                                                                                                                                                                This issue has a mass of 60.

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

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

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

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

                                                                                                                                                                                                                                                                                                                                Refactorings

                                                                                                                                                                                                                                                                                                                                Further Reading

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

                                                                                                                                                                                                                                                                                                                                    blacken: function (ratio) {
                                                                                                                                                                                                                                                                                                                                        var hwb = this.values.hwb;
                                                                                                                                                                                                                                                                                                                                        hwb[2] += hwb[2] * ratio;
                                                                                                                                                                                                                                                                                                                                        this.setValues('hwb', hwb);
                                                                                                                                                                                                                                                                                                                                        return this;
                                                                                                                                                                                                                                                                                                                                Severity: Major
                                                                                                                                                                                                                                                                                                                                Found in app/assets/javascripts/blazer/Chart.js and 5 other locations - About 1 hr to fix
                                                                                                                                                                                                                                                                                                                                app/assets/javascripts/blazer/Chart.js on lines 467..472
                                                                                                                                                                                                                                                                                                                                app/assets/javascripts/blazer/Chart.js on lines 474..479
                                                                                                                                                                                                                                                                                                                                app/assets/javascripts/blazer/Chart.js on lines 481..486
                                                                                                                                                                                                                                                                                                                                app/assets/javascripts/blazer/Chart.js on lines 488..493
                                                                                                                                                                                                                                                                                                                                app/assets/javascripts/blazer/Chart.js on lines 495..500

                                                                                                                                                                                                                                                                                                                                Duplicated Code

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

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

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

                                                                                                                                                                                                                                                                                                                                Tuning

                                                                                                                                                                                                                                                                                                                                This issue has a mass of 60.

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

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

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

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

                                                                                                                                                                                                                                                                                                                                Refactorings

                                                                                                                                                                                                                                                                                                                                Further Reading

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

                                                                                                                                                                                                                                                                                                                                    desaturate: function (ratio) {
                                                                                                                                                                                                                                                                                                                                        var hsl = this.values.hsl;
                                                                                                                                                                                                                                                                                                                                        hsl[1] -= hsl[1] * ratio;
                                                                                                                                                                                                                                                                                                                                        this.setValues('hsl', hsl);
                                                                                                                                                                                                                                                                                                                                        return this;
                                                                                                                                                                                                                                                                                                                                Severity: Major
                                                                                                                                                                                                                                                                                                                                Found in app/assets/javascripts/blazer/Chart.js and 5 other locations - About 1 hr to fix
                                                                                                                                                                                                                                                                                                                                app/assets/javascripts/blazer/Chart.js on lines 467..472
                                                                                                                                                                                                                                                                                                                                app/assets/javascripts/blazer/Chart.js on lines 474..479
                                                                                                                                                                                                                                                                                                                                app/assets/javascripts/blazer/Chart.js on lines 481..486
                                                                                                                                                                                                                                                                                                                                app/assets/javascripts/blazer/Chart.js on lines 495..500
                                                                                                                                                                                                                                                                                                                                app/assets/javascripts/blazer/Chart.js on lines 502..507

                                                                                                                                                                                                                                                                                                                                Duplicated Code

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

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

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

                                                                                                                                                                                                                                                                                                                                Tuning

                                                                                                                                                                                                                                                                                                                                This issue has a mass of 60.

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

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

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

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

                                                                                                                                                                                                                                                                                                                                Refactorings

                                                                                                                                                                                                                                                                                                                                Further Reading

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

                                                                                                                                                                                                                                                                                                                                            return -(a * Math.pow(2, 10 * (t -= 1)) * Math.sin((t * 1 - s) * (2 * Math.PI) / p));
                                                                                                                                                                                                                                                                                                                                Severity: Major
                                                                                                                                                                                                                                                                                                                                Found in app/assets/javascripts/blazer/Chart.js and 1 other location - About 1 hr to fix
                                                                                                                                                                                                                                                                                                                                app/assets/javascripts/blazer/Chart.js on lines 5617..5617

                                                                                                                                                                                                                                                                                                                                Duplicated Code

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

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

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

                                                                                                                                                                                                                                                                                                                                Tuning

                                                                                                                                                                                                                                                                                                                                This issue has a mass of 58.

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

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

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

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

                                                                                                                                                                                                                                                                                                                                Refactorings

                                                                                                                                                                                                                                                                                                                                Further Reading

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

                                                                                                                                                                                                                                                                                                                                            if (meta.xAxisID === null) {
                                                                                                                                                                                                                                                                                                                                                meta.xAxisID = dataset.xAxisID || me.chart.options.scales.xAxes[0].id;
                                                                                                                                                                                                                                                                                                                                            }
                                                                                                                                                                                                                                                                                                                                Severity: Major
                                                                                                                                                                                                                                                                                                                                Found in app/assets/javascripts/blazer/Chart.js and 1 other location - About 1 hr to fix
                                                                                                                                                                                                                                                                                                                                app/assets/javascripts/blazer/Chart.js on lines 4694..4696

                                                                                                                                                                                                                                                                                                                                Duplicated Code

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

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

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

                                                                                                                                                                                                                                                                                                                                Tuning

                                                                                                                                                                                                                                                                                                                                This issue has a mass of 58.

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

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

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

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

                                                                                                                                                                                                                                                                                                                                Refactorings

                                                                                                                                                                                                                                                                                                                                Further Reading

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

                                                                                                                                                                                                                                                                                                                                                return -0.5 * (a * Math.pow(2, 10 * (t -= 1)) * Math.sin((t * 1 - s) * (2 * Math.PI) / p));
                                                                                                                                                                                                                                                                                                                                Severity: Major
                                                                                                                                                                                                                                                                                                                                Found in app/assets/javascripts/blazer/Chart.js and 1 other location - About 1 hr to fix
                                                                                                                                                                                                                                                                                                                                app/assets/javascripts/blazer/Chart.js on lines 5574..5574

                                                                                                                                                                                                                                                                                                                                Duplicated Code

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

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

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

                                                                                                                                                                                                                                                                                                                                Tuning

                                                                                                                                                                                                                                                                                                                                This issue has a mass of 58.

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

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

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

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

                                                                                                                                                                                                                                                                                                                                Refactorings

                                                                                                                                                                                                                                                                                                                                Further Reading

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

                                                                                                                                                                                                                                                                                                                                            if (meta.yAxisID === null) {
                                                                                                                                                                                                                                                                                                                                                meta.yAxisID = dataset.yAxisID || me.chart.options.scales.yAxes[0].id;
                                                                                                                                                                                                                                                                                                                                            }
                                                                                                                                                                                                                                                                                                                                Severity: Major
                                                                                                                                                                                                                                                                                                                                Found in app/assets/javascripts/blazer/Chart.js and 1 other location - About 1 hr to fix
                                                                                                                                                                                                                                                                                                                                app/assets/javascripts/blazer/Chart.js on lines 4691..4693

                                                                                                                                                                                                                                                                                                                                Duplicated Code

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

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

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

                                                                                                                                                                                                                                                                                                                                Tuning

                                                                                                                                                                                                                                                                                                                                This issue has a mass of 58.

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

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

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

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

                                                                                                                                                                                                                                                                                                                                Refactorings

                                                                                                                                                                                                                                                                                                                                Further Reading

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

                                                                                                                                                                                                                                                                                                                                        scales: {
                                                                                                                                                                                                                                                                                                                                            xAxes: [{
                                                                                                                                                                                                                                                                                                                                                type: 'linear', // scatter should not use a category axis
                                                                                                                                                                                                                                                                                                                                                position: 'bottom',
                                                                                                                                                                                                                                                                                                                                                id: 'x-axis-1' // need an ID so datasets can reference the scale
                                                                                                                                                                                                                                                                                                                                Severity: Major
                                                                                                                                                                                                                                                                                                                                Found in app/assets/javascripts/blazer/Chart.js and 1 other location - About 1 hr to fix
                                                                                                                                                                                                                                                                                                                                app/assets/javascripts/blazer/Chart.js on lines 2398..2409

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

                                                                                                                                                                                                                                                                                                                                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

                                                                                                                                                                                                                                                                                                                                        scales: {
                                                                                                                                                                                                                                                                                                                                            xAxes: [{
                                                                                                                                                                                                                                                                                                                                                type: 'linear', // bubble should probably use a linear scale by default
                                                                                                                                                                                                                                                                                                                                                position: 'bottom',
                                                                                                                                                                                                                                                                                                                                                id: 'x-axis-0' // need an ID so datasets can reference the scale
                                                                                                                                                                                                                                                                                                                                Severity: Major
                                                                                                                                                                                                                                                                                                                                Found in app/assets/javascripts/blazer/Chart.js and 1 other location - About 1 hr to fix
                                                                                                                                                                                                                                                                                                                                app/assets/javascripts/blazer/Chart.js on lines 1805..1816

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

                                                                                                                                                                                                                                                                                                                                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

                                                                                                                                                                                                                                                                                                                                                    var key = [
                                                                                                                                                                                                                                                                                                                                                        meta.type,
                                                                                                                                                                                                                                                                                                                                                        // we have a separate stack for stack=undefined datasets when the opts.stacked is undefined
                                                                                                                                                                                                                                                                                                                                                        ((opts.stacked === undefined && meta.stack === undefined) ? datasetIndex : ''),
                                                                                                                                                                                                                                                                                                                                                        meta.stack
                                                                                                                                                                                                                                                                                                                                Severity: Major
                                                                                                                                                                                                                                                                                                                                Found in app/assets/javascripts/blazer/Chart.js and 1 other location - About 1 hr to fix
                                                                                                                                                                                                                                                                                                                                app/assets/javascripts/blazer/Chart.js on lines 10814..10819

                                                                                                                                                                                                                                                                                                                                Duplicated Code

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

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

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

                                                                                                                                                                                                                                                                                                                                Tuning

                                                                                                                                                                                                                                                                                                                                This issue has a mass of 55.

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

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

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

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

                                                                                                                                                                                                                                                                                                                                Refactorings

                                                                                                                                                                                                                                                                                                                                Further Reading

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

                                                                                                                                                                                                                                                                                                                                                    var key = [
                                                                                                                                                                                                                                                                                                                                                        meta.type,
                                                                                                                                                                                                                                                                                                                                                        // we have a separate stack for stack=undefined datasets when the opts.stacked is undefined
                                                                                                                                                                                                                                                                                                                                                        ((opts.stacked === undefined && meta.stack === undefined) ? datasetIndex : ''),
                                                                                                                                                                                                                                                                                                                                                        meta.stack
                                                                                                                                                                                                                                                                                                                                Severity: Major
                                                                                                                                                                                                                                                                                                                                Found in app/assets/javascripts/blazer/Chart.js and 1 other location - About 1 hr to fix
                                                                                                                                                                                                                                                                                                                                app/assets/javascripts/blazer/Chart.js on lines 11104..11109

                                                                                                                                                                                                                                                                                                                                Duplicated Code

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

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

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

                                                                                                                                                                                                                                                                                                                                Tuning

                                                                                                                                                                                                                                                                                                                                This issue has a mass of 55.

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

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

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

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

                                                                                                                                                                                                                                                                                                                                Refactorings

                                                                                                                                                                                                                                                                                                                                Further Reading

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

                                                                                                                                                                                                                                                                                                                                            return {
                                                                                                                                                                                                                                                                                                                                                x: vm.x + Math.cos(halfAngle) * halfRadius,
                                                                                                                                                                                                                                                                                                                                                y: vm.y + Math.sin(halfAngle) * halfRadius
                                                                                                                                                                                                                                                                                                                                            };
                                                                                                                                                                                                                                                                                                                                Severity: Minor
                                                                                                                                                                                                                                                                                                                                Found in app/assets/javascripts/blazer/Chart.js and 1 other location - About 55 mins to fix
                                                                                                                                                                                                                                                                                                                                app/assets/javascripts/blazer/Chart.js on lines 9755..9758

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

                                                                                                                                                                                                                                                                                                                                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

                                                                                                                                                                                                                                                                                                                                            label: function(tooltipItem, data) {
                                                                                                                                                                                                                                                                                                                                                var datasetLabel = data.datasets[tooltipItem.datasetIndex].label || '';
                                                                                                                                                                                                                                                                                                                                                return datasetLabel + ': ' + tooltipItem.yLabel;
                                                                                                                                                                                                                                                                                                                                            },
                                                                                                                                                                                                                                                                                                                                Severity: Minor
                                                                                                                                                                                                                                                                                                                                Found in app/assets/javascripts/blazer/Chart.js and 1 other location - About 55 mins to fix
                                                                                                                                                                                                                                                                                                                                app/assets/javascripts/blazer/Chart.js on lines 2181..2184

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

                                                                                                                                                                                                                                                                                                                                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

                                                                                                                                                                                                                                                                                                                                                label: function(tooltipItem, data) {
                                                                                                                                                                                                                                                                                                                                                    var datasetLabel = data.datasets[tooltipItem.datasetIndex].label || '';
                                                                                                                                                                                                                                                                                                                                                    return datasetLabel + ': ' + tooltipItem.xLabel;
                                                                                                                                                                                                                                                                                                                                                }
                                                                                                                                                                                                                                                                                                                                Severity: Minor
                                                                                                                                                                                                                                                                                                                                Found in app/assets/javascripts/blazer/Chart.js and 1 other location - About 55 mins to fix
                                                                                                                                                                                                                                                                                                                                app/assets/javascripts/blazer/Chart.js on lines 8869..8872

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

                                                                                                                                                                                                                                                                                                                                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

                                                                                                                                                                                                                                                                                                                                            return {
                                                                                                                                                                                                                                                                                                                                                x: vm.x + (Math.cos(centreAngle) * rangeFromCentre),
                                                                                                                                                                                                                                                                                                                                                y: vm.y + (Math.sin(centreAngle) * rangeFromCentre)
                                                                                                                                                                                                                                                                                                                                            };
                                                                                                                                                                                                                                                                                                                                Severity: Minor
                                                                                                                                                                                                                                                                                                                                Found in app/assets/javascripts/blazer/Chart.js and 1 other location - About 55 mins to fix
                                                                                                                                                                                                                                                                                                                                app/assets/javascripts/blazer/Chart.js on lines 9741..9744

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

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

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

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

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

                                                                                                                                                                                                                                                                                                                                Refactorings

                                                                                                                                                                                                                                                                                                                                Further Reading

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

                                                                                                                                                                                                                                                                                                                                                            if (me.max === null) {
                                                                                                                                                                                                                                                                                                                                                                me.max = value;
                                                                                                                                                                                                                                                                                                                                                            } else if (value > me.max) {
                                                                                                                                                                                                                                                                                                                                                                me.max = value;
                                                                                                                                                                                                                                                                                                                                                            }
                                                                                                                                                                                                                                                                                                                                Severity: Major
                                                                                                                                                                                                                                                                                                                                Found in app/assets/javascripts/blazer/Chart.js and 3 other locations - About 55 mins to fix
                                                                                                                                                                                                                                                                                                                                app/assets/javascripts/blazer/Chart.js on lines 10871..10875
                                                                                                                                                                                                                                                                                                                                app/assets/javascripts/blazer/Chart.js on lines 11152..11156
                                                                                                                                                                                                                                                                                                                                app/assets/javascripts/blazer/Chart.js on lines 11158..11162

                                                                                                                                                                                                                                                                                                                                Duplicated Code

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

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

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

                                                                                                                                                                                                                                                                                                                                Tuning

                                                                                                                                                                                                                                                                                                                                This issue has a mass of 53.

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

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

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

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

                                                                                                                                                                                                                                                                                                                                Refactorings

                                                                                                                                                                                                                                                                                                                                Further Reading

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

                                                                                                                                                                                                                                                                                                                                                            if (me.max === null) {
                                                                                                                                                                                                                                                                                                                                                                me.max = value;
                                                                                                                                                                                                                                                                                                                                                            } else if (value > me.max) {
                                                                                                                                                                                                                                                                                                                                                                me.max = value;
                                                                                                                                                                                                                                                                                                                                                            }
                                                                                                                                                                                                                                                                                                                                Severity: Major
                                                                                                                                                                                                                                                                                                                                Found in app/assets/javascripts/blazer/Chart.js and 3 other locations - About 55 mins to fix
                                                                                                                                                                                                                                                                                                                                app/assets/javascripts/blazer/Chart.js on lines 10871..10875
                                                                                                                                                                                                                                                                                                                                app/assets/javascripts/blazer/Chart.js on lines 10877..10881
                                                                                                                                                                                                                                                                                                                                app/assets/javascripts/blazer/Chart.js on lines 11152..11156

                                                                                                                                                                                                                                                                                                                                Duplicated Code

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

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

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

                                                                                                                                                                                                                                                                                                                                Tuning

                                                                                                                                                                                                                                                                                                                                This issue has a mass of 53.

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

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

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

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

                                                                                                                                                                                                                                                                                                                                Refactorings

                                                                                                                                                                                                                                                                                                                                Further Reading

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

                                                                                                                                                                                                                                                                                                                                                            if (me.min === null) {
                                                                                                                                                                                                                                                                                                                                                                me.min = value;
                                                                                                                                                                                                                                                                                                                                                            } else if (value < me.min) {
                                                                                                                                                                                                                                                                                                                                                                me.min = value;
                                                                                                                                                                                                                                                                                                                                                            }
                                                                                                                                                                                                                                                                                                                                Severity: Major
                                                                                                                                                                                                                                                                                                                                Found in app/assets/javascripts/blazer/Chart.js and 3 other locations - About 55 mins to fix
                                                                                                                                                                                                                                                                                                                                app/assets/javascripts/blazer/Chart.js on lines 10877..10881
                                                                                                                                                                                                                                                                                                                                app/assets/javascripts/blazer/Chart.js on lines 11152..11156
                                                                                                                                                                                                                                                                                                                                app/assets/javascripts/blazer/Chart.js on lines 11158..11162

                                                                                                                                                                                                                                                                                                                                Duplicated Code

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

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

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

                                                                                                                                                                                                                                                                                                                                Tuning

                                                                                                                                                                                                                                                                                                                                This issue has a mass of 53.

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

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

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

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

                                                                                                                                                                                                                                                                                                                                Refactorings

                                                                                                                                                                                                                                                                                                                                Further Reading

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

                                                                                                                                                                                                                                                                                                                                                            if (me.min === null) {
                                                                                                                                                                                                                                                                                                                                                                me.min = value;
                                                                                                                                                                                                                                                                                                                                                            } else if (value < me.min) {
                                                                                                                                                                                                                                                                                                                                                                me.min = value;
                                                                                                                                                                                                                                                                                                                                                            }
                                                                                                                                                                                                                                                                                                                                Severity: Major
                                                                                                                                                                                                                                                                                                                                Found in app/assets/javascripts/blazer/Chart.js and 3 other locations - About 55 mins to fix
                                                                                                                                                                                                                                                                                                                                app/assets/javascripts/blazer/Chart.js on lines 10871..10875
                                                                                                                                                                                                                                                                                                                                app/assets/javascripts/blazer/Chart.js on lines 10877..10881
                                                                                                                                                                                                                                                                                                                                app/assets/javascripts/blazer/Chart.js on lines 11158..11162

                                                                                                                                                                                                                                                                                                                                Duplicated Code

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

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

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

                                                                                                                                                                                                                                                                                                                                Tuning

                                                                                                                                                                                                                                                                                                                                This issue has a mass of 53.

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

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

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

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

                                                                                                                                                                                                                                                                                                                                Refactorings

                                                                                                                                                                                                                                                                                                                                Further Reading

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

                                                                                                                                                                                                                                                                                                                                        removeHoverStyle: function(arc) {
                                                                                                                                                                                                                                                                                                                                            Chart.DatasetController.prototype.removeHoverStyle.call(this, arc, this.chart.options.elements.arc);
                                                                                                                                                                                                                                                                                                                                        },
                                                                                                                                                                                                                                                                                                                                Severity: Minor
                                                                                                                                                                                                                                                                                                                                Found in app/assets/javascripts/blazer/Chart.js and 1 other location - About 50 mins to fix
                                                                                                                                                                                                                                                                                                                                app/assets/javascripts/blazer/Chart.js on lines 2763..2765

                                                                                                                                                                                                                                                                                                                                Duplicated Code

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

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

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

                                                                                                                                                                                                                                                                                                                                Tuning

                                                                                                                                                                                                                                                                                                                                This issue has a mass of 52.

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

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

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

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

                                                                                                                                                                                                                                                                                                                                Refactorings

                                                                                                                                                                                                                                                                                                                                Further Reading

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

                                                                                                                                                                                                                                                                                                                                        removeHoverStyle: function(arc) {
                                                                                                                                                                                                                                                                                                                                            Chart.DatasetController.prototype.removeHoverStyle.call(this, arc, this.chart.options.elements.arc);
                                                                                                                                                                                                                                                                                                                                        },
                                                                                                                                                                                                                                                                                                                                Severity: Minor
                                                                                                                                                                                                                                                                                                                                Found in app/assets/javascripts/blazer/Chart.js and 1 other location - About 50 mins to fix
                                                                                                                                                                                                                                                                                                                                app/assets/javascripts/blazer/Chart.js on lines 3345..3347

                                                                                                                                                                                                                                                                                                                                Duplicated Code

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

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

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

                                                                                                                                                                                                                                                                                                                                Tuning

                                                                                                                                                                                                                                                                                                                                This issue has a mass of 52.

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

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

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

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

                                                                                                                                                                                                                                                                                                                                Refactorings

                                                                                                                                                                                                                                                                                                                                Further Reading

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

                                                                                                                                                                                                                                                                                                                                                if (me.animations[i].animationObject.onAnimationProgress && me.animations[i].animationObject.onAnimationProgress.call) {
                                                                                                                                                                                                                                                                                                                                                    me.animations[i].animationObject.onAnimationProgress.call(me.animations[i].chartInstance, me.animations[i]);
                                                                                                                                                                                                                                                                                                                                                }
                                                                                                                                                                                                                                                                                                                                Severity: Minor
                                                                                                                                                                                                                                                                                                                                Found in app/assets/javascripts/blazer/Chart.js and 1 other location - About 50 mins to fix
                                                                                                                                                                                                                                                                                                                                app/assets/javascripts/blazer/Chart.js on lines 3671..3673

                                                                                                                                                                                                                                                                                                                                Duplicated Code

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

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

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

                                                                                                                                                                                                                                                                                                                                Tuning

                                                                                                                                                                                                                                                                                                                                This issue has a mass of 52.

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

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

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

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

                                                                                                                                                                                                                                                                                                                                Refactorings

                                                                                                                                                                                                                                                                                                                                Further Reading

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

                                                                                                                                                                                                                                                                                                                                            bottomBoxes.sort(function(a, b) {
                                                                                                                                                                                                                                                                                                                                                return (a.options.fullWidth ? 1 : 0) - (b.options.fullWidth ? 1 : 0);
                                                                                                                                                                                                                                                                                                                                            });
                                                                                                                                                                                                                                                                                                                                Severity: Minor
                                                                                                                                                                                                                                                                                                                                Found in app/assets/javascripts/blazer/Chart.js and 1 other location - About 50 mins to fix
                                                                                                                                                                                                                                                                                                                                app/assets/javascripts/blazer/Chart.js on lines 6404..6406

                                                                                                                                                                                                                                                                                                                                Duplicated Code

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

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

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

                                                                                                                                                                                                                                                                                                                                Tuning

                                                                                                                                                                                                                                                                                                                                This issue has a mass of 52.

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

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

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

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

                                                                                                                                                                                                                                                                                                                                Refactorings

                                                                                                                                                                                                                                                                                                                                Further Reading

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

                                                                                                                                                                                                                                                                                                                                            topBoxes.sort(function(a, b) {
                                                                                                                                                                                                                                                                                                                                                return (b.options.fullWidth ? 1 : 0) - (a.options.fullWidth ? 1 : 0);
                                                                                                                                                                                                                                                                                                                                            });
                                                                                                                                                                                                                                                                                                                                Severity: Minor
                                                                                                                                                                                                                                                                                                                                Found in app/assets/javascripts/blazer/Chart.js and 1 other location - About 50 mins to fix
                                                                                                                                                                                                                                                                                                                                app/assets/javascripts/blazer/Chart.js on lines 6407..6409

                                                                                                                                                                                                                                                                                                                                Duplicated Code

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

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

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

                                                                                                                                                                                                                                                                                                                                Tuning

                                                                                                                                                                                                                                                                                                                                This issue has a mass of 52.

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

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

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

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

                                                                                                                                                                                                                                                                                                                                Refactorings

                                                                                                                                                                                                                                                                                                                                Further Reading

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

                                                                                                                                                                                                                                                                                                                                        if (lf(model.x)) {
                                                                                                                                                                                                                                                                                                                                            xAlign = 'left';
                                                                                                                                                                                                                                                                                                                                
                                                                                                                                                                                                                                                                                                                                            // Is tooltip too wide and goes over the right side of the chart.?
                                                                                                                                                                                                                                                                                                                                            if (olf(model.x)) {
                                                                                                                                                                                                                                                                                                                                Severity: Minor
                                                                                                                                                                                                                                                                                                                                Found in app/assets/javascripts/blazer/Chart.js and 1 other location - About 50 mins to fix
                                                                                                                                                                                                                                                                                                                                app/assets/javascripts/blazer/Chart.js on lines 9102..9110

                                                                                                                                                                                                                                                                                                                                Duplicated Code

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

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

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

                                                                                                                                                                                                                                                                                                                                Tuning

                                                                                                                                                                                                                                                                                                                                This issue has a mass of 52.

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

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

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

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

                                                                                                                                                                                                                                                                                                                                Refactorings

                                                                                                                                                                                                                                                                                                                                Further Reading

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

                                                                                                                                                                                                                                                                                                                                                    if (me.animations[i].animationObject.onAnimationComplete && me.animations[i].animationObject.onAnimationComplete.call) {
                                                                                                                                                                                                                                                                                                                                                        me.animations[i].animationObject.onAnimationComplete.call(me.animations[i].chartInstance, me.animations[i]);
                                                                                                                                                                                                                                                                                                                                                    }
                                                                                                                                                                                                                                                                                                                                Severity: Minor
                                                                                                                                                                                                                                                                                                                                Found in app/assets/javascripts/blazer/Chart.js and 1 other location - About 50 mins to fix
                                                                                                                                                                                                                                                                                                                                app/assets/javascripts/blazer/Chart.js on lines 3666..3668

                                                                                                                                                                                                                                                                                                                                Duplicated Code

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

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

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

                                                                                                                                                                                                                                                                                                                                Tuning

                                                                                                                                                                                                                                                                                                                                This issue has a mass of 52.

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

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

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

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

                                                                                                                                                                                                                                                                                                                                Refactorings

                                                                                                                                                                                                                                                                                                                                Further Reading

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

                                                                                                                                                                                                                                                                                                                                        } else if (rf(model.x)) {
                                                                                                                                                                                                                                                                                                                                            xAlign = 'right';
                                                                                                                                                                                                                                                                                                                                
                                                                                                                                                                                                                                                                                                                                            // Is tooltip too wide and goes outside left edge of canvas?
                                                                                                                                                                                                                                                                                                                                            if (orf(model.x)) {
                                                                                                                                                                                                                                                                                                                                Severity: Minor
                                                                                                                                                                                                                                                                                                                                Found in app/assets/javascripts/blazer/Chart.js and 1 other location - About 50 mins to fix
                                                                                                                                                                                                                                                                                                                                app/assets/javascripts/blazer/Chart.js on lines 9094..9110

                                                                                                                                                                                                                                                                                                                                Duplicated Code

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

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

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

                                                                                                                                                                                                                                                                                                                                Tuning

                                                                                                                                                                                                                                                                                                                                This issue has a mass of 52.

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

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

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

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

                                                                                                                                                                                                                                                                                                                                Refactorings

                                                                                                                                                                                                                                                                                                                                Further Reading

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

                                                                                                                                                                                                                                                                                                                                            model.borderColor = custom.hoverBorderColor ? custom.hoverBorderColor : helpers.getValueAtIndexOrDefault(dataset.hoverBorderColor, index, helpers.getHoverColor(model.borderColor));
                                                                                                                                                                                                                                                                                                                                Severity: Major
                                                                                                                                                                                                                                                                                                                                Found in app/assets/javascripts/blazer/Chart.js and 3 other locations - About 50 mins to fix
                                                                                                                                                                                                                                                                                                                                app/assets/javascripts/blazer/Chart.js on lines 2114..2114
                                                                                                                                                                                                                                                                                                                                app/assets/javascripts/blazer/Chart.js on lines 3536..3536
                                                                                                                                                                                                                                                                                                                                app/assets/javascripts/blazer/Chart.js on lines 3537..3537

                                                                                                                                                                                                                                                                                                                                Duplicated Code

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

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

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

                                                                                                                                                                                                                                                                                                                                Tuning

                                                                                                                                                                                                                                                                                                                                This issue has a mass of 51.

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

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

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

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

                                                                                                                                                                                                                                                                                                                                Refactorings

                                                                                                                                                                                                                                                                                                                                Further Reading

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

                                                                                                                                                                                                                                                                                                                                            model.backgroundColor = custom.hoverBackgroundColor ? custom.hoverBackgroundColor : helpers.getValueAtIndexOrDefault(dataset.hoverBackgroundColor, index, helpers.getHoverColor(model.backgroundColor));
                                                                                                                                                                                                                                                                                                                                Severity: Major
                                                                                                                                                                                                                                                                                                                                Found in app/assets/javascripts/blazer/Chart.js and 3 other locations - About 50 mins to fix
                                                                                                                                                                                                                                                                                                                                app/assets/javascripts/blazer/Chart.js on lines 2115..2115
                                                                                                                                                                                                                                                                                                                                app/assets/javascripts/blazer/Chart.js on lines 3536..3536
                                                                                                                                                                                                                                                                                                                                app/assets/javascripts/blazer/Chart.js on lines 3537..3537

                                                                                                                                                                                                                                                                                                                                Duplicated Code

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

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

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

                                                                                                                                                                                                                                                                                                                                Tuning

                                                                                                                                                                                                                                                                                                                                This issue has a mass of 51.

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

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

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

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

                                                                                                                                                                                                                                                                                                                                Refactorings

                                                                                                                                                                                                                                                                                                                                Further Reading

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

                                                                                                                                                                                                                                                                                                                                            model.backgroundColor = custom.hoverBackgroundColor ? custom.hoverBackgroundColor : helpers.getValueAtIndexOrDefault(dataset.pointHoverBackgroundColor, index, helpers.getHoverColor(model.backgroundColor));
                                                                                                                                                                                                                                                                                                                                Severity: Major
                                                                                                                                                                                                                                                                                                                                Found in app/assets/javascripts/blazer/Chart.js and 3 other locations - About 50 mins to fix
                                                                                                                                                                                                                                                                                                                                app/assets/javascripts/blazer/Chart.js on lines 2114..2114
                                                                                                                                                                                                                                                                                                                                app/assets/javascripts/blazer/Chart.js on lines 2115..2115
                                                                                                                                                                                                                                                                                                                                app/assets/javascripts/blazer/Chart.js on lines 3537..3537

                                                                                                                                                                                                                                                                                                                                Duplicated Code

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

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

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

                                                                                                                                                                                                                                                                                                                                Tuning

                                                                                                                                                                                                                                                                                                                                This issue has a mass of 51.

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

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

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

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

                                                                                                                                                                                                                                                                                                                                Refactorings

                                                                                                                                                                                                                                                                                                                                Further Reading

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

                                                                                                                                                                                                                                                                                                                                            model.borderColor = custom.hoverBorderColor ? custom.hoverBorderColor : helpers.getValueAtIndexOrDefault(dataset.pointHoverBorderColor, index, helpers.getHoverColor(model.borderColor));
                                                                                                                                                                                                                                                                                                                                Severity: Major
                                                                                                                                                                                                                                                                                                                                Found in app/assets/javascripts/blazer/Chart.js and 3 other locations - About 50 mins to fix
                                                                                                                                                                                                                                                                                                                                app/assets/javascripts/blazer/Chart.js on lines 2114..2114
                                                                                                                                                                                                                                                                                                                                app/assets/javascripts/blazer/Chart.js on lines 2115..2115
                                                                                                                                                                                                                                                                                                                                app/assets/javascripts/blazer/Chart.js on lines 3536..3536

                                                                                                                                                                                                                                                                                                                                Duplicated Code

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

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

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

                                                                                                                                                                                                                                                                                                                                Tuning

                                                                                                                                                                                                                                                                                                                                This issue has a mass of 51.

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

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

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

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

                                                                                                                                                                                                                                                                                                                                Refactorings

                                                                                                                                                                                                                                                                                                                                Further Reading

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

                                                                                                                                                                                                                                                                                                                                                    if (gridLines.drawTicks) {
                                                                                                                                                                                                                                                                                                                                                        context.moveTo(itemToDraw.tx1, itemToDraw.ty1);
                                                                                                                                                                                                                                                                                                                                                        context.lineTo(itemToDraw.tx2, itemToDraw.ty2);
                                                                                                                                                                                                                                                                                                                                                    }
                                                                                                                                                                                                                                                                                                                                Severity: Minor
                                                                                                                                                                                                                                                                                                                                Found in app/assets/javascripts/blazer/Chart.js and 1 other location - About 50 mins to fix
                                                                                                                                                                                                                                                                                                                                app/assets/javascripts/blazer/Chart.js on lines 8238..8241

                                                                                                                                                                                                                                                                                                                                Duplicated Code

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

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

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

                                                                                                                                                                                                                                                                                                                                Tuning

                                                                                                                                                                                                                                                                                                                                This issue has a mass of 51.

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

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

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

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

                                                                                                                                                                                                                                                                                                                                Refactorings

                                                                                                                                                                                                                                                                                                                                Further Reading

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

                                                                                                                                                                                                                                                                                                                                                    if (gridLines.drawOnChartArea) {
                                                                                                                                                                                                                                                                                                                                                        context.moveTo(itemToDraw.x1, itemToDraw.y1);
                                                                                                                                                                                                                                                                                                                                                        context.lineTo(itemToDraw.x2, itemToDraw.y2);
                                                                                                                                                                                                                                                                                                                                                    }
                                                                                                                                                                                                                                                                                                                                Severity: Minor
                                                                                                                                                                                                                                                                                                                                Found in app/assets/javascripts/blazer/Chart.js and 1 other location - About 50 mins to fix
                                                                                                                                                                                                                                                                                                                                app/assets/javascripts/blazer/Chart.js on lines 8233..8236

                                                                                                                                                                                                                                                                                                                                Duplicated Code

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

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

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

                                                                                                                                                                                                                                                                                                                                Tuning

                                                                                                                                                                                                                                                                                                                                This issue has a mass of 51.

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

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

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

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

                                                                                                                                                                                                                                                                                                                                Refactorings

                                                                                                                                                                                                                                                                                                                                Further Reading

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

                                                                                                                                                                                                                                                                                                                                                    } else {
                                                                                                                                                                                                                                                                                                                                                        // top
                                                                                                                                                                                                                                                                                                                                                        textBaseline = !isRotated? 'bottom':'middle';
                                                                                                                                                                                                                                                                                                                                                        textAlign = !isRotated? 'center': 'left';
                                                                                                                                                                                                                                                                                                                                                        labelY = me.bottom - tl;
                                                                                                                                                                                                                                                                                                                                Severity: Minor
                                                                                                                                                                                                                                                                                                                                Found in app/assets/javascripts/blazer/Chart.js and 1 other location - About 45 mins to fix
                                                                                                                                                                                                                                                                                                                                app/assets/javascripts/blazer/Chart.js on lines 8152..8157

                                                                                                                                                                                                                                                                                                                                Duplicated Code

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

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

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

                                                                                                                                                                                                                                                                                                                                Tuning

                                                                                                                                                                                                                                                                                                                                This issue has a mass of 50.

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

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

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

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

                                                                                                                                                                                                                                                                                                                                Refactorings

                                                                                                                                                                                                                                                                                                                                Further Reading

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

                                                                                                                                                                                                                                                                                                                                                    if (options.position === 'bottom') {
                                                                                                                                                                                                                                                                                                                                                        // bottom
                                                                                                                                                                                                                                                                                                                                                        textBaseline = !isRotated? 'top':'middle';
                                                                                                                                                                                                                                                                                                                                                        textAlign = !isRotated? 'center': 'right';
                                                                                                                                                                                                                                                                                                                                                        labelY = me.top + tl;
                                                                                                                                                                                                                                                                                                                                Severity: Minor
                                                                                                                                                                                                                                                                                                                                Found in app/assets/javascripts/blazer/Chart.js and 1 other location - About 45 mins to fix
                                                                                                                                                                                                                                                                                                                                app/assets/javascripts/blazer/Chart.js on lines 8157..8162

                                                                                                                                                                                                                                                                                                                                Duplicated Code

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

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

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

                                                                                                                                                                                                                                                                                                                                Tuning

                                                                                                                                                                                                                                                                                                                                This issue has a mass of 50.

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

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

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

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

                                                                                                                                                                                                                                                                                                                                Refactorings

                                                                                                                                                                                                                                                                                                                                Further Reading

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

                                                                                                                                                                                                                                                                                                                                                } else {
                                                                                                                                                                                                                                                                                                                                                    x1 = x2 = options.position === 'left' ? me.right : me.left;
                                                                                                                                                                                                                                                                                                                                                    x1 += aliasPixel;
                                                                                                                                                                                                                                                                                                                                                    x2 += aliasPixel;
                                                                                                                                                                                                                                                                                                                                                }
                                                                                                                                                                                                                                                                                                                                Severity: Minor
                                                                                                                                                                                                                                                                                                                                Found in app/assets/javascripts/blazer/Chart.js and 1 other location - About 45 mins to fix
                                                                                                                                                                                                                                                                                                                                app/assets/javascripts/blazer/Chart.js on lines 8307..8311

                                                                                                                                                                                                                                                                                                                                Duplicated Code

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

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

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

                                                                                                                                                                                                                                                                                                                                Tuning

                                                                                                                                                                                                                                                                                                                                This issue has a mass of 50.

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

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

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

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

                                                                                                                                                                                                                                                                                                                                Refactorings

                                                                                                                                                                                                                                                                                                                                Further Reading

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

                                                                                                                                                                                                                                                                                                                                                if (isHorizontal) {
                                                                                                                                                                                                                                                                                                                                                    y1 = y2 = options.position === 'top' ? me.bottom : me.top;
                                                                                                                                                                                                                                                                                                                                                    y1 += aliasPixel;
                                                                                                                                                                                                                                                                                                                                                    y2 += aliasPixel;
                                                                                                                                                                                                                                                                                                                                                } else {
                                                                                                                                                                                                                                                                                                                                Severity: Minor
                                                                                                                                                                                                                                                                                                                                Found in app/assets/javascripts/blazer/Chart.js and 1 other location - About 45 mins to fix
                                                                                                                                                                                                                                                                                                                                app/assets/javascripts/blazer/Chart.js on lines 8311..8315

                                                                                                                                                                                                                                                                                                                                Duplicated Code

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

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

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

                                                                                                                                                                                                                                                                                                                                Tuning

                                                                                                                                                                                                                                                                                                                                This issue has a mass of 50.

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

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

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

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

                                                                                                                                                                                                                                                                                                                                Refactorings

                                                                                                                                                                                                                                                                                                                                Further Reading

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

                                                                                                                                                                                                                                                                                                                                        getLabelForIndex: function(index, datasetIndex) {
                                                                                                                                                                                                                                                                                                                                            return +this.getRightValue(this.chart.data.datasets[datasetIndex].data[index]);
                                                                                                                                                                                                                                                                                                                                        },
                                                                                                                                                                                                                                                                                                                                Severity: Minor
                                                                                                                                                                                                                                                                                                                                Found in app/assets/javascripts/blazer/Chart.js and 1 other location - About 40 mins to fix
                                                                                                                                                                                                                                                                                                                                app/assets/javascripts/blazer/Chart.js on lines 10912..10914

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

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

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

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

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

                                                                                                                                                                                                                                                                                                                                Refactorings

                                                                                                                                                                                                                                                                                                                                Further Reading

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

                                                                                                                                                                                                                                                                                                                                            'display:block;'+
                                                                                                                                                                                                                                                                                                                                            'overflow:hidden;'+
                                                                                                                                                                                                                                                                                                                                            'border:0;'+
                                                                                                                                                                                                                                                                                                                                            'margin:0;'+
                                                                                                                                                                                                                                                                                                                                            'top:0;'+
                                                                                                                                                                                                                                                                                                                                Severity: Major
                                                                                                                                                                                                                                                                                                                                Found in app/assets/javascripts/blazer/Chart.js and 2 other locations - About 40 mins to fix
                                                                                                                                                                                                                                                                                                                                app/assets/javascripts/blazer/daterangepicker.js on lines 100..112
                                                                                                                                                                                                                                                                                                                                app/assets/javascripts/blazer/vue.js on lines 3402..3414

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

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

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

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

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

                                                                                                                                                                                                                                                                                                                                Refactorings

                                                                                                                                                                                                                                                                                                                                Further Reading

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

                                                                                                                                                                                                                                                                                                                                        getLabelForIndex: function(index, datasetIndex) {
                                                                                                                                                                                                                                                                                                                                            return +this.getRightValue(this.chart.data.datasets[datasetIndex].data[index]);
                                                                                                                                                                                                                                                                                                                                        },
                                                                                                                                                                                                                                                                                                                                Severity: Minor
                                                                                                                                                                                                                                                                                                                                Found in app/assets/javascripts/blazer/Chart.js and 1 other location - About 40 mins to fix
                                                                                                                                                                                                                                                                                                                                app/assets/javascripts/blazer/Chart.js on lines 11659..11661

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

                                                                                                                                                                                                                                                                                                                                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

                                                                                                                                                                                                                                                                                                                                            helpers.each(me.data.datasets, function(dataset, datasetIndex) {
                                                                                                                                                                                                                                                                                                                                                me.getDatasetMeta(datasetIndex).controller.buildOrUpdateElements();
                                                                                                                                                                                                                                                                                                                                            }, me);
                                                                                                                                                                                                                                                                                                                                Severity: Minor
                                                                                                                                                                                                                                                                                                                                Found in app/assets/javascripts/blazer/Chart.js and 1 other location - About 40 mins to fix
                                                                                                                                                                                                                                                                                                                                app/assets/javascripts/blazer/Chart.js on lines 4118..4120

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

                                                                                                                                                                                                                                                                                                                                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

                                                                                                                                                                                                                                                                                                                                    opaquer: function (ratio) {
                                                                                                                                                                                                                                                                                                                                        var alpha = this.values.alpha;
                                                                                                                                                                                                                                                                                                                                        this.setValues('alpha', alpha + (alpha * ratio));
                                                                                                                                                                                                                                                                                                                                        return this;
                                                                                                                                                                                                                                                                                                                                    },
                                                                                                                                                                                                                                                                                                                                Severity: Minor
                                                                                                                                                                                                                                                                                                                                Found in app/assets/javascripts/blazer/Chart.js and 1 other location - About 40 mins to fix
                                                                                                                                                                                                                                                                                                                                app/assets/javascripts/blazer/Chart.js on lines 517..521

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

                                                                                                                                                                                                                                                                                                                                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

                                                                                                                                                                                                                                                                                                                                    clearer: function (ratio) {
                                                                                                                                                                                                                                                                                                                                        var alpha = this.values.alpha;
                                                                                                                                                                                                                                                                                                                                        this.setValues('alpha', alpha - (alpha * ratio));
                                                                                                                                                                                                                                                                                                                                        return this;
                                                                                                                                                                                                                                                                                                                                    },
                                                                                                                                                                                                                                                                                                                                Severity: Minor
                                                                                                                                                                                                                                                                                                                                Found in app/assets/javascripts/blazer/Chart.js and 1 other location - About 40 mins to fix
                                                                                                                                                                                                                                                                                                                                app/assets/javascripts/blazer/Chart.js on lines 523..527

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

                                                                                                                                                                                                                                                                                                                                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

                                                                                                                                                                                                                                                                                                                                            helpers.each(me.data.datasets, function(dataset, datasetIndex) {
                                                                                                                                                                                                                                                                                                                                                me.getDatasetMeta(datasetIndex).controller.reset();
                                                                                                                                                                                                                                                                                                                                            }, me);
                                                                                                                                                                                                                                                                                                                                Severity: Minor
                                                                                                                                                                                                                                                                                                                                Found in app/assets/javascripts/blazer/Chart.js and 1 other location - About 40 mins to fix
                                                                                                                                                                                                                                                                                                                                app/assets/javascripts/blazer/Chart.js on lines 4147..4149

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

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

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

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

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

                                                                                                                                                                                                                                                                                                                                Refactorings

                                                                                                                                                                                                                                                                                                                                Further Reading

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

                                                                                                                                                                                                                                                                                                                                            return me.beginAtZero ? 0:
                                                                                                                                                                                                                                                                                                                                                min < 0 && max < 0? max :
                                                                                                                                                                                                                                                                                                                                                min > 0 && max > 0? min :
                                                                                                                                                                                                                                                                                                                                                0;
                                                                                                                                                                                                                                                                                                                                Severity: Minor
                                                                                                                                                                                                                                                                                                                                Found in app/assets/javascripts/blazer/Chart.js and 1 other location - About 35 mins to fix
                                                                                                                                                                                                                                                                                                                                app/assets/javascripts/blazer/Chart.js on lines 11744..11747

                                                                                                                                                                                                                                                                                                                                Duplicated Code

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

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

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

                                                                                                                                                                                                                                                                                                                                Tuning

                                                                                                                                                                                                                                                                                                                                This issue has a mass of 47.

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

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

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

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

                                                                                                                                                                                                                                                                                                                                Refactorings

                                                                                                                                                                                                                                                                                                                                Further Reading

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

                                                                                                                                                                                                                                                                                                                                                me.beginAtZero? 0:
                                                                                                                                                                                                                                                                                                                                                min < 0 && max < 0? max :
                                                                                                                                                                                                                                                                                                                                                min > 0 && max > 0? min :
                                                                                                                                                                                                                                                                                                                                                0);
                                                                                                                                                                                                                                                                                                                                Severity: Minor
                                                                                                                                                                                                                                                                                                                                Found in app/assets/javascripts/blazer/Chart.js and 1 other location - About 35 mins to fix
                                                                                                                                                                                                                                                                                                                                app/assets/javascripts/blazer/Chart.js on lines 8035..8038

                                                                                                                                                                                                                                                                                                                                Duplicated Code

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

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

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

                                                                                                                                                                                                                                                                                                                                Tuning

                                                                                                                                                                                                                                                                                                                                This issue has a mass of 47.

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

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

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

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

                                                                                                                                                                                                                                                                                                                                Refactorings

                                                                                                                                                                                                                                                                                                                                Further Reading

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

                                                                                                                                                                                                                                                                                                                                  b = b > 0.0031308 ? ((1.055 * Math.pow(b, 1.0 / 2.4)) - 0.055)
                                                                                                                                                                                                                                                                                                                                    : b = (b * 12.92);
                                                                                                                                                                                                                                                                                                                                Severity: Minor
                                                                                                                                                                                                                                                                                                                                Found in app/assets/javascripts/blazer/Chart.js and 1 other location - About 35 mins to fix
                                                                                                                                                                                                                                                                                                                                app/assets/javascripts/blazer/Chart.js on lines 1138..1139

                                                                                                                                                                                                                                                                                                                                Duplicated Code

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

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

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

                                                                                                                                                                                                                                                                                                                                Tuning

                                                                                                                                                                                                                                                                                                                                This issue has a mass of 46.

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

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

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

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

                                                                                                                                                                                                                                                                                                                                Refactorings

                                                                                                                                                                                                                                                                                                                                Further Reading

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

                                                                                                                                                                                                                                                                                                                                                helpers.each(topBoxes, function(box) {
                                                                                                                                                                                                                                                                                                                                                    if (!box.options.fullWidth) {
                                                                                                                                                                                                                                                                                                                                                        box.width = newMaxChartAreaWidth;
                                                                                                                                                                                                                                                                                                                                                    }
                                                                                                                                                                                                                                                                                                                                                });
                                                                                                                                                                                                                                                                                                                                Severity: Minor
                                                                                                                                                                                                                                                                                                                                Found in app/assets/javascripts/blazer/Chart.js and 1 other location - About 35 mins to fix
                                                                                                                                                                                                                                                                                                                                app/assets/javascripts/blazer/Chart.js on lines 6634..6638

                                                                                                                                                                                                                                                                                                                                Duplicated Code

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

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

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

                                                                                                                                                                                                                                                                                                                                Tuning

                                                                                                                                                                                                                                                                                                                                This issue has a mass of 46.

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

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

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

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

                                                                                                                                                                                                                                                                                                                                Refactorings

                                                                                                                                                                                                                                                                                                                                Further Reading

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

                                                                                                                                                                                                                                                                                                                                            helpers.each(scalesOptions.xAxes, function(xAxisOptions, index) {
                                                                                                                                                                                                                                                                                                                                                xAxisOptions.id = xAxisOptions.id || ('x-axis-' + index);
                                                                                                                                                                                                                                                                                                                                            });
                                                                                                                                                                                                                                                                                                                                Severity: Minor
                                                                                                                                                                                                                                                                                                                                Found in app/assets/javascripts/blazer/Chart.js and 1 other location - About 35 mins to fix
                                                                                                                                                                                                                                                                                                                                app/assets/javascripts/blazer/Chart.js on lines 4018..4020

                                                                                                                                                                                                                                                                                                                                Duplicated Code

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

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

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

                                                                                                                                                                                                                                                                                                                                Tuning

                                                                                                                                                                                                                                                                                                                                This issue has a mass of 46.

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

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

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

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

                                                                                                                                                                                                                                                                                                                                Refactorings

                                                                                                                                                                                                                                                                                                                                Further Reading

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

                                                                                                                                                                                                                                                                                                                                  g = g > 0.0031308 ? ((1.055 * Math.pow(g, 1.0 / 2.4)) - 0.055)
                                                                                                                                                                                                                                                                                                                                    : g = (g * 12.92);
                                                                                                                                                                                                                                                                                                                                Severity: Minor
                                                                                                                                                                                                                                                                                                                                Found in app/assets/javascripts/blazer/Chart.js and 1 other location - About 35 mins to fix
                                                                                                                                                                                                                                                                                                                                app/assets/javascripts/blazer/Chart.js on lines 1141..1142

                                                                                                                                                                                                                                                                                                                                Duplicated Code

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

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

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

                                                                                                                                                                                                                                                                                                                                Tuning

                                                                                                                                                                                                                                                                                                                                This issue has a mass of 46.

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

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

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

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

                                                                                                                                                                                                                                                                                                                                Refactorings

                                                                                                                                                                                                                                                                                                                                Further Reading

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

                                                                                                                                                                                                                                                                                                                                            helpers.each(scalesOptions.yAxes, function(yAxisOptions, index) {
                                                                                                                                                                                                                                                                                                                                                yAxisOptions.id = yAxisOptions.id || ('y-axis-' + index);
                                                                                                                                                                                                                                                                                                                                            });
                                                                                                                                                                                                                                                                                                                                Severity: Minor
                                                                                                                                                                                                                                                                                                                                Found in app/assets/javascripts/blazer/Chart.js and 1 other location - About 35 mins to fix
                                                                                                                                                                                                                                                                                                                                app/assets/javascripts/blazer/Chart.js on lines 4014..4016

                                                                                                                                                                                                                                                                                                                                Duplicated Code

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

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

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

                                                                                                                                                                                                                                                                                                                                Tuning

                                                                                                                                                                                                                                                                                                                                This issue has a mass of 46.

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

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

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

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

                                                                                                                                                                                                                                                                                                                                Refactorings

                                                                                                                                                                                                                                                                                                                                Further Reading

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

                                                                                                                                                                                                                                                                                                                                        mouseX = Math.round((mouseX - boundingRect.left - paddingLeft) / (width) * canvas.width / chart.currentDevicePixelRatio);
                                                                                                                                                                                                                                                                                                                                Severity: Minor
                                                                                                                                                                                                                                                                                                                                Found in app/assets/javascripts/blazer/Chart.js and 1 other location - About 35 mins to fix
                                                                                                                                                                                                                                                                                                                                app/assets/javascripts/blazer/Chart.js on lines 5697..5697

                                                                                                                                                                                                                                                                                                                                Duplicated Code

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

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

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

                                                                                                                                                                                                                                                                                                                                Tuning

                                                                                                                                                                                                                                                                                                                                This issue has a mass of 46.

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

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

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

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

                                                                                                                                                                                                                                                                                                                                Refactorings

                                                                                                                                                                                                                                                                                                                                Further Reading

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

                                                                                                                                                                                                                                                                                                                                                helpers.each(bottomBoxes, function(box) {
                                                                                                                                                                                                                                                                                                                                                    if (!box.options.fullWidth) {
                                                                                                                                                                                                                                                                                                                                                        box.width = newMaxChartAreaWidth;
                                                                                                                                                                                                                                                                                                                                                    }
                                                                                                                                                                                                                                                                                                                                                });
                                                                                                                                                                                                                                                                                                                                Severity: Minor
                                                                                                                                                                                                                                                                                                                                Found in app/assets/javascripts/blazer/Chart.js and 1 other location - About 35 mins to fix
                                                                                                                                                                                                                                                                                                                                app/assets/javascripts/blazer/Chart.js on lines 6628..6632

                                                                                                                                                                                                                                                                                                                                Duplicated Code

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

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

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

                                                                                                                                                                                                                                                                                                                                Tuning

                                                                                                                                                                                                                                                                                                                                This issue has a mass of 46.

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

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

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

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

                                                                                                                                                                                                                                                                                                                                Refactorings

                                                                                                                                                                                                                                                                                                                                Further Reading

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

                                                                                                                                                                                                                                                                                                                                        mouseY = Math.round((mouseY - boundingRect.top - paddingTop) / (height) * canvas.height / chart.currentDevicePixelRatio);
                                                                                                                                                                                                                                                                                                                                Severity: Minor
                                                                                                                                                                                                                                                                                                                                Found in app/assets/javascripts/blazer/Chart.js and 1 other location - About 35 mins to fix
                                                                                                                                                                                                                                                                                                                                app/assets/javascripts/blazer/Chart.js on lines 5696..5696

                                                                                                                                                                                                                                                                                                                                Duplicated Code

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

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

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

                                                                                                                                                                                                                                                                                                                                Tuning

                                                                                                                                                                                                                                                                                                                                This issue has a mass of 46.

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

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

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

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

                                                                                                                                                                                                                                                                                                                                Refactorings

                                                                                                                                                                                                                                                                                                                                Further Reading

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

                                                                                                                                                                                                                                                                                                                                            if (vLimits.start < furthestLimits.t) {
                                                                                                                                                                                                                                                                                                                                                furthestLimits.t = vLimits.start;
                                                                                                                                                                                                                                                                                                                                                furthestAngles.t = angleRadians;
                                                                                                                                                                                                                                                                                                                                            }
                                                                                                                                                                                                                                                                                                                                Severity: Major
                                                                                                                                                                                                                                                                                                                                Found in app/assets/javascripts/blazer/Chart.js and 3 other locations - About 30 mins to fix
                                                                                                                                                                                                                                                                                                                                app/assets/javascripts/blazer/Chart.js on lines 11460..11463
                                                                                                                                                                                                                                                                                                                                app/assets/javascripts/blazer/Chart.js on lines 11465..11468
                                                                                                                                                                                                                                                                                                                                app/assets/javascripts/blazer/Chart.js on lines 11475..11478

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

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

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

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

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

                                                                                                                                                                                                                                                                                                                                Refactorings

                                                                                                                                                                                                                                                                                                                                Further Reading

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

                                                                                                                                                                                                                                                                                                                                            if (hLimits.start < furthestLimits.l) {
                                                                                                                                                                                                                                                                                                                                                furthestLimits.l = hLimits.start;
                                                                                                                                                                                                                                                                                                                                                furthestAngles.l = angleRadians;
                                                                                                                                                                                                                                                                                                                                            }
                                                                                                                                                                                                                                                                                                                                Severity: Major
                                                                                                                                                                                                                                                                                                                                Found in app/assets/javascripts/blazer/Chart.js and 3 other locations - About 30 mins to fix
                                                                                                                                                                                                                                                                                                                                app/assets/javascripts/blazer/Chart.js on lines 11465..11468
                                                                                                                                                                                                                                                                                                                                app/assets/javascripts/blazer/Chart.js on lines 11470..11473
                                                                                                                                                                                                                                                                                                                                app/assets/javascripts/blazer/Chart.js on lines 11475..11478

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

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

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

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

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

                                                                                                                                                                                                                                                                                                                                Refactorings

                                                                                                                                                                                                                                                                                                                                Further Reading

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

                                                                                                                                                                                                                                                                                                                                            if (hLimits.end > furthestLimits.r) {
                                                                                                                                                                                                                                                                                                                                                furthestLimits.r = hLimits.end;
                                                                                                                                                                                                                                                                                                                                                furthestAngles.r = angleRadians;
                                                                                                                                                                                                                                                                                                                                            }
                                                                                                                                                                                                                                                                                                                                Severity: Major
                                                                                                                                                                                                                                                                                                                                Found in app/assets/javascripts/blazer/Chart.js and 3 other locations - About 30 mins to fix
                                                                                                                                                                                                                                                                                                                                app/assets/javascripts/blazer/Chart.js on lines 11460..11463
                                                                                                                                                                                                                                                                                                                                app/assets/javascripts/blazer/Chart.js on lines 11470..11473
                                                                                                                                                                                                                                                                                                                                app/assets/javascripts/blazer/Chart.js on lines 11475..11478

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

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

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

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

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

                                                                                                                                                                                                                                                                                                                                Refactorings

                                                                                                                                                                                                                                                                                                                                Further Reading

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

                                                                                                                                                                                                                                                                                                                                            if (vLimits.end > furthestLimits.b) {
                                                                                                                                                                                                                                                                                                                                                furthestLimits.b = vLimits.end;
                                                                                                                                                                                                                                                                                                                                                furthestAngles.b = angleRadians;
                                                                                                                                                                                                                                                                                                                                            }
                                                                                                                                                                                                                                                                                                                                Severity: Major
                                                                                                                                                                                                                                                                                                                                Found in app/assets/javascripts/blazer/Chart.js and 3 other locations - About 30 mins to fix
                                                                                                                                                                                                                                                                                                                                app/assets/javascripts/blazer/Chart.js on lines 11460..11463
                                                                                                                                                                                                                                                                                                                                app/assets/javascripts/blazer/Chart.js on lines 11465..11468
                                                                                                                                                                                                                                                                                                                                app/assets/javascripts/blazer/Chart.js on lines 11470..11473

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

                                                                                                                                                                                                                                                                                                                                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

                                                                                                                                                                                                                                                                                                                                            model.borderColor = custom.hoverBorderColor || helpers.getValueAtIndexOrDefault(dataset.pointHoverBorderColor, index, helpers.getHoverColor(model.borderColor));
                                                                                                                                                                                                                                                                                                                                Severity: Minor
                                                                                                                                                                                                                                                                                                                                Found in app/assets/javascripts/blazer/Chart.js and 1 other location - About 30 mins to fix
                                                                                                                                                                                                                                                                                                                                app/assets/javascripts/blazer/Chart.js on lines 3131..3131

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

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

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

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

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

                                                                                                                                                                                                                                                                                                                                Refactorings

                                                                                                                                                                                                                                                                                                                                Further Reading

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

                                                                                                                                                                                                                                                                                                                                                if ((longestRotatedLabel + optionTicks.autoSkipPadding) * me.ticks.length > (me.width - (me.paddingLeft + me.paddingRight))) {
                                                                                                                                                                                                                                                                                                                                Severity: Minor
                                                                                                                                                                                                                                                                                                                                Found in app/assets/javascripts/blazer/Chart.js and 1 other location - About 30 mins to fix
                                                                                                                                                                                                                                                                                                                                app/assets/javascripts/blazer/Chart.js on lines 8096..8096

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

                                                                                                                                                                                                                                                                                                                                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

                                                                                                                                                                                                                                                                                                                                        inXRange: function(mouseX) {
                                                                                                                                                                                                                                                                                                                                            var bounds = getBarBounds(this);
                                                                                                                                                                                                                                                                                                                                            return mouseX >= bounds.left && mouseX <= bounds.right;
                                                                                                                                                                                                                                                                                                                                        },
                                                                                                                                                                                                                                                                                                                                Severity: Minor
                                                                                                                                                                                                                                                                                                                                Found in app/assets/javascripts/blazer/Chart.js and 1 other location - About 30 mins to fix
                                                                                                                                                                                                                                                                                                                                app/assets/javascripts/blazer/Chart.js on lines 10254..10257

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

                                                                                                                                                                                                                                                                                                                                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

                                                                                                                                                                                                                                                                                                                                                model.controlPointPreviousY = Math.max(Math.min(controlPoints.previous.y, chartArea.bottom), chartArea.top);
                                                                                                                                                                                                                                                                                                                                Severity: Minor
                                                                                                                                                                                                                                                                                                                                Found in app/assets/javascripts/blazer/Chart.js and 1 other location - About 30 mins to fix
                                                                                                                                                                                                                                                                                                                                app/assets/javascripts/blazer/Chart.js on lines 3502..3502

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

                                                                                                                                                                                                                                                                                                                                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

                                                                                                                                                                                                                                                                                                                                        inYRange: function(mouseY) {
                                                                                                                                                                                                                                                                                                                                            var bounds = getBarBounds(this);
                                                                                                                                                                                                                                                                                                                                            return mouseY >= bounds.top && mouseY <= bounds.bottom;
                                                                                                                                                                                                                                                                                                                                        },
                                                                                                                                                                                                                                                                                                                                Severity: Minor
                                                                                                                                                                                                                                                                                                                                Found in app/assets/javascripts/blazer/Chart.js and 1 other location - About 30 mins to fix
                                                                                                                                                                                                                                                                                                                                app/assets/javascripts/blazer/Chart.js on lines 10250..10253

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

                                                                                                                                                                                                                                                                                                                                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

                                                                                                                                                                                                                                                                                                                                                    skipRatio = 1 + Math.floor(((longestRotatedLabel + optionTicks.autoSkipPadding) * me.ticks.length) / (me.width - (me.paddingLeft + me.paddingRight)));
                                                                                                                                                                                                                                                                                                                                Severity: Minor
                                                                                                                                                                                                                                                                                                                                Found in app/assets/javascripts/blazer/Chart.js and 1 other location - About 30 mins to fix
                                                                                                                                                                                                                                                                                                                                app/assets/javascripts/blazer/Chart.js on lines 8095..8095

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

                                                                                                                                                                                                                                                                                                                                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

                                                                                                                                                                                                                                                                                                                                                model.controlPointNextX = Math.max(Math.min(controlPoints.next.x, chartArea.right), chartArea.left);
                                                                                                                                                                                                                                                                                                                                Severity: Minor
                                                                                                                                                                                                                                                                                                                                Found in app/assets/javascripts/blazer/Chart.js and 1 other location - About 30 mins to fix
                                                                                                                                                                                                                                                                                                                                app/assets/javascripts/blazer/Chart.js on lines 3500..3500

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

                                                                                                                                                                                                                                                                                                                                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

                                                                                                                                                                                                                                                                                                                                            model.backgroundColor = custom.hoverBackgroundColor || helpers.getValueAtIndexOrDefault(dataset.pointHoverBackgroundColor, index, helpers.getHoverColor(model.backgroundColor));
                                                                                                                                                                                                                                                                                                                                Severity: Minor
                                                                                                                                                                                                                                                                                                                                Found in app/assets/javascripts/blazer/Chart.js and 1 other location - About 30 mins to fix
                                                                                                                                                                                                                                                                                                                                app/assets/javascripts/blazer/Chart.js on lines 3132..3132

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

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

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

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

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

                                                                                                                                                                                                                                                                                                                                Refactorings

                                                                                                                                                                                                                                                                                                                                Further Reading

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

                                                                                                                                                                                                                                                                                                                                            if (x >= me.left && x <= me.right && y >= me.top && y <= me.bottom) {
                                                                                                                                                                                                                                                                                                                                Severity: Minor
                                                                                                                                                                                                                                                                                                                                Found in app/assets/javascripts/blazer/Chart.js and 1 other location - About 30 mins to fix
                                                                                                                                                                                                                                                                                                                                app/assets/javascripts/blazer/Chart.js on lines 10228..10228

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

                                                                                                                                                                                                                                                                                                                                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

                                                                                                                                                                                                                                                                                                                                                inRange = mouseX >= bounds.left && mouseX <= bounds.right && mouseY >= bounds.top && mouseY <= bounds.bottom;
                                                                                                                                                                                                                                                                                                                                Severity: Minor
                                                                                                                                                                                                                                                                                                                                Found in app/assets/javascripts/blazer/Chart.js and 1 other location - About 30 mins to fix
                                                                                                                                                                                                                                                                                                                                app/assets/javascripts/blazer/Chart.js on lines 7167..7167

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

                                                                                                                                                                                                                                                                                                                                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