opsforgeio/cabot

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

Summary

Maintainability
F
3 wks
Test Coverage

File morris.js has 1622 lines of code (exceeds 250 allowed). Consider refactoring.
Open

(function() {
  var $, Morris, minutesSpecHelper, secondsSpecHelper,
    __slice = [].slice,
    __hasProp = {}.hasOwnProperty,
    __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
Severity: Major
Found in cabot/static/arachnys/js/morris.js - About 4 days to fix

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

      Morris.Grid = (function(_super) {
    
        __extends(Grid, _super);
    
        function Grid(options) {
    Severity: Major
    Found in cabot/static/arachnys/js/morris.js - About 2 days to fix

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

        Morris.Line = (function(_super) {
      
          __extends(Line, _super);
      
          function Line(options) {
      Severity: Major
      Found in cabot/static/arachnys/js/morris.js - About 1 day to fix

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

          Morris.Bar = (function(_super) {
        
            __extends(Bar, _super);
        
            function Bar(options) {
        Severity: Major
        Found in cabot/static/arachnys/js/morris.js - About 1 day to fix

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

            Morris.Donut = (function(_super) {
          
              __extends(Donut, _super);
          
              Donut.prototype.defaults = {
          Severity: Major
          Found in cabot/static/arachnys/js/morris.js - About 5 hrs to fix

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

                Grid.prototype.setData = function(data, redraw) {
                  var e, idx, index, maxGoal, minGoal, ret, row, step, total, y, ykey, ymax, ymin, yval;
                  if (redraw == null) {
                    redraw = true;
                  }
            Severity: Major
            Found in cabot/static/arachnys/js/morris.js - About 5 hrs to fix

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

                Morris.Area = (function(_super) {
                  var areaDefaults;
              
                  __extends(Area, _super);
              
              
              Severity: Major
              Found in cabot/static/arachnys/js/morris.js - About 3 hrs to fix

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

                  Morris.DonutSegment = (function(_super) {
                
                    __extends(DonutSegment, _super);
                
                    function DonutSegment(cx, cy, inner, outer, p0, p1, color, backgroundColor, index, raphael) {
                Severity: Major
                Found in cabot/static/arachnys/js/morris.js - About 3 hrs to fix

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

                        this.data = (function() {
                          var _i, _len, _results;
                          _results = [];
                          for (index = _i = 0, _len = data.length; _i < _len; index = ++_i) {
                            row = data[index];
                  Severity: Major
                  Found in cabot/static/arachnys/js/morris.js - About 2 hrs to fix

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

                      Morris.parseDate = function(date) {
                        var isecs, m, msecs, n, o, offsetmins, p, q, r, ret, secs;
                        if (typeof date === 'number') {
                          return date;
                        }
                    Severity: Major
                    Found in cabot/static/arachnys/js/morris.js - About 2 hrs to fix

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

                          Donut.prototype.redraw = function() {
                            var C, cx, cy, i, idx, last, max_value, min, next, seg, total, value, w, _i, _j, _k, _len, _len1, _len2, _ref, _ref1, _ref2, _results;
                            this.el.empty();
                            this.raphael = new Raphael(this.el[0]);
                            cx = this.el.width() / 2;
                      Severity: Major
                      Found in cabot/static/arachnys/js/morris.js - About 2 hrs to fix

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

                            Line.prototype.drawXAxis = function() {
                              var drawLabel, l, labels, prevAngleMargin, prevLabelMargin, row, ypos, _i, _len, _results,
                                _this = this;
                              ypos = this.bottom + this.options.padding / 2;
                              prevLabelMargin = null;
                        Severity: Major
                        Found in cabot/static/arachnys/js/morris.js - About 2 hrs to fix

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

                            Morris.Hover = (function() {
                          
                              Hover.defaults = {
                                "class": 'morris-hover morris-default-style'
                              };
                          Severity: Minor
                          Found in cabot/static/arachnys/js/morris.js - About 2 hrs to fix

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

                                function Grid(options) {
                                  var _this = this;
                                  if (typeof options.element === 'string') {
                                    this.el = $(document.getElementById(options.element));
                                  } else {
                            Severity: Minor
                            Found in cabot/static/arachnys/js/morris.js - About 1 hr to fix

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

                                  Bar.prototype.drawSeries = function() {
                                    var barWidth, bottom, groupWidth, idx, lastTop, left, leftPadding, numBars, row, sidx, size, top, ypos, zeroPos;
                                    groupWidth = this.width / this.options.data.length;
                                    numBars = this.options.stacked != null ? 1 : this.options.ykeys.length;
                                    barWidth = (groupWidth * this.options.barSizeRatio - this.options.barGap * (numBars - 1)) / numBars;
                              Severity: Minor
                              Found in cabot/static/arachnys/js/morris.js - About 1 hr to fix

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

                                    Line.prototype.generatePaths = function() {
                                      var c, coords, i, r, smooth;
                                      return this.paths = (function() {
                                        var _i, _ref, _ref1, _results;
                                        _results = [];
                                Severity: Minor
                                Found in cabot/static/arachnys/js/morris.js - About 1 hr to fix

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

                                      Grid.prototype._calc = function() {
                                        var bottomOffsets, gridLine, h, i, w, yLabelWidths;
                                        w = this.el.width();
                                        h = this.el.height();
                                        if (this.elementWidth !== w || this.elementHeight !== h || this.dirty) {
                                  Severity: Minor
                                  Found in cabot/static/arachnys/js/morris.js - About 1 hr to fix

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

                                          return this.paths = (function() {
                                            var _i, _ref, _ref1, _results;
                                            _results = [];
                                            for (i = _i = 0, _ref = this.options.ykeys.length; 0 <= _ref ? _i < _ref : _i > _ref; i = 0 <= _ref ? ++_i : --_i) {
                                              smooth = this.options.smooth === true || (_ref1 = this.options.ykeys[i], __indexOf.call(this.options.smooth, _ref1) >= 0);
                                    Severity: Minor
                                    Found in cabot/static/arachnys/js/morris.js - About 1 hr to fix

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

                                            return this.bars = (function() {
                                              var _i, _len, _ref, _results;
                                              _ref = this.data;
                                              _results = [];
                                              for (idx = _i = 0, _len = _ref.length; _i < _len; idx = ++_i) {
                                      Severity: Minor
                                      Found in cabot/static/arachnys/js/morris.js - About 1 hr to fix

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

                                            Grid.prototype.autoGridLines = function(ymin, ymax, nlines) {
                                              var gmax, gmin, grid, smag, span, step, unit, y, ymag;
                                              span = ymax - ymin;
                                              ymag = Math.floor(Math.log(span) / Math.log(10));
                                              unit = Math.pow(10, ymag);
                                        Severity: Minor
                                        Found in cabot/static/arachnys/js/morris.js - About 1 hr to fix

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

                                              Line.prototype.calcPoints = function() {
                                                var row, y, _i, _len, _ref, _results;
                                                _ref = this.data;
                                                _results = [];
                                                for (_i = 0, _len = _ref.length; _i < _len; _i++) {
                                          Severity: Minor
                                          Found in cabot/static/arachnys/js/morris.js - About 1 hr to fix

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

                                                Line.createPath = function(coords, smooth, bottom) {
                                                  var coord, g, grads, i, ix, lg, path, prevCoord, x1, x2, y1, y2, _i, _len;
                                                  path = "";
                                                  if (smooth) {
                                                    grads = Morris.Line.gradients(coords);
                                            Severity: Minor
                                            Found in cabot/static/arachnys/js/morris.js - About 1 hr to fix

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

                                                Morris.labelSeries = function(dmin, dmax, pxwidth, specName, xLabelFormat) {
                                                  var d, d0, ddensity, name, ret, s, spec, t, _i, _len, _ref;
                                                  ddensity = 200 * (dmax - dmin) / pxwidth;
                                                  d0 = new Date(dmin);
                                                  spec = Morris.LABEL_SPECS[specName];
                                              Severity: Minor
                                              Found in cabot/static/arachnys/js/morris.js - About 1 hr to fix

                                                Function DonutSegment has 10 arguments (exceeds 4 allowed). Consider refactoring.
                                                Open

                                                    function DonutSegment(cx, cy, inner, outer, p0, p1, color, backgroundColor, index, raphael) {
                                                Severity: Major
                                                Found in cabot/static/arachnys/js/morris.js - About 1 hr to fix

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

                                                            ret.y = (function() {
                                                              var _j, _len1, _ref, _results1;
                                                              _ref = this.options.ykeys;
                                                              _results1 = [];
                                                              for (idx = _j = 0, _len1 = _ref.length; _j < _len1; idx = ++_j) {
                                                  Severity: Minor
                                                  Found in cabot/static/arachnys/js/morris.js - About 1 hr to fix

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

                                                        function Donut(options) {
                                                          this.select = __bind(this.select, this);
                                                    
                                                          this.click = __bind(this.click, this);
                                                    
                                                    
                                                    Severity: Minor
                                                    Found in cabot/static/arachnys/js/morris.js - About 1 hr to fix

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

                                                          Line.gradients = function(coords) {
                                                            var coord, grad, i, nextCoord, prevCoord, _i, _len, _results;
                                                            grad = function(a, b) {
                                                              return (a.y - b.y) / (a.x - b.x);
                                                            };
                                                      Severity: Minor
                                                      Found in cabot/static/arachnys/js/morris.js - About 1 hr to fix

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

                                                            Bar.prototype.drawXAxis = function() {
                                                              var i, label, labelBox, margin, offset, prevAngleMargin, prevLabelMargin, row, textBox, ypos, _i, _ref, _results;
                                                              ypos = this.bottom + this.options.padding / 2;
                                                              prevLabelMargin = null;
                                                              prevAngleMargin = null;
                                                        Severity: Minor
                                                        Found in cabot/static/arachnys/js/morris.js - About 1 hr to fix

                                                          Avoid deeply nested control flow statements.
                                                          Open

                                                                    if (q[7] === '+') {
                                                                      offsetmins = 0 - offsetmins;
                                                                    }
                                                          Severity: Major
                                                          Found in cabot/static/arachnys/js/morris.js - About 45 mins to fix

                                                            Avoid deeply nested control flow statements.
                                                            Open

                                                                    if (r[8] !== 'Z') {
                                                                      offsetmins = parseInt(r[10], 10) * 60 + parseInt(r[11], 10);
                                                                      if (r[9] === '+') {
                                                                        offsetmins = 0 - offsetmins;
                                                                      }
                                                            Severity: Major
                                                            Found in cabot/static/arachnys/js/morris.js - About 45 mins to fix

                                                              Avoid deeply nested control flow statements.
                                                              Open

                                                                                if (ymax != null) {
                                                                                  ymax = Math.max(yval, ymax);
                                                                                  ymin = Math.min(yval, ymin);
                                                                                } else {
                                                                                  ymax = ymin = yval;
                                                              Severity: Major
                                                              Found in cabot/static/arachnys/js/morris.js - About 45 mins to fix

                                                                Consider simplifying this complex logical expression.
                                                                Open

                                                                        if ((!(prevLabelMargin != null) || prevLabelMargin >= labelBox.x + labelBox.width || (prevAngleMargin != null) && prevAngleMargin >= labelBox.x) && labelBox.x >= 0 && (labelBox.x + labelBox.width) < this.el.width()) {
                                                                          if (this.options.xLabelAngle !== 0) {
                                                                            margin = 1.25 * this.options.gridTextSize / Math.sin(this.options.xLabelAngle * Math.PI / 180.0);
                                                                            prevAngleMargin = labelBox.x - margin;
                                                                          }
                                                                Severity: Major
                                                                Found in cabot/static/arachnys/js/morris.js - About 40 mins to fix

                                                                  Consider simplifying this complex logical expression.
                                                                  Open

                                                                          if ((!(prevLabelMargin != null) || prevLabelMargin >= labelBox.x + labelBox.width || (prevAngleMargin != null) && prevAngleMargin >= labelBox.x) && labelBox.x >= 0 && (labelBox.x + labelBox.width) < _this.el.width()) {
                                                                            if (_this.options.xLabelAngle !== 0) {
                                                                              margin = 1.25 * _this.options.gridTextSize / Math.sin(_this.options.xLabelAngle * Math.PI / 180.0);
                                                                              prevAngleMargin = labelBox.x - margin;
                                                                            }
                                                                  Severity: Major
                                                                  Found in cabot/static/arachnys/js/morris.js - About 40 mins to fix

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

                                                                        Bar.prototype.drawBar = function(xPos, yPos, width, height, barColor) {
                                                                    Severity: Minor
                                                                    Found in cabot/static/arachnys/js/morris.js - About 35 mins to fix

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

                                                                        Morris.labelSeries = function(dmin, dmax, pxwidth, specName, xLabelFormat) {
                                                                      Severity: Minor
                                                                      Found in cabot/static/arachnys/js/morris.js - About 35 mins to fix

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

                                                                            DonutSegment.prototype.drawDonutSegment = function(path, fillColor, strokeColor, hoverFunction, clickFunction) {
                                                                        Severity: Minor
                                                                        Found in cabot/static/arachnys/js/morris.js - About 35 mins to fix

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

                                                                              Line.prototype.drawLinePoint = function(xPos, yPos, size, pointColor, lineIndex) {
                                                                          Severity: Minor
                                                                          Found in cabot/static/arachnys/js/morris.js - About 35 mins to fix

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

                                                                                Donut.prototype.drawEmptyDonutLabel = function(xPos, yPos, color, fontSize, fontWeight) {
                                                                            Severity: Minor
                                                                            Found in cabot/static/arachnys/js/morris.js - About 35 mins to fix

                                                                              Avoid too many return statements within this function.
                                                                              Open

                                                                                      return Date.UTC(parseInt(q[1], 10), parseInt(q[2], 10) - 1, parseInt(q[3], 10), parseInt(q[4], 10), parseInt(q[5], 10) + offsetmins);
                                                                              Severity: Major
                                                                              Found in cabot/static/arachnys/js/morris.js - About 30 mins to fix

                                                                                Avoid too many return statements within this function.
                                                                                Open

                                                                                          return parseInt(boundaryOption, 10);
                                                                                Severity: Major
                                                                                Found in cabot/static/arachnys/js/morris.js - About 30 mins to fix

                                                                                  Avoid too many return statements within this function.
                                                                                  Open

                                                                                          return new Date(parseInt(q[1], 10), parseInt(q[2], 10) - 1, parseInt(q[3], 10), parseInt(q[4], 10), parseInt(q[5], 10)).getTime();
                                                                                  Severity: Major
                                                                                  Found in cabot/static/arachnys/js/morris.js - About 30 mins to fix

                                                                                    Avoid too many return statements within this function.
                                                                                    Open

                                                                                          return new Date(parseInt(date, 10), 0, 1).getTime();
                                                                                    Severity: Major
                                                                                    Found in cabot/static/arachnys/js/morris.js - About 30 mins to fix

                                                                                      Avoid too many return statements within this function.
                                                                                      Open

                                                                                            return ret.getTime() + parseInt(p[2], 10) * 604800000;
                                                                                      Severity: Major
                                                                                      Found in cabot/static/arachnys/js/morris.js - About 30 mins to fix

                                                                                        Avoid too many return statements within this function.
                                                                                        Open

                                                                                                return Date.UTC(parseInt(r[1], 10), parseInt(r[2], 10) - 1, parseInt(r[3], 10), parseInt(r[4], 10), parseInt(r[5], 10) + offsetmins, isecs, msecs);
                                                                                        Severity: Major
                                                                                        Found in cabot/static/arachnys/js/morris.js - About 30 mins to fix

                                                                                          Avoid too many return statements within this function.
                                                                                          Open

                                                                                                  return boundaryOption;
                                                                                          Severity: Major
                                                                                          Found in cabot/static/arachnys/js/morris.js - About 30 mins to fix

                                                                                            Avoid too many return statements within this function.
                                                                                            Open

                                                                                                    return new Date(parseInt(r[1], 10), parseInt(r[2], 10) - 1, parseInt(r[3], 10), parseInt(r[4], 10), parseInt(r[5], 10), isecs, msecs).getTime();
                                                                                            Severity: Major
                                                                                            Found in cabot/static/arachnys/js/morris.js - About 30 mins to fix

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

                                                                                                  __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
                                                                                              Severity: Major
                                                                                              Found in cabot/static/arachnys/js/morris.js and 1 other location - About 4 hrs to fix
                                                                                              cabot/static/theme/js/chosen.jquery.js on lines 13..13

                                                                                              Duplicated Code

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

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

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

                                                                                              Tuning

                                                                                              This issue has a mass of 119.

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

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

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

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

                                                                                                    for (j = _i = 0, _len = _ref.length; _i < _len; j = ++_i) {
                                                                                                      y = _ref[j];
                                                                                                      content += "<div class='morris-hover-point' style='color: " + (this.colorFor(row, j, 'label')) + "'>\n  " + this.options.labels[j] + ":\n  " + (this.yLabelFormat(y)) + "\n</div>";
                                                                                                    }
                                                                                              Severity: Major
                                                                                              Found in cabot/static/arachnys/js/morris.js and 1 other location - About 3 hrs to fix
                                                                                              cabot/static/arachnys/js/morris.js on lines 1487..1490

                                                                                              Duplicated Code

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

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

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

                                                                                                    for (j = _i = 0, _len = _ref.length; _i < _len; j = ++_i) {
                                                                                                      y = _ref[j];
                                                                                                      content += "<div class='morris-hover-point' style='color: " + (this.colorFor(row, j, 'label')) + "'>\n  " + this.options.labels[j] + ":\n  " + (this.yLabelFormat(y)) + "\n</div>";
                                                                                                    }
                                                                                              Severity: Major
                                                                                              Found in cabot/static/arachnys/js/morris.js and 1 other location - About 3 hrs to fix
                                                                                              cabot/static/arachnys/js/morris.js on lines 775..778

                                                                                              Duplicated Code

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

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

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

                                                                                                    for (i = _i = 0, _len = _ref.length; _i < _len; i = ++_i) {
                                                                                                      goal = _ref[i];
                                                                                                      color = this.options.goalLineColors[i % this.options.goalLineColors.length];
                                                                                                      _results.push(this.drawGoal(goal, color));
                                                                                                    }
                                                                                              Severity: Major
                                                                                              Found in cabot/static/arachnys/js/morris.js and 1 other location - About 3 hrs to fix
                                                                                              cabot/static/arachnys/js/morris.js on lines 487..491

                                                                                              Duplicated Code

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

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

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

                                                                                              Tuning

                                                                                              This issue has a mass of 106.

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

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

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

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

                                                                                                    for (i = _i = 0, _len = _ref.length; _i < _len; i = ++_i) {
                                                                                                      event = _ref[i];
                                                                                                      color = this.options.eventLineColors[i % this.options.eventLineColors.length];
                                                                                                      _results.push(this.drawEvent(event, color));
                                                                                                    }
                                                                                              Severity: Major
                                                                                              Found in cabot/static/arachnys/js/morris.js and 1 other location - About 3 hrs to fix
                                                                                              cabot/static/arachnys/js/morris.js on lines 475..479

                                                                                              Duplicated Code

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

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

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

                                                                                              Tuning

                                                                                              This issue has a mass of 106.

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

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

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

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

                                                                                              Refactorings

                                                                                              Further Reading

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

                                                                                                    if (this.options.hideHover !== 'always') {
                                                                                                      this.hover = new Morris.Hover({
                                                                                                        parent: this.el
                                                                                                      });
                                                                                                      this.on('hovermove', this.onHoverMove);
                                                                                              Severity: Major
                                                                                              Found in cabot/static/arachnys/js/morris.js and 1 other location - About 3 hrs to fix
                                                                                              cabot/static/arachnys/js/morris.js on lines 1301..1308

                                                                                              Duplicated Code

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

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

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

                                                                                              Tuning

                                                                                              This issue has a mass of 96.

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

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

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

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

                                                                                              Refactorings

                                                                                              Further Reading

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

                                                                                                    if (this.options.hideHover !== 'always') {
                                                                                                      this.hover = new Morris.Hover({
                                                                                                        parent: this.el
                                                                                                      });
                                                                                                      this.on('hovermove', this.onHoverMove);
                                                                                              Severity: Major
                                                                                              Found in cabot/static/arachnys/js/morris.js and 1 other location - About 3 hrs to fix
                                                                                              cabot/static/arachnys/js/morris.js on lines 659..666

                                                                                              Duplicated Code

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

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

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

                                                                                              Tuning

                                                                                              This issue has a mass of 96.

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

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

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

                                                                                                    return this.raphael.text(xPos, yPos, text).attr('font-size', this.options.gridTextSize).attr('font-family', this.options.gridTextFamily).attr('font-weight', this.options.gridTextWeight).attr('fill', this.options.gridTextColor);
                                                                                              Severity: Major
                                                                                              Found in cabot/static/arachnys/js/morris.js and 2 other locations - About 2 hrs to fix
                                                                                              cabot/static/arachnys/js/morris.js on lines 504..504
                                                                                              cabot/static/arachnys/js/morris.js on lines 1500..1500

                                                                                              Duplicated Code

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

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

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

                                                                                              Tuning

                                                                                              This issue has a mass of 83.

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

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

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

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

                                                                                              Refactorings

                                                                                              Further Reading

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

                                                                                                    return label = this.raphael.text(xPos, yPos, text).attr('font-size', this.options.gridTextSize).attr('font-family', this.options.gridTextFamily).attr('font-weight', this.options.gridTextWeight).attr('fill', this.options.gridTextColor);
                                                                                              Severity: Major
                                                                                              Found in cabot/static/arachnys/js/morris.js and 2 other locations - About 2 hrs to fix
                                                                                              cabot/static/arachnys/js/morris.js on lines 504..504
                                                                                              cabot/static/arachnys/js/morris.js on lines 1029..1029

                                                                                              Duplicated Code

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

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

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

                                                                                              Tuning

                                                                                              This issue has a mass of 83.

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

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

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

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

                                                                                              Refactorings

                                                                                              Further Reading

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

                                                                                                    return this.raphael.text(xPos, yPos, text).attr('font-size', this.options.gridTextSize).attr('font-family', this.options.gridTextFamily).attr('font-weight', this.options.gridTextWeight).attr('fill', this.options.gridTextColor).attr('text-anchor', 'end');
                                                                                              Severity: Major
                                                                                              Found in cabot/static/arachnys/js/morris.js and 2 other locations - About 2 hrs to fix
                                                                                              cabot/static/arachnys/js/morris.js on lines 1029..1029
                                                                                              cabot/static/arachnys/js/morris.js on lines 1500..1500

                                                                                              Duplicated Code

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

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

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

                                                                                              Tuning

                                                                                              This issue has a mass of 83.

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

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

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

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

                                                                                              Refactorings

                                                                                              Further Reading

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

                                                                                                    this.el.bind('click', function(evt) {
                                                                                                      var offset;
                                                                                                      offset = _this.el.offset();
                                                                                                      return _this.fire('gridclick', evt.pageX - offset.left, evt.pageY - offset.top);
                                                                                                    });
                                                                                              Severity: Major
                                                                                              Found in cabot/static/arachnys/js/morris.js and 1 other location - About 2 hrs to fix
                                                                                              cabot/static/arachnys/js/morris.js on lines 96..100

                                                                                              Duplicated Code

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

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

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

                                                                                              Tuning

                                                                                              This issue has a mass of 82.

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

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

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

                                                                                              See codeclimate-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.el.bind('mousemove', function(evt) {
                                                                                                      var offset;
                                                                                                      offset = _this.el.offset();
                                                                                                      return _this.fire('hovermove', evt.pageX - offset.left, evt.pageY - offset.top);
                                                                                                    });
                                                                                              Severity: Major
                                                                                              Found in cabot/static/arachnys/js/morris.js and 1 other location - About 2 hrs to fix
                                                                                              cabot/static/arachnys/js/morris.js on lines 111..115

                                                                                              Duplicated Code

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

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

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

                                                                                              Tuning

                                                                                              This issue has a mass of 82.

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

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

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

                                                                                              See codeclimate-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 (q[6] !== 'Z') {
                                                                                                        offsetmins = parseInt(q[8], 10) * 60 + parseInt(q[9], 10);
                                                                                                        if (q[7] === '+') {
                                                                                                          offsetmins = 0 - offsetmins;
                                                                                                        }
                                                                                              Severity: Major
                                                                                              Found in cabot/static/arachnys/js/morris.js and 1 other location - About 1 hr to fix
                                                                                              cabot/static/arachnys/js/morris.js on lines 559..564

                                                                                              Duplicated Code

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

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

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

                                                                                              Tuning

                                                                                              This issue has a mass of 74.

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

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

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

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

                                                                                              Refactorings

                                                                                              Further Reading

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

                                                                                                      if (r[8] !== 'Z') {
                                                                                                        offsetmins = parseInt(r[10], 10) * 60 + parseInt(r[11], 10);
                                                                                                        if (r[9] === '+') {
                                                                                                          offsetmins = 0 - offsetmins;
                                                                                                        }
                                                                                              Severity: Major
                                                                                              Found in cabot/static/arachnys/js/morris.js and 1 other location - About 1 hr to fix
                                                                                              cabot/static/arachnys/js/morris.js on lines 543..548

                                                                                              Duplicated Code

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

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

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

                                                                                              Tuning

                                                                                              This issue has a mass of 74.

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

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

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

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

                                                                                              Refactorings

                                                                                              Further Reading

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

                                                                                                  Line.prototype.onGridClick = function(x, y) {
                                                                                                    var index;
                                                                                                    index = this.hitTest(x, y);
                                                                                                    return this.fire('click', index, this.options.data[index], x, y);
                                                                                                  };
                                                                                              Severity: Major
                                                                                              Found in cabot/static/arachnys/js/morris.js and 1 other location - About 1 hr to fix
                                                                                              cabot/static/arachnys/js/morris.js on lines 1464..1468

                                                                                              Duplicated Code

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

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

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

                                                                                                  Bar.prototype.onGridClick = function(x, y) {
                                                                                                    var index;
                                                                                                    index = this.hitTest(x, y);
                                                                                                    return this.fire('click', index, this.options.data[index], x, y);
                                                                                                  };
                                                                                              Severity: Major
                                                                                              Found in cabot/static/arachnys/js/morris.js and 1 other location - About 1 hr to fix
                                                                                              cabot/static/arachnys/js/morris.js on lines 741..745

                                                                                              Duplicated Code

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

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

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

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

                                                                                                    if (typeof options.element === 'string') {
                                                                                                      this.el = $(document.getElementById(options.element));
                                                                                                    } else {
                                                                                                      this.el = $(options.element);
                                                                                                    }
                                                                                              Severity: Major
                                                                                              Found in cabot/static/arachnys/js/morris.js and 1 other location - About 1 hr to fix
                                                                                              cabot/static/arachnys/js/morris.js on lines 1531..1535

                                                                                              Duplicated Code

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

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

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

                                                                                              Tuning

                                                                                              This issue has a mass of 67.

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

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

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

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

                                                                                              Refactorings

                                                                                              Further Reading

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

                                                                                                    if (typeof options.element === 'string') {
                                                                                                      this.el = $(document.getElementById(options.element));
                                                                                                    } else {
                                                                                                      this.el = $(options.element);
                                                                                                    }
                                                                                              Severity: Major
                                                                                              Found in cabot/static/arachnys/js/morris.js and 1 other location - About 1 hr to fix
                                                                                              cabot/static/arachnys/js/morris.js on lines 73..77

                                                                                              Duplicated Code

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

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

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

                                                                                                    if (!this.selected) {
                                                                                                      this.seg.animate({
                                                                                                        path: this.selectedPath
                                                                                                      }, 150, '<>');
                                                                                                      this.arc.animate({
                                                                                              Severity: Major
                                                                                              Found in cabot/static/arachnys/js/morris.js and 1 other location - About 1 hr to fix
                                                                                              cabot/static/arachnys/js/morris.js on lines 1752..1760

                                                                                              Duplicated Code

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

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

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

                                                                                              Tuning

                                                                                              This issue has a mass of 65.

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

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

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

                                                                                              See codeclimate-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.selected) {
                                                                                                      this.seg.animate({
                                                                                                        path: this.path
                                                                                                      }, 150, '<>');
                                                                                                      this.arc.animate({
                                                                                              Severity: Major
                                                                                              Found in cabot/static/arachnys/js/morris.js and 1 other location - About 1 hr to fix
                                                                                              cabot/static/arachnys/js/morris.js on lines 1740..1748

                                                                                              Duplicated Code

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

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

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

                                                                                              Tuning

                                                                                              This issue has a mass of 65.

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

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

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

                                                                                              See codeclimate-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 ((!(prevLabelMargin != null) || prevLabelMargin >= labelBox.x + labelBox.width || (prevAngleMargin != null) && prevAngleMargin >= labelBox.x) && labelBox.x >= 0 && (labelBox.x + labelBox.width) < this.el.width()) {
                                                                                              Severity: Major
                                                                                              Found in cabot/static/arachnys/js/morris.js and 1 other location - About 1 hr to fix
                                                                                              cabot/static/arachnys/js/morris.js on lines 858..858

                                                                                              Duplicated Code

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

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

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

                                                                                              Tuning

                                                                                              This issue has a mass of 60.

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

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

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

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

                                                                                              Refactorings

                                                                                              Further Reading

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

                                                                                                      if ((!(prevLabelMargin != null) || prevLabelMargin >= labelBox.x + labelBox.width || (prevAngleMargin != null) && prevAngleMargin >= labelBox.x) && labelBox.x >= 0 && (labelBox.x + labelBox.width) < _this.el.width()) {
                                                                                              Severity: Major
                                                                                              Found in cabot/static/arachnys/js/morris.js and 1 other location - About 1 hr to fix
                                                                                              cabot/static/arachnys/js/morris.js on lines 1375..1375

                                                                                              Duplicated Code

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

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

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

                                                                                              Tuning

                                                                                              This issue has a mass of 60.

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

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

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

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

                                                                                              Refactorings

                                                                                              Further Reading

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

                                                                                                    return ("M" + ix0 + "," + iy0) + ("A" + r1 + "," + r1 + ",0," + this.is_long + ",0," + ix1 + "," + iy1) + ("L" + ox1 + "," + oy1) + ("A" + r2 + "," + r2 + ",0," + this.is_long + ",1," + ox0 + "," + oy0) + "Z";
                                                                                              Severity: Major
                                                                                              Found in cabot/static/arachnys/js/morris.js and 1 other location - About 1 hr to fix
                                                                                              cabot/static/arachnys/js/morris.js on lines 1710..1710

                                                                                              Duplicated Code

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

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

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

                                                                                              Tuning

                                                                                              This issue has a mass of 57.

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

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

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

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

                                                                                              Refactorings

                                                                                              Further Reading

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

                                                                                                    return ("M" + ix0 + "," + iy0) + ("A" + r + "," + r + ",0," + this.is_long + ",0," + ix1 + "," + iy1);
                                                                                              Severity: Major
                                                                                              Found in cabot/static/arachnys/js/morris.js and 1 other location - About 1 hr to fix
                                                                                              cabot/static/arachnys/js/morris.js on lines 1704..1704

                                                                                              Duplicated Code

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

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

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

                                                                                              Tuning

                                                                                              This issue has a mass of 57.

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

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

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

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

                                                                                              Refactorings

                                                                                              Further Reading

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

                                                                                                      for (_k = 0, _len2 = _ref2.length; _k < _len2; _k++) {
                                                                                                        value = _ref2[_k];
                                                                                                        _results.push(value);
                                                                                                      }
                                                                                              Severity: Minor
                                                                                              Found in cabot/static/arachnys/js/morris.js and 1 other location - About 55 mins to fix
                                                                                              cabot/static/theme/js/chosen.jquery.js on lines 109..112

                                                                                              Duplicated Code

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

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

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

                                                                                              Tuning

                                                                                              This issue has a mass of 54.

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

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

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

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

                                                                                              Refactorings

                                                                                              Further Reading

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

                                                                                                    _ref1 = this.calcArcPoints(r2), ox0 = _ref1[0], oy0 = _ref1[1], ox1 = _ref1[2], oy1 = _ref1[3];
                                                                                              Severity: Major
                                                                                              Found in cabot/static/arachnys/js/morris.js and 2 other locations - About 55 mins to fix
                                                                                              cabot/static/arachnys/js/morris.js on lines 1702..1702
                                                                                              cabot/static/arachnys/js/morris.js on lines 1709..1709

                                                                                              Duplicated Code

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

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

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

                                                                                                    _ref = this.calcArcPoints(r1), ix0 = _ref[0], iy0 = _ref[1], ix1 = _ref[2], iy1 = _ref[3];
                                                                                              Severity: Major
                                                                                              Found in cabot/static/arachnys/js/morris.js and 2 other locations - About 55 mins to fix
                                                                                              cabot/static/arachnys/js/morris.js on lines 1703..1703
                                                                                              cabot/static/arachnys/js/morris.js on lines 1709..1709

                                                                                              Duplicated Code

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

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

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

                                                                                                    _ref = this.calcArcPoints(r), ix0 = _ref[0], iy0 = _ref[1], ix1 = _ref[2], iy1 = _ref[3];
                                                                                              Severity: Major
                                                                                              Found in cabot/static/arachnys/js/morris.js and 2 other locations - About 55 mins to fix
                                                                                              cabot/static/arachnys/js/morris.js on lines 1702..1702
                                                                                              cabot/static/arachnys/js/morris.js on lines 1703..1703

                                                                                              Duplicated Code

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

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

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

                                                                                                  Line.prototype.strokeWidthForSeries = function(index) {
                                                                                                    return this.options.pointWidths[index % this.options.pointWidths.length];
                                                                                                  };
                                                                                              Severity: Minor
                                                                                              Found in cabot/static/arachnys/js/morris.js and 1 other location - About 50 mins to fix
                                                                                              cabot/static/arachnys/js/morris.js on lines 1044..1046

                                                                                              Duplicated Code

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

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

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

                                                                                              Tuning

                                                                                              This issue has a mass of 52.

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

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

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

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

                                                                                              Refactorings

                                                                                              Further Reading

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

                                                                                                  Line.prototype.strokeForSeries = function(index) {
                                                                                                    return this.options.pointStrokeColors[index % this.options.pointStrokeColors.length];
                                                                                                  };
                                                                                              Severity: Minor
                                                                                              Found in cabot/static/arachnys/js/morris.js and 1 other location - About 50 mins to fix
                                                                                              cabot/static/arachnys/js/morris.js on lines 1040..1042

                                                                                              Duplicated Code

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

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

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

                                                                                              Tuning

                                                                                              This issue has a mass of 52.

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

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

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

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

                                                                                              Refactorings

                                                                                              Further Reading

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

                                                                                                    if (typeof this.options.hoverCallback === 'function') {
                                                                                                      content = this.options.hoverCallback(index, this.options, content);
                                                                                                    }
                                                                                              Severity: Minor
                                                                                              Found in cabot/static/arachnys/js/morris.js and 1 other location - About 35 mins to fix
                                                                                              cabot/static/arachnys/js/morris.js on lines 779..781

                                                                                              Duplicated Code

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

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

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

                                                                                              Tuning

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

                                                                                                    if (typeof this.options.hoverCallback === 'function') {
                                                                                                      content = this.options.hoverCallback(index, this.options, content);
                                                                                                    }
                                                                                              Severity: Minor
                                                                                              Found in cabot/static/arachnys/js/morris.js and 1 other location - About 35 mins to fix
                                                                                              cabot/static/arachnys/js/morris.js on lines 1491..1493

                                                                                              Duplicated Code

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

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

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

                                                                                              Tuning

                                                                                              This issue has a mass of 46.

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

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

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

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

                                                                                              Refactorings

                                                                                              Further Reading

                                                                                              There are no issues that match your filters.

                                                                                              Category
                                                                                              Status