le0pard/mongodb_logger

View on GitHub
app/assets/javascripts/vendors/rickshaw/rickshaw.js

Summary

Maintainability
F
2 wks
Test Coverage

File rickshaw.js has 1955 lines of code (exceeds 250 allowed). Consider refactoring.
Open

var Rickshaw = {

    namespace: function(namespace, obj) {

        var parts = namespace.split('.');
Severity: Major
Found in app/assets/javascripts/vendors/rickshaw/rickshaw.js - About 5 days to fix

    Function ClassList has a Cognitive Complexity of 55 (exceeds 5 allowed). Consider refactoring.
    Open

    Rickshaw.Compat.ClassList = function() {
    
        /* adapted from http://purl.eligrey.com/github/classList.js/blob/master/classList.js */
    
        if (typeof document !== "undefined" && !("classList" in document.createElement("a"))) {
    Severity: Minor
    Found in app/assets/javascripts/vendors/rickshaw/rickshaw.js - About 1 day to fix

    Cognitive Complexity

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

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

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

    Further reading

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

    Rickshaw.Graph = function(args) {
    
        this.element = args.element;
        this.series = args.series;
    
    
    Severity: Major
    Found in app/assets/javascripts/vendors/rickshaw/rickshaw.js - About 6 hrs to fix

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

      Rickshaw.Fixtures.Color = function() {
      
          this.schemes = {};
      
          this.schemes.spectrum14 = [
      Severity: Major
      Found in app/assets/javascripts/vendors/rickshaw/rickshaw.js - About 5 hrs to fix

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

        Rickshaw.Compat.ClassList = function() {
        
            /* adapted from http://purl.eligrey.com/github/classList.js/blob/master/classList.js */
        
            if (typeof document !== "undefined" && !("classList" in document.createElement("a"))) {
        Severity: Major
        Found in app/assets/javascripts/vendors/rickshaw/rickshaw.js - About 4 hrs to fix

          Function Graph has a Cognitive Complexity of 30 (exceeds 5 allowed). Consider refactoring.
          Open

          Rickshaw.Graph = function(args) {
          
              this.element = args.element;
              this.series = args.series;
          
          
          Severity: Minor
          Found in app/assets/javascripts/vendors/rickshaw/rickshaw.js - About 4 hrs to fix

          Cognitive Complexity

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

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

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

          Further reading

          Function Toggle has a Cognitive Complexity of 27 (exceeds 5 allowed). Consider refactoring.
          Open

          Rickshaw.Graph.Behavior.Series.Toggle = function(args) {
          
              this.graph = args.graph;
              this.legend = args.legend;
          
          
          Severity: Minor
          Found in app/assets/javascripts/vendors/rickshaw/rickshaw.js - About 3 hrs to fix

          Cognitive Complexity

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

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

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

          Further reading

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

          Rickshaw.Fixtures.Time = function() {
          
              var tzOffset = new Date().getTimezoneOffset() * 60;
          
              var self = this;
          Severity: Major
          Found in app/assets/javascripts/vendors/rickshaw/rickshaw.js - About 3 hrs to fix

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

            Rickshaw.Graph.Behavior.Series.Toggle = function(args) {
            
                this.graph = args.graph;
                this.legend = args.legend;
            
            
            Severity: Major
            Found in app/assets/javascripts/vendors/rickshaw/rickshaw.js - About 3 hrs to fix

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

              Rickshaw.Graph.Annotate = function(args) {
              
                  var graph = this.graph = args.graph;
                  this.elements = { timeline: args.element };
                  
              Severity: Major
              Found in app/assets/javascripts/vendors/rickshaw/rickshaw.js - About 2 hrs to fix

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

                Rickshaw.Graph.Axis.Y = function(args) {
                
                    var self = this;
                    var berthRate = 0.10;
                
                
                Severity: Major
                Found in app/assets/javascripts/vendors/rickshaw/rickshaw.js - About 2 hrs to fix

                  Function Y has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring.
                  Open

                  Rickshaw.Graph.Axis.Y = function(args) {
                  
                      var self = this;
                      var berthRate = 0.10;
                  
                  
                  Severity: Minor
                  Found in app/assets/javascripts/vendors/rickshaw/rickshaw.js - About 2 hrs to fix

                  Cognitive Complexity

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

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

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

                  Further reading

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

                      this.update = function() {
                  
                          Rickshaw.keys(self.data).forEach( function(time) {
                  
                              var annotation = self.data[time];
                  Severity: Major
                  Found in app/assets/javascripts/vendors/rickshaw/rickshaw.js - About 2 hrs to fix

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

                    var Class = (function() {
                      
                      // Some versions of JScript fail to enumerate over properties, names of which 
                      // correspond to non-enumerable properties in the prototype chain
                      var IS_DONTENUM_BUGGY = (function(){
                    Severity: Major
                    Found in app/assets/javascripts/vendors/rickshaw/rickshaw.js - About 2 hrs to fix

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

                          update: function(e) {
                      
                              e = e || this.lastEvent;
                              if (!e) return;
                              this.lastEvent = e;
                      Severity: Major
                      Found in app/assets/javascripts/vendors/rickshaw/rickshaw.js - About 2 hrs to fix

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

                        Rickshaw.Graph.Axis.Time = function(args) {
                        
                            var self = this;
                        
                            this.graph = args.graph;
                        Severity: Major
                        Found in app/assets/javascripts/vendors/rickshaw/rickshaw.js - About 2 hrs to fix

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

                              this.addAnchor = function(line) {
                                  var anchor = document.createElement('a');
                                  anchor.innerHTML = '✔';
                                  anchor.classList.add('action');
                                  line.element.insertBefore(anchor, line.element.firstChild);
                          Severity: Minor
                          Found in app/assets/javascripts/vendors/rickshaw/rickshaw.js - About 1 hr to fix

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

                            Rickshaw.Graph.Smoother = function(args) {
                            
                                this.graph = args.graph;
                                this.element = args.element;
                            
                            
                            Severity: Minor
                            Found in app/assets/javascripts/vendors/rickshaw/rickshaw.js - About 1 hr to fix

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

                              Rickshaw.Graph.Legend = function(args) {
                              
                                  var element = this.element = args.element;
                                  var graph = this.graph = args.graph;
                              
                              
                              Severity: Minor
                              Found in app/assets/javascripts/vendors/rickshaw/rickshaw.js - About 1 hr to fix

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

                                Rickshaw.Color.Palette = function(args) {
                                
                                    var color = new Rickshaw.Fixtures.Color();
                                
                                    args = args || {};
                                Severity: Minor
                                Found in app/assets/javascripts/vendors/rickshaw/rickshaw.js - About 1 hr to fix

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

                                  Rickshaw.Graph.RangeSlider = function(args) {
                                  
                                      var element = this.element = args.element;
                                      var graph = this.graph = args.graph;
                                  
                                  
                                  Severity: Minor
                                  Found in app/assets/javascripts/vendors/rickshaw/rickshaw.js - About 1 hr to fix

                                    Function Palette has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
                                    Open

                                    Rickshaw.Color.Palette = function(args) {
                                    
                                        var color = new Rickshaw.Fixtures.Color();
                                    
                                        args = args || {};
                                    Severity: Minor
                                    Found in app/assets/javascripts/vendors/rickshaw/rickshaw.js - About 1 hr to fix

                                    Cognitive Complexity

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

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

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

                                    Further reading

                                    Function update has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
                                    Open

                                        update: function(e) {
                                    
                                            e = e || this.lastEvent;
                                            if (!e) return;
                                            this.lastEvent = e;
                                    Severity: Minor
                                    Found in app/assets/javascripts/vendors/rickshaw/rickshaw.js - About 1 hr to fix

                                    Cognitive Complexity

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

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

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

                                    Further reading

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

                                        initialize: function (data, palette, options) {
                                    
                                            var options = options || {}
                                    
                                            if (typeof(options.timeInterval) === 'undefined') {
                                    Severity: Minor
                                    Found in app/assets/javascripts/vendors/rickshaw/rickshaw.js - About 1 hr to fix

                                      Function initialize has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
                                      Open

                                          initialize: function (data, palette, options) {
                                      
                                              var options = options || {}
                                      
                                              if (typeof(options.timeInterval) === 'undefined') {
                                      Severity: Minor
                                      Found in app/assets/javascripts/vendors/rickshaw/rickshaw.js - About 1 hr to fix

                                      Cognitive Complexity

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

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

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

                                      Further reading

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

                                          render: function(args) {
                                      
                                              var detail = args.detail;
                                              var domainX = args.domainX;
                                      
                                      
                                      Severity: Minor
                                      Found in app/assets/javascripts/vendors/rickshaw/rickshaw.js - About 1 hr to fix

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

                                                        label.onclick = function(e){
                                        
                                                                var disableAllOtherLines = line.series.disabled;
                                                                if ( ! disableAllOtherLines ) {
                                                                        for ( var i = 0; i < self.legend.lines.length; i++ ) {
                                        Severity: Minor
                                        Found in app/assets/javascripts/vendors/rickshaw/rickshaw.js - About 1 hr to fix

                                          Function Annotate has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
                                          Open

                                          Rickshaw.Graph.Annotate = function(args) {
                                          
                                              var graph = this.graph = args.graph;
                                              this.elements = { timeline: args.element };
                                              
                                          Severity: Minor
                                          Found in app/assets/javascripts/vendors/rickshaw/rickshaw.js - About 1 hr to fix

                                          Cognitive Complexity

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

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

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

                                          Further reading

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

                                              this.validateSeries = function(series) {
                                          
                                                  if (!(series instanceof Array) && !(series instanceof Rickshaw.Series)) {
                                                      var seriesSignature = Object.prototype.toString.apply(series);
                                                      throw "series is not an array: " + seriesSignature;
                                          Severity: Minor
                                          Found in app/assets/javascripts/vendors/rickshaw/rickshaw.js - About 1 hr to fix

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

                                            Rickshaw.Graph.Behavior.Series.Highlight = function(args) {
                                            
                                                this.graph = args.graph;
                                                this.legend = args.legend;
                                            
                                            
                                            Severity: Minor
                                            Found in app/assets/javascripts/vendors/rickshaw/rickshaw.js - About 1 hr to fix

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

                                                  formatter: function(series, x, y, formattedX, formattedY, d) {
                                              Severity: Minor
                                              Found in app/assets/javascripts/vendors/rickshaw/rickshaw.js - About 45 mins to fix

                                                Function formatKMBT has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
                                                Open

                                                Rickshaw.Fixtures.Number.formatKMBT = function(y) {
                                                    if (y >= 1000000000000)   { return y / 1000000000000 + "T" } 
                                                    else if (y >= 1000000000) { return y / 1000000000 + "B" } 
                                                    else if (y >= 1000000)    { return y / 1000000 + "M" } 
                                                    else if (y >= 1000)       { return y / 1000 + "K" }
                                                Severity: Minor
                                                Found in app/assets/javascripts/vendors/rickshaw/rickshaw.js - About 45 mins to fix

                                                Cognitive Complexity

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

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

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

                                                Further reading

                                                Function formatBase1024KMGTP has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
                                                Open

                                                Rickshaw.Fixtures.Number.formatBase1024KMGTP = function(y) {
                                                    if (y >= 1125899906842624)  { return y / 1125899906842624 + "P" }
                                                    else if (y >= 1099511627776){ return y / 1099511627776 + "T" }
                                                    else if (y >= 1073741824)   { return y / 1073741824 + "G" }
                                                    else if (y >= 1048576)      { return y / 1048576 + "M" }
                                                Severity: Minor
                                                Found in app/assets/javascripts/vendors/rickshaw/rickshaw.js - About 45 mins to fix

                                                Cognitive Complexity

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

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

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

                                                Further reading

                                                Consider simplifying this complex logical expression.
                                                Open

                                                    if (typeof document !== "undefined" && !("classList" in document.createElement("a"))) {
                                                
                                                    (function (view) {
                                                
                                                    "use strict";
                                                Severity: Major
                                                Found in app/assets/javascripts/vendors/rickshaw/rickshaw.js - About 40 mins to fix

                                                  Avoid too many return statements within this function.
                                                  Open

                                                      else if (y == 0)          { return '' }
                                                  Severity: Major
                                                  Found in app/assets/javascripts/vendors/rickshaw/rickshaw.js - About 30 mins to fix

                                                    Avoid too many return statements within this function.
                                                    Open

                                                        else if (y == 0)            { return '' }
                                                    Severity: Major
                                                    Found in app/assets/javascripts/vendors/rickshaw/rickshaw.js - About 30 mins to fix

                                                      Avoid too many return statements within this function.
                                                      Open

                                                          else if (y < 1 && y > 0)  { return y.toFixed(2) }
                                                      Severity: Major
                                                      Found in app/assets/javascripts/vendors/rickshaw/rickshaw.js - About 30 mins to fix

                                                        Avoid too many return statements within this function.
                                                        Open

                                                            else if (y >= 1024)         { return y / 1024 + "K" }
                                                        Severity: Major
                                                        Found in app/assets/javascripts/vendors/rickshaw/rickshaw.js - About 30 mins to fix

                                                          Avoid too many return statements within this function.
                                                          Open

                                                              else if (y < 1 && y > 0)    { return y.toFixed(2) }
                                                          Severity: Major
                                                          Found in app/assets/javascripts/vendors/rickshaw/rickshaw.js - About 30 mins to fix

                                                            Avoid too many return statements within this function.
                                                            Open

                                                                else                      { return y }
                                                            Severity: Major
                                                            Found in app/assets/javascripts/vendors/rickshaw/rickshaw.js - About 30 mins to fix

                                                              Avoid too many return statements within this function.
                                                              Open

                                                                  else                        { return y }
                                                              Severity: Major
                                                              Found in app/assets/javascripts/vendors/rickshaw/rickshaw.js - About 30 mins to fix

                                                                Function addItem has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                                                                Open

                                                                    addItem: function(item) {
                                                                
                                                                        if (typeof(item.name) === 'undefined') {
                                                                            throw('addItem() needs a name');
                                                                        }
                                                                Severity: Minor
                                                                Found in app/assets/javascripts/vendors/rickshaw/rickshaw.js - About 25 mins to fix

                                                                Cognitive Complexity

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

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

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

                                                                Further reading

                                                                Function Legend has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                                                                Open

                                                                Rickshaw.Graph.Legend = function(args) {
                                                                
                                                                    var element = this.element = args.element;
                                                                    var graph = this.graph = args.graph;
                                                                
                                                                
                                                                Severity: Minor
                                                                Found in app/assets/javascripts/vendors/rickshaw/rickshaw.js - About 25 mins to fix

                                                                Cognitive Complexity

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

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

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

                                                                Further reading

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

                                                                    else if (y >= 1099511627776){ return y / 1099511627776 + "T" }
                                                                    else if (y >= 1073741824)   { return y / 1073741824 + "G" }
                                                                    else if (y >= 1048576)      { return y / 1048576 + "M" }
                                                                    else if (y >= 1024)         { return y / 1024 + "K" }
                                                                    else if (y < 1 && y > 0)    { return y.toFixed(2) }
                                                                Severity: Major
                                                                Found in app/assets/javascripts/vendors/rickshaw/rickshaw.js and 1 other location - About 5 hrs to fix
                                                                app/assets/javascripts/vendors/rickshaw/rickshaw.js on lines 908..914

                                                                Duplicated Code

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

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

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

                                                                Tuning

                                                                This issue has a mass of 144.

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

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

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

                                                                See codeclimate-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 (y >= 1000000000000)   { return y / 1000000000000 + "T" } 
                                                                    else if (y >= 1000000000) { return y / 1000000000 + "B" } 
                                                                    else if (y >= 1000000)    { return y / 1000000 + "M" } 
                                                                    else if (y >= 1000)       { return y / 1000 + "K" }
                                                                    else if (y < 1 && y > 0)  { return y.toFixed(2) }
                                                                Severity: Major
                                                                Found in app/assets/javascripts/vendors/rickshaw/rickshaw.js and 1 other location - About 5 hrs to fix
                                                                app/assets/javascripts/vendors/rickshaw/rickshaw.js on lines 919..925

                                                                Duplicated Code

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

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

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

                                                                Tuning

                                                                This issue has a mass of 144.

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

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

                                                                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ 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 d3.svg.area()
                                                                            .x( function(d) { return graph.x(d.x) } )
                                                                            .y0( function(d) { return graph.y(d.y0) } )
                                                                            .y1( function(d) { return graph.y(d.y + d.y0) } )
                                                                            .interpolate(graph.interpolation).tension(this.tension);
                                                                Severity: Major
                                                                Found in app/assets/javascripts/vendors/rickshaw/rickshaw.js and 1 other location - About 3 hrs to fix
                                                                app/assets/javascripts/vendors/rickshaw/rickshaw.js on lines 2056..2060

                                                                Duplicated Code

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

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

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

                                                                Tuning

                                                                This issue has a mass of 112.

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

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

                                                                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ 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 d3.svg.area()
                                                                            .x( function(d) { return graph.x(d.x) } )
                                                                            .y0( function(d) { return graph.y(d.y0) } )
                                                                            .y1( function(d) { return graph.y(d.y + d.y0) } )
                                                                            .interpolate(this.graph.interpolation).tension(this.tension);
                                                                Severity: Major
                                                                Found in app/assets/javascripts/vendors/rickshaw/rickshaw.js and 1 other location - About 3 hrs to fix
                                                                app/assets/javascripts/vendors/rickshaw/rickshaw.js on lines 2198..2202

                                                                Duplicated Code

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

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

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

                                                                Tuning

                                                                This issue has a mass of 112.

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

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

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

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

                                                                    request: function() {
                                                                
                                                                        $.ajax( {
                                                                            url: this.dataURL,
                                                                            dataType: 'json',
                                                                Severity: Major
                                                                Found in app/assets/javascripts/vendors/rickshaw/rickshaw.js and 1 other location - About 1 hr to fix
                                                                app/assets/javascripts/vendors/rickshaw/rickshaw.js on lines 1748..1756

                                                                Duplicated Code

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

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

                                                                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both 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

                                                                    request: function() {
                                                                
                                                                        $.ajax( {
                                                                            url: this.dataURL,
                                                                            dataType: 'jsonp',
                                                                Severity: Major
                                                                Found in app/assets/javascripts/vendors/rickshaw/rickshaw.js and 1 other location - About 1 hr to fix
                                                                app/assets/javascripts/vendors/rickshaw/rickshaw.js on lines 992..1000

                                                                Duplicated Code

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

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

                                                                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both 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

                                                                    hide: function() {
                                                                        this.visible = false;
                                                                        this.element.classList.add('inactive');
                                                                
                                                                        if (typeof this.onHide == 'function') {
                                                                Severity: Major
                                                                Found in app/assets/javascripts/vendors/rickshaw/rickshaw.js and 1 other location - About 1 hr to fix
                                                                app/assets/javascripts/vendors/rickshaw/rickshaw.js on lines 1665..1672

                                                                Duplicated Code

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

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

                                                                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both 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

                                                                    show: function() {
                                                                        this.visible = true;
                                                                        this.element.classList.remove('inactive');
                                                                
                                                                        if (typeof this.onShow == 'function') {
                                                                Severity: Major
                                                                Found in app/assets/javascripts/vendors/rickshaw/rickshaw.js and 1 other location - About 1 hr to fix
                                                                app/assets/javascripts/vendors/rickshaw/rickshaw.js on lines 1656..1663

                                                                Duplicated Code

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

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

                                                                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both 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

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

                                                                        graph.series.forEach( function(series) {
                                                                            if (series.disabled) return;
                                                                            series.path = nodes[0][i++];
                                                                            this._styleSeries(series);
                                                                        }, this );
                                                                Severity: Major
                                                                Found in app/assets/javascripts/vendors/rickshaw/rickshaw.js and 1 other location - About 1 hr to fix
                                                                app/assets/javascripts/vendors/rickshaw/rickshaw.js on lines 1948..1952

                                                                Duplicated Code

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

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

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

                                                                Tuning

                                                                This issue has a mass of 63.

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

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

                                                                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ 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

                                                                        graph.series.forEach( function(series) {
                                                                            if (series.disabled) return;
                                                                            series.path = nodes[0][i++];
                                                                            this._styleSeries(series);
                                                                        }, this );
                                                                Severity: Major
                                                                Found in app/assets/javascripts/vendors/rickshaw/rickshaw.js and 1 other location - About 1 hr to fix
                                                                app/assets/javascripts/vendors/rickshaw/rickshaw.js on lines 2236..2240

                                                                Duplicated Code

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

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

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

                                                                Tuning

                                                                This issue has a mass of 63.

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

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

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

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

                                                                        this.timeBase = typeof(options.timeBase) === 'undefined' ? Math.floor(new Date().getTime() / 1000) : options.timeBase;
                                                                Severity: Minor
                                                                Found in app/assets/javascripts/vendors/rickshaw/rickshaw.js and 1 other location - About 55 mins to fix
                                                                app/assets/javascripts/vendors/rickshaw/rickshaw.js on lines 2409..2411

                                                                Duplicated Code

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

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

                                                                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both 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 2 locations. Consider refactoring.
                                                                Open

                                                                        this.timeBase = typeof(options.timeBase) === 'undefined' ? 
                                                                            Math.floor(new Date().getTime() / 1000) : 
                                                                            options.timeBase;
                                                                Severity: Minor
                                                                Found in app/assets/javascripts/vendors/rickshaw/rickshaw.js and 1 other location - About 55 mins to fix
                                                                app/assets/javascripts/vendors/rickshaw/rickshaw.js on lines 2576..2576

                                                                Duplicated Code

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

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

                                                                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both 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 2 locations. Consider refactoring.
                                                                Open

                                                                        this.stackData.hooks.data.forEach( function(entry) {
                                                                            data = entry.f.apply(self, [data]);
                                                                        } );
                                                                Severity: Minor
                                                                Found in app/assets/javascripts/vendors/rickshaw/rickshaw.js and 1 other location - About 50 mins to fix
                                                                app/assets/javascripts/vendors/rickshaw/rickshaw.js on lines 520..522

                                                                Duplicated Code

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

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

                                                                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both 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

                                                                        this.stackData.hooks.after.forEach( function(entry) {
                                                                            stackedData = entry.f.apply(self, [data]);
                                                                        } );
                                                                Severity: Minor
                                                                Found in app/assets/javascripts/vendors/rickshaw/rickshaw.js and 1 other location - About 50 mins to fix
                                                                app/assets/javascripts/vendors/rickshaw/rickshaw.js on lines 511..513

                                                                Duplicated Code

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

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

                                                                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both 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

                                                                                    annotation.boxes.forEach( function(box) {
                                                                                        if ( box.rangeElement ) box.rangeElement.classList.toggle('active');
                                                                                    });
                                                                Severity: Minor
                                                                Found in app/assets/javascripts/vendors/rickshaw/rickshaw.js and 1 other location - About 40 mins to fix
                                                                app/assets/javascripts/vendors/rickshaw/rickshaw.js on lines 1080..1082

                                                                Duplicated Code

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

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

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

                                                                Tuning

                                                                This issue has a mass of 48.

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

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

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

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

                                                                                annotation.boxes.forEach( function(box) {
                                                                                    if ( box.rangeElement ) box.rangeElement.classList.add('offscreen');
                                                                                });
                                                                Severity: Minor
                                                                Found in app/assets/javascripts/vendors/rickshaw/rickshaw.js and 1 other location - About 40 mins to fix
                                                                app/assets/javascripts/vendors/rickshaw/rickshaw.js on lines 1094..1096

                                                                Duplicated Code

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

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

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

                                                                Tuning

                                                                This issue has a mass of 48.

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

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

                                                                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ 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

                                                                            Array.prototype.forEach.call(nodes[0], function(n) {
                                                                                n.setAttribute('fill', series.color);
                                                                            } );
                                                                Severity: Minor
                                                                Found in app/assets/javascripts/vendors/rickshaw/rickshaw.js and 1 other location - About 35 mins to fix
                                                                app/assets/javascripts/vendors/rickshaw/rickshaw.js on lines 2301..2303

                                                                Duplicated Code

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

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

                                                                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both 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

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

                                                                            Array.prototype.forEach.call(nodes[0], function(n) {
                                                                                n.setAttribute('fill', series.color);
                                                                            } );
                                                                Severity: Minor
                                                                Found in app/assets/javascripts/vendors/rickshaw/rickshaw.js and 1 other location - About 35 mins to fix
                                                                app/assets/javascripts/vendors/rickshaw/rickshaw.js on lines 2139..2141

                                                                Duplicated Code

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

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

                                                                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both 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

                                                                                        annotationRangeStart = Math.max( self.graph.x(box.end), self.graph.x.range()[0] );
                                                                Severity: Minor
                                                                Found in app/assets/javascripts/vendors/rickshaw/rickshaw.js and 1 other location - About 30 mins to fix
                                                                app/assets/javascripts/vendors/rickshaw/rickshaw.js on lines 1130..1130

                                                                Duplicated Code

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

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

                                                                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both 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

                                                                            var nodes = graph.vis.selectAll("path")
                                                                                .data(series.stack)
                                                                                .enter().append("svg:rect")
                                                                                .attr("x", function(d) { return graph.x(d.x) + barXOffset })
                                                                Severity: Minor
                                                                Found in app/assets/javascripts/vendors/rickshaw/rickshaw.js and 1 other location - About 30 mins to fix
                                                                app/assets/javascripts/vendors/rickshaw/rickshaw.js on lines 2294..2297

                                                                Duplicated Code

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

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

                                                                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both 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

                                                                                    var annotationRangeEnd   = Math.min( self.graph.x(box.end), self.graph.x.range()[1] );
                                                                Severity: Minor
                                                                Found in app/assets/javascripts/vendors/rickshaw/rickshaw.js and 1 other location - About 30 mins to fix
                                                                app/assets/javascripts/vendors/rickshaw/rickshaw.js on lines 1135..1135

                                                                Duplicated Code

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

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

                                                                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both 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

                                                                            var nodes = graph.vis.selectAll("path")
                                                                                .data(series.stack)
                                                                                .enter().append("svg:circle")
                                                                                .attr("cx", function(d) { return graph.x(d.x) })
                                                                Severity: Minor
                                                                Found in app/assets/javascripts/vendors/rickshaw/rickshaw.js and 1 other location - About 30 mins to fix
                                                                app/assets/javascripts/vendors/rickshaw/rickshaw.js on lines 2130..2133

                                                                Duplicated Code

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

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

                                                                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both 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