opsforgeio/cabot

View on GitHub
cabot/static/arachnys/js/rickshaw.js

Summary

Maintainability
F
1 mo
Test Coverage

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

/* jshint -W079 */

var Rickshaw = {

  namespace: function(namespace, obj) {
Severity: Major
Found in cabot/static/arachnys/js/rickshaw.js - About 1 wk to fix

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

    Rickshaw.Graph = function(args) {
    
      var self = this;
    
      this.initialize = function(args) {
    Severity: Major
    Found in cabot/static/arachnys/js/rickshaw.js - About 1 day 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 cabot/static/arachnys/js/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 a Cognitive Complexity of 49 (exceeds 5 allowed). Consider refactoring.
      Open

      Rickshaw.Graph = function(args) {
      
        var self = this;
      
        this.initialize = function(args) {
      Severity: Minor
      Found in cabot/static/arachnys/js/rickshaw.js - About 7 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 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 cabot/static/arachnys/js/rickshaw.js - About 5 hrs to fix

        Function Toggle has a Cognitive Complexity of 34 (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 cabot/static/arachnys/js/rickshaw.js - About 5 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 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 cabot/static/arachnys/js/rickshaw.js - About 4 hrs to fix

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

            _registerMouseEvents: function() {
          
              var element = d3.select(this.element);
          
              var drag = {
          Severity: Major
          Found in cabot/static/arachnys/js/rickshaw.js - About 4 hrs to fix

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

            Rickshaw.Fixtures.Time.Local = function() {
            
              var self = this;
            
              this.months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'];
            Severity: Major
            Found in cabot/static/arachnys/js/rickshaw.js - About 4 hrs to fix

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

              Rickshaw.Graph.Axis.X = function(args) {
              
                var self = this;
                var berthRate = 0.10;
              
              
              Severity: Minor
              Found in cabot/static/arachnys/js/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 91 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              Rickshaw.Fixtures.Time = function() {
              
                var self = this;
              
                this.months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'];
              Severity: Major
              Found in cabot/static/arachnys/js/rickshaw.js - About 3 hrs to fix

                Function Toggle has 88 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 cabot/static/arachnys/js/rickshaw.js - About 3 hrs to fix

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

                  Rickshaw.Graph.Axis.X = function(args) {
                  
                    var self = this;
                    var berthRate = 0.10;
                  
                  
                  Severity: Major
                  Found in cabot/static/arachnys/js/rickshaw.js - About 3 hrs to fix

                    Function _registerMouseEvents has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring.
                    Open

                      _registerMouseEvents: function() {
                    
                        var element = d3.select(this.element);
                    
                        var drag = {
                    Severity: Minor
                    Found in cabot/static/arachnys/js/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 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 cabot/static/arachnys/js/rickshaw.js - About 2 hrs to fix

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

                        render: function() {
                      
                          var self = this;
                      
                          this.svg = d3.select(this.element)
                      Severity: Major
                      Found in cabot/static/arachnys/js/rickshaw.js - About 2 hrs to fix

                        Function update has 66 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 cabot/static/arachnys/js/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 cabot/static/arachnys/js/rickshaw.js - About 2 hrs to fix

                            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 cabot/static/arachnys/js/rickshaw.js - About 2 hrs to fix

                              Function Local has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring.
                              Open

                              Rickshaw.Fixtures.Time.Local = function() {
                              
                                var self = this;
                              
                                this.months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'];
                              Severity: Minor
                              Found in cabot/static/arachnys/js/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 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 cabot/static/arachnys/js/rickshaw.js - About 2 hrs to fix

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

                                  this.stackData = function() {
                                
                                    var data = this.series.active()
                                      .map( function(d) { return d.data } )
                                      .map( function(d) { return d.filter( function(d) { return this._slice(d) }, this ) }, this);
                                Severity: Minor
                                Found in cabot/static/arachnys/js/rickshaw.js - About 2 hrs to fix

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

                                    render: function(args) {
                                  
                                      var graph = this.graph;
                                      var points = args.points;
                                      var point = points.filter( function(p) { return p.active } ).shift();
                                  Severity: Minor
                                  Found in cabot/static/arachnys/js/rickshaw.js - About 2 hrs to fix

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

                                        function onMousemove(datum, index) {
                                    
                                          drag.stop = self._getClientXFromEvent(d3.event, drag);
                                          var distanceTraveled = drag.stop - drag.start;
                                          var frameAfterDrag = self.frameBeforeDrag.slice(0);
                                    Severity: Minor
                                    Found in cabot/static/arachnys/js/rickshaw.js - About 1 hr to fix

                                      Function Highlight has 48 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 cabot/static/arachnys/js/rickshaw.js - About 1 hr to fix

                                        Function addAnchor has 45 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 cabot/static/arachnys/js/rickshaw.js - About 1 hr to fix

                                          Function Time has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring.
                                          Open

                                          Rickshaw.Fixtures.Time = function() {
                                          
                                            var self = this;
                                          
                                            this.months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'];
                                          Severity: Minor
                                          Found in cabot/static/arachnys/js/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 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 cabot/static/arachnys/js/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 cabot/static/arachnys/js/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 ceil has 35 lines of code (exceeds 25 allowed). Consider refactoring.
                                            Open

                                              this.ceil = function(time, unit) {
                                            
                                                var date, floor, year;
                                            
                                                if (unit.name == 'day') {
                                            Severity: Minor
                                            Found in cabot/static/arachnys/js/rickshaw.js - About 1 hr to fix

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

                                                initialize: function (data, palette, options) {
                                              
                                                  options = options || {};
                                              
                                                  if (typeof(options.timeInterval) === 'undefined') {
                                              Severity: Minor
                                              Found in cabot/static/arachnys/js/rickshaw.js - About 1 hr to fix

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

                                                  this.addHighlightEvents = function (l) {
                                                
                                                    l.element.addEventListener( 'mouseover', function(e) {
                                                
                                                      if (activeLine) return;
                                                Severity: Minor
                                                Found in cabot/static/arachnys/js/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) {
                                                  
                                                      options = options || {};
                                                  
                                                      if (typeof(options.timeInterval) === 'undefined') {
                                                  Severity: Minor
                                                  Found in cabot/static/arachnys/js/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 addLine has 31 lines of code (exceeds 25 allowed). Consider refactoring.
                                                  Open

                                                    addLine: function (series) {
                                                      var line = document.createElement('li');
                                                      line.className = 'line';
                                                      if (series.disabled) {
                                                        line.className += ' disabled';
                                                  Severity: Minor
                                                  Found in cabot/static/arachnys/js/rickshaw.js - About 1 hr to fix

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

                                                    Rickshaw.Graph.Behavior.Series.Order = function(args) {
                                                    
                                                      this.graph = args.graph;
                                                      this.legend = args.legend;
                                                    
                                                    
                                                    Severity: Minor
                                                    Found in cabot/static/arachnys/js/rickshaw.js - About 1 hr to fix

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

                                                        domain: function(data) {
                                                      
                                                          var stackedData = data || this.graph.stackedData || this.graph.stackData();
                                                          var firstPoint = stackedData[0][0];
                                                      
                                                      
                                                      Severity: Minor
                                                      Found in cabot/static/arachnys/js/rickshaw.js - About 1 hr to fix

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

                                                          render: function(args) {
                                                        
                                                            args = args || {};
                                                        
                                                            var graph = this.graph;
                                                        Severity: Minor
                                                        Found in cabot/static/arachnys/js/rickshaw.js - About 1 hr to fix

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

                                                            this.render = function() {
                                                          
                                                              if (this._renderWidth !== undefined && this.graph.width !== this._renderWidth) this.setSize({ auto: true });
                                                          
                                                              var axis = d3.svg.axis().scale(this.graph.x).orient(this.orientation);
                                                          Severity: Minor
                                                          Found in cabot/static/arachnys/js/rickshaw.js - About 1 hr to fix

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

                                                              build: function() {
                                                            
                                                                var element = this.element;
                                                                var graph = this.graph;
                                                            
                                                            
                                                            Severity: Minor
                                                            Found in cabot/static/arachnys/js/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 cabot/static/arachnys/js/rickshaw.js - About 1 hr to fix

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

                                                                  render: function(args) {
                                                                
                                                                    args = args || {};
                                                                
                                                                    var graph = this.graph;
                                                                Severity: Minor
                                                                Found in cabot/static/arachnys/js/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 cabot/static/arachnys/js/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 _groups has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                  Open

                                                                    _groups: function() {
                                                                  
                                                                      var graph = this.graph;
                                                                  
                                                                      var renderGroups = {};
                                                                  Severity: Minor
                                                                  Found in cabot/static/arachnys/js/rickshaw.js - About 1 hr to fix

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

                                                                      this.initialize = function(args) {
                                                                    
                                                                        if (!args.element) throw "Rickshaw.Graph needs a reference to an element";
                                                                        if (args.element.nodeType !== 1) throw "Rickshaw.Graph element was defined but not an HTML element";
                                                                    
                                                                    
                                                                    Severity: Minor
                                                                    Found in cabot/static/arachnys/js/rickshaw.js - About 1 hr to fix

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

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

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

                                                                          render: function(args) {
                                                                        
                                                                            args = args || {};
                                                                        
                                                                            var graph = this.graph;
                                                                        Severity: Minor
                                                                        Found in cabot/static/arachnys/js/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 cabot/static/arachnys/js/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) {
                                                                              var abs_y = Math.abs(y);
                                                                              if (abs_y >= 1000000000000)   { return y / 1000000000000 + "T" }
                                                                              else if (abs_y >= 1000000000) { return y / 1000000000 + "B" }
                                                                              else if (abs_y >= 1000000)    { return y / 1000000 + "M" }
                                                                            Severity: Minor
                                                                            Found in cabot/static/arachnys/js/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) {
                                                                                var abs_y = Math.abs(y);
                                                                                if (abs_y >= 1125899906842624)  { return y / 1125899906842624 + "P" }
                                                                                else if (abs_y >= 1099511627776){ return y / 1099511627776 + "T" }
                                                                                else if (abs_y >= 1073741824)   { return y / 1073741824 + "G" }
                                                                            Severity: Minor
                                                                            Found in cabot/static/arachnys/js/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 _getClientXFromEvent has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
                                                                            Open

                                                                              _getClientXFromEvent: function(event, drag) {
                                                                            
                                                                                switch (event.type) {
                                                                                  case 'touchstart':
                                                                                  case 'touchmove':
                                                                            Severity: Minor
                                                                            Found in cabot/static/arachnys/js/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 cabot/static/arachnys/js/rickshaw.js - About 40 mins to fix

                                                                              Function render has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                                                                              Open

                                                                                render: function(args) {
                                                                              
                                                                                  var graph = this.graph;
                                                                                  var points = args.points;
                                                                                  var point = points.filter( function(p) { return p.active } ).shift();
                                                                              Severity: Minor
                                                                              Found in cabot/static/arachnys/js/rickshaw.js - About 35 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

                                                                              Avoid too many return statements within this function.
                                                                              Open

                                                                                  return Math.ceil(time / unit.seconds) * unit.seconds;
                                                                              Severity: Major
                                                                              Found in cabot/static/arachnys/js/rickshaw.js - About 30 mins to fix

                                                                                Avoid too many return statements within this function.
                                                                                Open

                                                                                    else                        { return y }
                                                                                Severity: Major
                                                                                Found in cabot/static/arachnys/js/rickshaw.js - About 30 mins to fix

                                                                                  Avoid too many return statements within this function.
                                                                                  Open

                                                                                    else                      { return y }
                                                                                  Severity: Major
                                                                                  Found in cabot/static/arachnys/js/rickshaw.js - About 30 mins to fix

                                                                                    Avoid too many return statements within this function.
                                                                                    Open

                                                                                        else if (abs_y < 1 && y > 0)    { return y.toFixed(2) }
                                                                                    Severity: Major
                                                                                    Found in cabot/static/arachnys/js/rickshaw.js - About 30 mins to fix

                                                                                      Avoid too many return statements within this function.
                                                                                      Open

                                                                                        else if (abs_y === 0)         { return '' }
                                                                                      Severity: Major
                                                                                      Found in cabot/static/arachnys/js/rickshaw.js - About 30 mins to fix

                                                                                        Avoid too many return statements within this function.
                                                                                        Open

                                                                                            return Math.ceil(time / unit.seconds) * unit.seconds;
                                                                                        Severity: Major
                                                                                        Found in cabot/static/arachnys/js/rickshaw.js - About 30 mins to fix

                                                                                          Avoid too many return statements within this function.
                                                                                          Open

                                                                                              else if (abs_y === 0)           { return '' }
                                                                                          Severity: Major
                                                                                          Found in cabot/static/arachnys/js/rickshaw.js - About 30 mins to fix

                                                                                            Avoid too many return statements within this function.
                                                                                            Open

                                                                                              else if (abs_y < 1 && y > 0)  { return y.toFixed(2) }
                                                                                            Severity: Major
                                                                                            Found in cabot/static/arachnys/js/rickshaw.js - About 30 mins to fix

                                                                                              Avoid too many return statements within this function.
                                                                                              Open

                                                                                                    return new Date(year, 0).getTime() / 1000;
                                                                                              Severity: Major
                                                                                              Found in cabot/static/arachnys/js/rickshaw.js - About 30 mins to fix

                                                                                                Avoid too many return statements within this function.
                                                                                                Open

                                                                                                    else if (abs_y >= 1024)         { return y / 1024 + "K" }
                                                                                                Severity: Major
                                                                                                Found in cabot/static/arachnys/js/rickshaw.js - About 30 mins to fix

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

                                                                                                    _calcLayoutError: function(alignables) {
                                                                                                      // Layout error is calculated as the number of linear pixels by which
                                                                                                      // an alignable extends past the left or right edge of the parent.
                                                                                                      var parentRect = this.element.parentNode.getBoundingClientRect();
                                                                                                  
                                                                                                  
                                                                                                  Severity: Minor
                                                                                                  Found in cabot/static/arachnys/js/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 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 cabot/static/arachnys/js/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

                                                                                                    this.units = [
                                                                                                      {
                                                                                                        name: 'decade',
                                                                                                        seconds: 86400 * 365.25 * 10,
                                                                                                        formatter: function(d) { return (parseInt(d.getUTCFullYear() / 10, 10) * 10) }
                                                                                                  Severity: Major
                                                                                                  Found in cabot/static/arachnys/js/rickshaw.js and 1 other location - About 3 days to fix
                                                                                                  cabot/static/arachnys/js/rickshaw.js on lines 1011..1065

                                                                                                  Duplicated Code

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

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

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

                                                                                                  Tuning

                                                                                                  This issue has a mass of 518.

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

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

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

                                                                                                  See codeclimate-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.units = [
                                                                                                      {
                                                                                                        name: 'decade',
                                                                                                        seconds: 86400 * 365.25 * 10,
                                                                                                        formatter: function(d) { return (parseInt(d.getFullYear() / 10, 10) * 10) }
                                                                                                  Severity: Major
                                                                                                  Found in cabot/static/arachnys/js/rickshaw.js and 1 other location - About 3 days to fix
                                                                                                  cabot/static/arachnys/js/rickshaw.js on lines 896..950

                                                                                                  Duplicated Code

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

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

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

                                                                                                  Tuning

                                                                                                  This issue has a mass of 518.

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

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

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

                                                                                                    seriesPathFactory: function() {
                                                                                                  
                                                                                                      var graph = this.graph;
                                                                                                  
                                                                                                      var factory = d3.svg.line()
                                                                                                  Severity: Major
                                                                                                  Found in cabot/static/arachnys/js/rickshaw.js and 1 other location - About 6 hrs to fix
                                                                                                  cabot/static/arachnys/js/rickshaw.js on lines 3593..3604

                                                                                                  Duplicated Code

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

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

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

                                                                                                  Tuning

                                                                                                  This issue has a mass of 164.

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

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

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

                                                                                                    seriesPathFactory: function() {
                                                                                                  
                                                                                                      var graph = this.graph;
                                                                                                  
                                                                                                      var factory = d3.svg.line()
                                                                                                  Severity: Major
                                                                                                  Found in cabot/static/arachnys/js/rickshaw.js and 1 other location - About 6 hrs to fix
                                                                                                  cabot/static/arachnys/js/rickshaw.js on lines 3104..3115

                                                                                                  Duplicated Code

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

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

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

                                                                                                  Tuning

                                                                                                  This issue has a mass of 164.

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

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

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

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

                                                                                                  Duplicated Code

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

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

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

                                                                                                  Tuning

                                                                                                  This issue has a mass of 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

                                                                                                      else if (abs_y >= 1099511627776){ return y / 1099511627776 + "T" }
                                                                                                      else if (abs_y >= 1073741824)   { return y / 1073741824 + "G" }
                                                                                                      else if (abs_y >= 1048576)      { return y / 1048576 + "M" }
                                                                                                      else if (abs_y >= 1024)         { return y / 1024 + "K" }
                                                                                                      else if (abs_y < 1 && y > 0)    { return y.toFixed(2) }
                                                                                                  Severity: Major
                                                                                                  Found in cabot/static/arachnys/js/rickshaw.js and 1 other location - About 5 hrs to fix
                                                                                                  cabot/static/arachnys/js/rickshaw.js on lines 1138..1144

                                                                                                  Duplicated Code

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

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

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

                                                                                                      var factory = 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 cabot/static/arachnys/js/rickshaw.js and 1 other location - About 3 hrs to fix
                                                                                                  cabot/static/arachnys/js/rickshaw.js on lines 3137..3141

                                                                                                  Duplicated Code

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

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

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

                                                                                                      var factory = 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 cabot/static/arachnys/js/rickshaw.js and 1 other location - About 3 hrs to fix
                                                                                                  cabot/static/arachnys/js/rickshaw.js on lines 3279..3283

                                                                                                  Duplicated Code

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

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

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

                                                                                                      this.graph.vis
                                                                                                        .append("svg:g")
                                                                                                        .attr("class", "y_grid")
                                                                                                        .call(axis.ticks(this.ticks).tickSubdivide(0).tickSize(gridSize))
                                                                                                        .selectAll('text')
                                                                                                  Severity: Major
                                                                                                  Found in cabot/static/arachnys/js/rickshaw.js and 1 other location - About 3 hrs to fix
                                                                                                  cabot/static/arachnys/js/rickshaw.js on lines 1559..1564

                                                                                                  Duplicated Code

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

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

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

                                                                                                  Tuning

                                                                                                  This issue has a mass of 105.

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

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

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

                                                                                                  See codeclimate-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.graph.vis
                                                                                                        .append("svg:g")
                                                                                                        .attr("class", "x_grid_d3")
                                                                                                        .call(axis.ticks(this.ticks).tickSubdivide(0).tickSize(gridSize))
                                                                                                        .selectAll('text')
                                                                                                  Severity: Major
                                                                                                  Found in cabot/static/arachnys/js/rickshaw.js and 1 other location - About 3 hrs to fix
                                                                                                  cabot/static/arachnys/js/rickshaw.js on lines 1697..1702

                                                                                                  Duplicated Code

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

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

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

                                                                                                  Tuning

                                                                                                  This issue has a mass of 105.

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

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

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

                                                                                                  See codeclimate-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.vis
                                                                                                        .append("svg:g")
                                                                                                        .attr("class", ["x_ticks_d3", this.ticksTreatment].join(" "))
                                                                                                        .attr("transform", transform)
                                                                                                        .call(axis.ticks(this.ticks).tickSubdivide(0).tickSize(this.tickSize));
                                                                                                  Severity: Major
                                                                                                  Found in cabot/static/arachnys/js/rickshaw.js and 1 other location - About 2 hrs to fix
                                                                                                  cabot/static/arachnys/js/rickshaw.js on lines 1685..1689

                                                                                                  Duplicated Code

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

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

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

                                                                                                  Tuning

                                                                                                  This issue has a mass of 88.

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

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

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

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

                                                                                                  Refactorings

                                                                                                  Further Reading

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

                                                                                                      this.vis
                                                                                                        .append("svg:g")
                                                                                                        .attr("class", ["y_ticks", this.ticksTreatment].join(" "))
                                                                                                        .attr("transform", transform)
                                                                                                        .call(axis.ticks(this.ticks).tickSubdivide(0).tickSize(this.tickSize));
                                                                                                  Severity: Major
                                                                                                  Found in cabot/static/arachnys/js/rickshaw.js and 1 other location - About 2 hrs to fix
                                                                                                  cabot/static/arachnys/js/rickshaw.js on lines 1551..1555

                                                                                                  Duplicated Code

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

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

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

                                                                                                  Tuning

                                                                                                  This issue has a mass of 88.

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

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

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

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

                                                                                                  Refactorings

                                                                                                  Further Reading

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

                                                                                                      rightHandle.enter()
                                                                                                        .append("rect")
                                                                                                        .attr('width', this.config.frameHandleThickness)
                                                                                                        .attr('height', this.config.height)
                                                                                                        .style("cursor", "ew-resize")
                                                                                                  Severity: Major
                                                                                                  Found in cabot/static/arachnys/js/rickshaw.js and 1 other location - About 2 hrs to fix
                                                                                                  cabot/static/arachnys/js/rickshaw.js on lines 2721..2727

                                                                                                  Duplicated Code

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

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

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

                                                                                                  Tuning

                                                                                                  This issue has a mass of 79.

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

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

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

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

                                                                                                      leftHandle.enter()
                                                                                                        .append("rect")
                                                                                                        .attr('width', this.config.frameHandleThickness)
                                                                                                        .attr('height', this.config.height)
                                                                                                        .style("cursor", "ew-resize")
                                                                                                  Severity: Major
                                                                                                  Found in cabot/static/arachnys/js/rickshaw.js and 1 other location - About 2 hrs to fix
                                                                                                  cabot/static/arachnys/js/rickshaw.js on lines 2734..2740

                                                                                                  Duplicated Code

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

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

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

                                                                                                  Tuning

                                                                                                  This issue has a mass of 79.

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

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

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

                                                                                                  See codeclimate-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 cabot/static/arachnys/js/rickshaw.js and 1 other location - About 1 hr to fix
                                                                                                  cabot/static/arachnys/js/rickshaw.js on lines 1223..1231

                                                                                                  Duplicated Code

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

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

                                                                                                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both 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: 'json',
                                                                                                  Severity: Major
                                                                                                  Found in cabot/static/arachnys/js/rickshaw.js and 1 other location - About 1 hr to fix
                                                                                                  cabot/static/arachnys/js/rickshaw.js on lines 2294..2302

                                                                                                  Duplicated Code

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

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

                                                                                                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both 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 cabot/static/arachnys/js/rickshaw.js and 1 other location - About 1 hr to fix
                                                                                                  cabot/static/arachnys/js/rickshaw.js on lines 2156..2163

                                                                                                  Duplicated Code

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

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

                                                                                                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both 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 cabot/static/arachnys/js/rickshaw.js and 1 other location - About 1 hr to fix
                                                                                                  cabot/static/arachnys/js/rickshaw.js on lines 2147..2154

                                                                                                  Duplicated Code

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

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

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

                                                                                                  Tuning

                                                                                                  This issue has a mass of 67.

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

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

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

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

                                                                                                  Refactorings

                                                                                                  Further Reading

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

                                                                                                        var nodes = vis.selectAll("path")
                                                                                                          .data(series.stack.filter( function(d) { return d.y !== null } ))
                                                                                                          .enter().append("svg:circle")
                                                                                                            .attr("cx", function(d) { return graph.x(d.x) })
                                                                                                  Severity: Major
                                                                                                  Found in cabot/static/arachnys/js/rickshaw.js and 1 other location - About 1 hr to fix
                                                                                                  cabot/static/arachnys/js/rickshaw.js on lines 3217..3220

                                                                                                  Duplicated Code

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

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

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

                                                                                                  Tuning

                                                                                                  This issue has a mass of 66.

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

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

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

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

                                                                                                  Refactorings

                                                                                                  Further Reading

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

                                                                                                        var nodes = vis.selectAll("path")
                                                                                                          .data(series.stack.filter( function(d) { return d.y !== null } ))
                                                                                                          .enter().append("svg:rect")
                                                                                                          .attr("x", function(d) { return graph.x(d.x) + barXOffset })
                                                                                                  Severity: Major
                                                                                                  Found in cabot/static/arachnys/js/rickshaw.js and 1 other location - About 1 hr to fix
                                                                                                  cabot/static/arachnys/js/rickshaw.js on lines 3399..3402

                                                                                                  Duplicated Code

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

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

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

                                                                                                  Tuning

                                                                                                  This issue has a mass of 66.

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

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

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

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

                                                                                                  Refactorings

                                                                                                  Further Reading

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

                                                                                                                          var strokeNodes = vis.selectAll('path.stroke')
                                                                                                                                  .data(data)
                                                                                                                                  .enter().append("svg:path")
                                                                                                          .classed('stroke', true)
                                                                                                          .attr("d", this.seriesStrokeFactory());
                                                                                                  Severity: Major
                                                                                                  Found in cabot/static/arachnys/js/rickshaw.js and 1 other location - About 1 hr to fix
                                                                                                  cabot/static/arachnys/js/rickshaw.js on lines 3002..3006

                                                                                                  Duplicated Code

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

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

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

                                                                                                      var pathNodes = vis.selectAll("path.path")
                                                                                                        .data(data)
                                                                                                        .enter().append("svg:path")
                                                                                                        .classed('path', true)
                                                                                                        .attr("d", this.seriesPathFactory());
                                                                                                  Severity: Major
                                                                                                  Found in cabot/static/arachnys/js/rickshaw.js and 1 other location - About 1 hr to fix
                                                                                                  cabot/static/arachnys/js/rickshaw.js on lines 3009..3013

                                                                                                  Duplicated Code

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

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

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

                                                                                                    this.unit = function(unitName) {
                                                                                                      return this.units.filter( function(unit) { return unitName == unit.name } ).shift();
                                                                                                    };
                                                                                                  Severity: Major
                                                                                                  Found in cabot/static/arachnys/js/rickshaw.js and 1 other location - About 1 hr to fix
                                                                                                  cabot/static/arachnys/js/rickshaw.js on lines 1067..1069

                                                                                                  Duplicated Code

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

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

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

                                                                                                  Tuning

                                                                                                  This issue has a mass of 56.

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

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

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

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

                                                                                                  Refactorings

                                                                                                  Further Reading

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

                                                                                                    this.unit = function(unitName) {
                                                                                                      return this.units.filter( function(unit) { return unitName == unit.name } ).shift();
                                                                                                    };
                                                                                                  Severity: Major
                                                                                                  Found in cabot/static/arachnys/js/rickshaw.js and 1 other location - About 1 hr to fix
                                                                                                  cabot/static/arachnys/js/rickshaw.js on lines 952..954

                                                                                                  Duplicated Code

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

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

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

                                                                                                  Tuning

                                                                                                  This issue has a mass of 56.

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

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

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

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

                                                                                                  Refactorings

                                                                                                  Further Reading

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

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

                                                                                                  Duplicated Code

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

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

                                                                                                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both 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 cabot/static/arachnys/js/rickshaw.js and 1 other location - About 55 mins to fix
                                                                                                  cabot/static/arachnys/js/rickshaw.js on lines 3760..3762

                                                                                                  Duplicated Code

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

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

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

                                                                                                  Tuning

                                                                                                  This issue has a mass of 53.

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

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

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

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

                                                                                                  Refactorings

                                                                                                  Further Reading

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

                                                                                                      var data = series
                                                                                                        .filter(function(s) { return !s.disabled })
                                                                                                        .map(function(s) { return s.stack });
                                                                                                  Severity: Minor
                                                                                                  Found in cabot/static/arachnys/js/rickshaw.js and 1 other location - About 50 mins to fix
                                                                                                  cabot/static/arachnys/js/rickshaw.js on lines 2998..3000

                                                                                                  Duplicated Code

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

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

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

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

                                                                                                      var data = series
                                                                                                        .filter(function(s) { return !s.disabled })
                                                                                                        .map(function(s) { return s.stack });
                                                                                                  Severity: Minor
                                                                                                  Found in cabot/static/arachnys/js/rickshaw.js and 1 other location - About 50 mins to fix
                                                                                                  cabot/static/arachnys/js/rickshaw.js on lines 3315..3317

                                                                                                  Duplicated Code

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

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

                                                                                                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both 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 cabot/static/arachnys/js/rickshaw.js and 1 other location - About 50 mins to fix
                                                                                                  cabot/static/arachnys/js/rickshaw.js on lines 542..544

                                                                                                  Duplicated Code

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

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

                                                                                                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both 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.data.forEach( function(entry) {
                                                                                                        data = entry.f.apply(self, [data]);
                                                                                                      } );
                                                                                                  Severity: Minor
                                                                                                  Found in cabot/static/arachnys/js/rickshaw.js and 1 other location - About 50 mins to fix
                                                                                                  cabot/static/arachnys/js/rickshaw.js on lines 567..569

                                                                                                  Duplicated Code

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

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

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

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

                                                                                                      series.forEach( function(series) {
                                                                                                        if (series.disabled) return;
                                                                                                        series.path = nodes[0][i++];
                                                                                                        this._styleSeries(series);
                                                                                                      }, this );
                                                                                                  Severity: Minor
                                                                                                  Found in cabot/static/arachnys/js/rickshaw.js and 1 other location - About 45 mins to fix
                                                                                                  cabot/static/arachnys/js/rickshaw.js on lines 3643..3647

                                                                                                  Duplicated Code

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

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

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

                                                                                                  Tuning

                                                                                                  This issue has a mass of 50.

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

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

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

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

                                                                                                  Refactorings

                                                                                                  Further Reading

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

                                                                                                      graph.series.forEach(function(series) {
                                                                                                        if (series.disabled) return;
                                                                                                        series.path = nodes[0][i++];
                                                                                                        this._styleSeries(series);
                                                                                                      }, this);
                                                                                                  Severity: Minor
                                                                                                  Found in cabot/static/arachnys/js/rickshaw.js and 1 other location - About 45 mins to fix
                                                                                                  cabot/static/arachnys/js/rickshaw.js on lines 3334..3338

                                                                                                  Duplicated Code

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

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

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

                                                                                                  Tuning

                                                                                                  This issue has a mass of 50.

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

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

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

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

                                                                                                  Refactorings

                                                                                                  Further Reading

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

                                                                                                      if (this._renderWidth !== undefined && this.graph.width !== this._renderWidth) this.setSize({ auto: true });
                                                                                                  Severity: Minor
                                                                                                  Found in cabot/static/arachnys/js/rickshaw.js and 1 other location - About 40 mins to fix
                                                                                                  cabot/static/arachnys/js/rickshaw.js on lines 1660..1660

                                                                                                  Duplicated Code

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

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

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

                                                                                                  Tuning

                                                                                                  This issue has a mass of 49.

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

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

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

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

                                                                                                  Refactorings

                                                                                                  Further Reading

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

                                                                                                      if (this._renderHeight !== undefined && this.graph.height !== this._renderHeight) this.setSize({ auto: true });
                                                                                                  Severity: Minor
                                                                                                  Found in cabot/static/arachnys/js/rickshaw.js and 1 other location - About 40 mins to fix
                                                                                                  cabot/static/arachnys/js/rickshaw.js on lines 1529..1529

                                                                                                  Duplicated Code

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

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

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

                                                                                                  Tuning

                                                                                                  This issue has a mass of 49.

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

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

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

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

                                                                                                  Refactorings

                                                                                                  Further Reading

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

                                                                                                      element.enter()
                                                                                                        .append("path")
                                                                                                        .attr("stroke", "white")
                                                                                                        .attr("stroke-width", "1px")
                                                                                                        .attr("stroke-linejoin", "round")
                                                                                                  Severity: Minor
                                                                                                  Found in cabot/static/arachnys/js/rickshaw.js and 1 other location - About 40 mins to fix
                                                                                                  cabot/static/arachnys/js/rickshaw.js on lines 2641..2646

                                                                                                  Duplicated Code

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

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

                                                                                                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both 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 cabot/static/arachnys/js/rickshaw.js and 1 other location - About 40 mins to fix
                                                                                                  cabot/static/arachnys/js/rickshaw.js on lines 1325..1327

                                                                                                  Duplicated Code

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

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

                                                                                                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both 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.toggle('active');
                                                                                                            });
                                                                                                  Severity: Minor
                                                                                                  Found in cabot/static/arachnys/js/rickshaw.js and 1 other location - About 40 mins to fix
                                                                                                  cabot/static/arachnys/js/rickshaw.js on lines 1311..1313

                                                                                                  Duplicated Code

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

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

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

                                                                                                      element.enter()
                                                                                                        .append("path")
                                                                                                        .attr("fill", "white")
                                                                                                        .attr("fill-opacity", "0.7")
                                                                                                        .attr("fill-rule", "evenodd")
                                                                                                  Severity: Minor
                                                                                                  Found in cabot/static/arachnys/js/rickshaw.js and 1 other location - About 40 mins to fix
                                                                                                  cabot/static/arachnys/js/rickshaw.js on lines 2669..2674

                                                                                                  Duplicated Code

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

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

                                                                                                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both 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 cabot/static/arachnys/js/rickshaw.js and 1 other location - About 35 mins to fix
                                                                                                  cabot/static/arachnys/js/rickshaw.js on lines 3226..3228

                                                                                                  Duplicated Code

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

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

                                                                                                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both 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 cabot/static/arachnys/js/rickshaw.js and 1 other location - About 35 mins to fix
                                                                                                  cabot/static/arachnys/js/rickshaw.js on lines 3409..3411

                                                                                                  Duplicated Code

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

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

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

                                                                                                          alignables.forEach(function(el) {
                                                                                                            el.classList.remove('right');
                                                                                                            el.classList.add('left');
                                                                                                          });
                                                                                                  Severity: Minor
                                                                                                  Found in cabot/static/arachnys/js/rickshaw.js and 1 other location - About 35 mins to fix
                                                                                                  cabot/static/arachnys/js/rickshaw.js on lines 2223..2226

                                                                                                  Duplicated Code

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

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

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

                                                                                                        alignables.forEach(function(el) {
                                                                                                          el.classList.remove('left');
                                                                                                          el.classList.add('right');
                                                                                                        });
                                                                                                  Severity: Minor
                                                                                                  Found in cabot/static/arachnys/js/rickshaw.js and 1 other location - About 35 mins to fix
                                                                                                  cabot/static/arachnys/js/rickshaw.js on lines 2231..2234

                                                                                                  Duplicated Code

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

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

                                                                                                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both 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 cabot/static/arachnys/js/rickshaw.js and 1 other location - About 30 mins to fix
                                                                                                  cabot/static/arachnys/js/rickshaw.js on lines 1361..1361

                                                                                                  Duplicated Code

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

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

                                                                                                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both 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 cabot/static/arachnys/js/rickshaw.js and 1 other location - About 30 mins to fix
                                                                                                  cabot/static/arachnys/js/rickshaw.js on lines 1366..1366

                                                                                                  Duplicated Code

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

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

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