mongoclient/mongoclient

View on GitHub
client/plugins/flot/jquery.flot.js

Summary

Maintainability
F
1 mo
Test Coverage

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

    function Plot(placeholder, data_, options_, plugins) {
        // data is on the form:
        //   [ series1, series2 ... ]
        // where series is either just the data as [ [x1, y1], [x2, y2], ... ]
        // or { data: [ [x1, y1], [x2, y2], ... ], label: "some label", ... }
Severity: Major
Found in client/plugins/flot/jquery.flot.js - About 1 wk to fix

    File jquery.flot.js has 2239 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    /* Javascript plotting library for jQuery, version 0.8.3.
    
    Copyright (c) 2007-2014 IOLA and Ole Laursen.
    Licensed under the MIT license.
    
    
    Severity: Major
    Found in client/plugins/flot/jquery.flot.js - About 6 days to fix

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

              function drawSeriesLines(series) {
                  function plotLine(datapoints, xoffset, yoffset, axisx, axisy) {
                      var points = datapoints.points,
                          ps = datapoints.pointsize,
                          prevx = null, prevy = null;
      Severity: Major
      Found in client/plugins/flot/jquery.flot.js - About 7 hrs to fix

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

                function drawGrid() {
                    var i, axes, bw, bc;
        
                    ctx.save();
                    ctx.translate(plotOffset.left, plotOffset.top);
        Severity: Major
        Found in client/plugins/flot/jquery.flot.js - About 7 hrs to fix

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

                  function processData() {
                      var topSentry = Number.POSITIVE_INFINITY,
                          bottomSentry = Number.NEGATIVE_INFINITY,
                          fakeInfinity = Number.MAX_VALUE,
                          i, j, k, m, length,
          Severity: Major
          Found in client/plugins/flot/jquery.flot.js - About 6 hrs to fix

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

                    function parseOptions(opts) {
            
                        $.extend(true, options, opts);
            
                        // $.extend merges arrays, rather than replacing them.  When less
            Severity: Major
            Found in client/plugins/flot/jquery.flot.js - About 4 hrs to fix

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

                          function plotLineArea(datapoints, axisx, axisy) {
                              var points = datapoints.points,
                                  ps = datapoints.pointsize,
                                  bottom = Math.min(Math.max(0, axisy.min), axisy.max),
                                  i = 0, top, areaOpen = false,
              Severity: Major
              Found in client/plugins/flot/jquery.flot.js - About 3 hrs to fix

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

                        function setupTickGeneration(axis) {
                            var opts = axis.options;
                
                            // estimate number of ticks
                            var noTicks;
                Severity: Major
                Found in client/plugins/flot/jquery.flot.js - About 3 hrs to fix

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

                          function insertLegend() {
                  
                              if (options.legend.container != null) {
                                  $(options.legend.container).html("");
                              } else {
                  Severity: Major
                  Found in client/plugins/flot/jquery.flot.js - About 3 hrs to fix

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

                            function drawBar(x, y, b, barLeft, barRight, fillStyleCallback, axisx, axisy, c, horizontal, lineWidth) {
                                var left, right, bottom, top,
                                    drawLeft, drawRight, drawTop, drawBottom,
                                    tmp;
                    
                    
                    Severity: Major
                    Found in client/plugins/flot/jquery.flot.js - About 3 hrs to fix

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

                              function findNearbyItem(mouseX, mouseY, seriesFilter) {
                                  var maxDistance = options.grid.mouseActiveRadius,
                                      smallestDistance = maxDistance * maxDistance + 1,
                                      item = null, foundPoint = false, i, j, ps;
                      
                      
                      Severity: Major
                      Found in client/plugins/flot/jquery.flot.js - About 2 hrs to fix

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

                                    function plotLine(datapoints, xoffset, yoffset, axisx, axisy) {
                                        var points = datapoints.points,
                                            ps = datapoints.pointsize,
                                            prevx = null, prevy = null;
                        
                        
                        Severity: Major
                        Found in client/plugins/flot/jquery.flot.js - About 2 hrs to fix

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

                                  function allocateAxisBoxFirstPhase(axis) {
                                      // find the bounding box of the axis by looking at label
                                      // widths/heights and ticks, make room by diminishing the
                                      // plotOffset; this first phase only looks at one
                                      // dimension per axis, the other dimension depends on the
                          Severity: Major
                          Found in client/plugins/flot/jquery.flot.js - About 2 hrs to fix

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

                                    function fillInSeriesOptions() {
                            
                                        var neededColors = series.length, maxIndex = -1, i;
                            
                                        // Subtract the number of series that already have fixed colors or
                            Severity: Major
                            Found in client/plugins/flot/jquery.flot.js - About 2 hrs to fix

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

                                      function setupGrid() {
                                          var i, axes = allAxes(), showGrid = options.grid.show;
                              
                                          // Initialize the plot's offset from the edge of the canvas
                              
                              
                              Severity: Minor
                              Found in client/plugins/flot/jquery.flot.js - About 1 hr to fix

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

                                        function drawSeriesPoints(series) {
                                            function plotPoints(datapoints, radius, fillStyle, offset, shadow, axisx, axisy, symbol) {
                                                var points = datapoints.points, ps = datapoints.pointsize;
                                
                                                for (var i = 0; i < points.length; i += ps) {
                                Severity: Minor
                                Found in client/plugins/flot/jquery.flot.js - About 1 hr to fix

                                  Consider simplifying this complex logical expression.
                                  Open

                                                      if (isNaN(v) || v < axis.min || v > axis.max
                                                          // skip those lying on the axes if we got a border
                                                          || (t == "full"
                                                              && ((typeof bw == "object" && bw[axis.position] > 0) || bw > 0)
                                                              && (v == axis.min || v == axis.max)))
                                  Severity: Critical
                                  Found in client/plugins/flot/jquery.flot.js - About 1 hr to fix

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

                                        Canvas.prototype.getTextInfo = function(layer, text, font, angle, width) {
                                    
                                            var textStyle, layerCache, styleCache, info;
                                    
                                            // Cast the value to a string, in case we were given a number or such
                                    Severity: Minor
                                    Found in client/plugins/flot/jquery.flot.js - About 1 hr to fix

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

                                              function drawAxisLabels() {
                                      
                                                  $.each(allAxes(), function (_, axis) {
                                                      var box = axis.box,
                                                          legacyStyles = axis.direction + "Axis " + axis.direction + axis.n + "Axis",
                                      Severity: Minor
                                      Found in client/plugins/flot/jquery.flot.js - About 1 hr to fix

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

                                            Canvas.prototype.render = function() {
                                        
                                                var cache = this._textCache;
                                        
                                                // For each text layer, add elements marked as active that haven't
                                        Severity: Minor
                                        Found in client/plugins/flot/jquery.flot.js - About 1 hr to fix

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

                                                  function drawBar(x, y, b, barLeft, barRight, fillStyleCallback, axisx, axisy, c, horizontal, lineWidth) {
                                          Severity: Major
                                          Found in client/plugins/flot/jquery.flot.js - About 1 hr to fix

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

                                                Canvas.prototype.addText = function(layer, x, y, text, font, angle, width, halign, valign) {
                                            
                                                    var info = this.getTextInfo(layer, text, font, angle, width),
                                                        positions = info.positions;
                                            
                                            
                                            Severity: Minor
                                            Found in client/plugins/flot/jquery.flot.js - About 1 hr to fix

                                              Function addText has 9 arguments (exceeds 4 allowed). Consider refactoring.
                                              Open

                                                  Canvas.prototype.addText = function(layer, x, y, text, font, angle, width, halign, valign) {
                                              Severity: Major
                                              Found in client/plugins/flot/jquery.flot.js - About 1 hr to fix

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

                                                    function Canvas(cls, container) {
                                                
                                                        var element = container.children("." + cls)[0];
                                                
                                                        if (element == null) {
                                                Severity: Minor
                                                Found in client/plugins/flot/jquery.flot.js - About 1 hr to fix

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

                                                          function setRange(axis) {
                                                              var opts = axis.options,
                                                                  min = +(opts.min != null ? opts.min : axis.datamin),
                                                                  max = +(opts.max != null ? opts.max : axis.datamax),
                                                                  delta = max - min;
                                                  Severity: Minor
                                                  Found in client/plugins/flot/jquery.flot.js - About 1 hr to fix

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

                                                            function adjustLayoutForThingsStickingOut() {
                                                                // possibly adjust plot offset to ensure everything stays
                                                                // inside the canvas and isn't clipped off
                                                    
                                                                var minMargin = options.grid.minBorderMargin,
                                                    Severity: Minor
                                                    Found in client/plugins/flot/jquery.flot.js - About 1 hr to fix

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

                                                          Canvas.prototype.getTextLayer = function(classes) {
                                                      
                                                              var layer = this.text[classes];
                                                      
                                                              // Create the text layer if it doesn't exist
                                                      Severity: Minor
                                                      Found in client/plugins/flot/jquery.flot.js - About 1 hr to fix

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

                                                                function drawSeriesBars(series) {
                                                                    function plotBars(datapoints, barLeft, barRight, fillStyleCallback, axisx, axisy) {
                                                                        var points = datapoints.points, ps = datapoints.pointsize;
                                                        
                                                                        for (var i = 0; i < points.length; i += ps) {
                                                        Severity: Minor
                                                        Found in client/plugins/flot/jquery.flot.js - About 1 hr to fix

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

                                                                  function axisToCanvasCoords(pos) {
                                                                      // get canvas coords from the first pair of x/y found in pos
                                                                      var res = {}, i, axis, key;
                                                          
                                                                      for (i = 0; i < xaxes.length; ++i) {
                                                          Severity: Minor
                                                          Found in client/plugins/flot/jquery.flot.js - About 1 hr to fix

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

                                                                    function setTicks(axis) {
                                                                        var oticks = axis.options.ticks, ticks = [];
                                                                        if (oticks == null || (typeof oticks == "number" && oticks > 0))
                                                                            ticks = axis.tickGenerator(axis);
                                                                        else if (oticks) {
                                                            Severity: Minor
                                                            Found in client/plugins/flot/jquery.flot.js - About 1 hr to fix

                                                              Function plotPoints has 8 arguments (exceeds 4 allowed). Consider refactoring.
                                                              Open

                                                                          function plotPoints(datapoints, radius, fillStyle, offset, shadow, axisx, axisy, symbol) {
                                                              Severity: Major
                                                              Found in client/plugins/flot/jquery.flot.js - About 1 hr to fix

                                                                Consider simplifying this complex logical expression.
                                                                Open

                                                                                        if (series[i].bars.horizontal ?
                                                                                            (mx <= Math.max(b, x) && mx >= Math.min(b, x) &&
                                                                                             my >= y + barLeft && my <= y + barRight) :
                                                                                            (mx >= x + barLeft && mx <= x + barRight &&
                                                                                             my >= Math.min(b, y) && my <= Math.max(b, y)))
                                                                Severity: Major
                                                                Found in client/plugins/flot/jquery.flot.js - About 1 hr to fix

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

                                                                              function plotBars(datapoints, barLeft, barRight, fillStyleCallback, axisx, axisy) {
                                                                  Severity: Minor
                                                                  Found in client/plugins/flot/jquery.flot.js - About 45 mins to fix

                                                                    Avoid deeply nested control flow statements.
                                                                    Open

                                                                                            for (var key in styleCache) {
                                                                                                if (hasOwnProperty.call(styleCache, key)) {
                                                                    
                                                                                                    var positions = styleCache[key].positions;
                                                                    
                                                                    
                                                                    Severity: Major
                                                                    Found in client/plugins/flot/jquery.flot.js - About 45 mins to fix

                                                                      Avoid deeply nested control flow statements.
                                                                      Open

                                                                                                  if (val > ymax)
                                                                                                      ymax = val;
                                                                      Severity: Major
                                                                      Found in client/plugins/flot/jquery.flot.js - About 45 mins to fix

                                                                        Avoid deeply nested control flow statements.
                                                                        Open

                                                                                                    for (m = 0; m < ps; ++m)
                                                                                                        points[k + ps + m] = points[k + m];
                                                                        Severity: Major
                                                                        Found in client/plugins/flot/jquery.flot.js - About 45 mins to fix

                                                                          Avoid deeply nested control flow statements.
                                                                          Open

                                                                                                      if (f) {
                                                                                                          if (f.number && val != null) {
                                                                                                              val = +val; // convert to number
                                                                                                              if (isNaN(val))
                                                                                                                  val = null;
                                                                          Severity: Major
                                                                          Found in client/plugins/flot/jquery.flot.js - About 45 mins to fix

                                                                            Avoid deeply nested control flow statements.
                                                                            Open

                                                                                                        if (val < ymin)
                                                                                                            ymin = val;
                                                                            Severity: Major
                                                                            Found in client/plugins/flot/jquery.flot.js - About 45 mins to fix

                                                                              Avoid deeply nested control flow statements.
                                                                              Open

                                                                                                          if (val < xmin)
                                                                                                              xmin = val;
                                                                              Severity: Major
                                                                              Found in client/plugins/flot/jquery.flot.js - About 45 mins to fix

                                                                                Avoid deeply nested control flow statements.
                                                                                Open

                                                                                                            if (val != null) {
                                                                                                                f = format[m];
                                                                                                                // extract min/max info
                                                                                                                if (f.autoscale !== false) {
                                                                                                                    if (f.x) {
                                                                                Severity: Major
                                                                                Found in client/plugins/flot/jquery.flot.js - About 45 mins to fix

                                                                                  Avoid deeply nested control flow statements.
                                                                                  Open

                                                                                                              if (val > xmax)
                                                                                                                  xmax = val;
                                                                                  Severity: Major
                                                                                  Found in client/plugins/flot/jquery.flot.js - About 45 mins to fix

                                                                                    Avoid deeply nested control flow statements.
                                                                                    Open

                                                                                                            for (var key in styleCache) {
                                                                                                                if (hasOwnProperty.call(styleCache, key)) {
                                                                                                                    var positions = styleCache[key].positions;
                                                                                                                    for (var i = 0, position; position = positions[i]; i++) {
                                                                                                                        position.active = false;
                                                                                    Severity: Major
                                                                                    Found in client/plugins/flot/jquery.flot.js - About 45 mins to fix

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

                                                                                          Canvas.prototype.removeText = function(layer, x, y, text, font, angle) {
                                                                                      Severity: Minor
                                                                                      Found in client/plugins/flot/jquery.flot.js - About 45 mins to fix

                                                                                        Consider simplifying this complex logical expression.
                                                                                        Open

                                                                                                            if (s.bars.show || (s.lines.show && s.lines.fill)) {
                                                                                                                var autoscale = !!((s.bars.show && s.bars.zero) || (s.lines.show && s.lines.zero));
                                                                                                                format.push({ y: true, number: true, required: false, defaultValue: 0, autoscale: autoscale });
                                                                                                                if (s.bars.horizontal) {
                                                                                                                    delete format[format.length - 1].y;
                                                                                        Severity: Major
                                                                                        Found in client/plugins/flot/jquery.flot.js - About 40 mins to fix

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

                                                                                                      function plotLine(datapoints, xoffset, yoffset, axisx, axisy) {
                                                                                          Severity: Minor
                                                                                          Found in client/plugins/flot/jquery.flot.js - About 35 mins to fix

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

                                                                                                Canvas.prototype.getTextInfo = function(layer, text, font, angle, width) {
                                                                                            Severity: Minor
                                                                                            Found in client/plugins/flot/jquery.flot.js - About 35 mins to fix

                                                                                              Avoid too many return statements within this function.
                                                                                              Open

                                                                                              (function($){$.color={};$.color.make=function(r,g,b,a){var o={};o.r=r||0;o.g=g||0;o.b=b||0;o.a=a!=null?a:1;o.add=function(c,d){for(var i=0;i<c.length;++i)o[c.charAt(i)]+=d;return o.normalize()};o.scale=function(c,f){for(var i=0;i<c.length;++i)o[c.charAt(i)]*=f;return o.normalize()};o.toString=function(){if(o.a>=1){return"rgb("+[o.r,o.g,o.b].join(",")+")"}else{return"rgba("+[o.r,o.g,o.b,o.a].join(",")+")"}};o.normalize=function(){function clamp(min,value,max){return value<min?min:value>max?max:value}o.r=clamp(0,parseInt(o.r),255);o.g=clamp(0,parseInt(o.g),255);o.b=clamp(0,parseInt(o.b),255);o.a=clamp(0,o.a,1);return o};o.clone=function(){return $.color.make(o.r,o.b,o.g,o.a)};return o.normalize()};$.color.extract=function(elem,css){var c;do{c=elem.css(css).toLowerCase();if(c!=""&&c!="transparent")break;elem=elem.parent()}while(elem.length&&!$.nodeName(elem.get(0),"body"));if(c=="rgba(0, 0, 0, 0)")c="transparent";return $.color.parse(c)};$.color.parse=function(str){var res,m=$.color.make;if(res=/rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/.exec(str))return m(parseInt(res[1],10),parseInt(res[2],10),parseInt(res[3],10));if(res=/rgba\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]+(?:\.[0-9]+)?)\s*\)/.exec(str))return m(parseInt(res[1],10),parseInt(res[2],10),parseInt(res[3],10),parseFloat(res[4]));if(res=/rgb\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*\)/.exec(str))return m(parseFloat(res[1])*2.55,parseFloat(res[2])*2.55,parseFloat(res[3])*2.55);if(res=/rgba\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\s*\)/.exec(str))return m(parseFloat(res[1])*2.55,parseFloat(res[2])*2.55,parseFloat(res[3])*2.55,parseFloat(res[4]));if(res=/#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/.exec(str))return m(parseInt(res[1],16),parseInt(res[2],16),parseInt(res[3],16));if(res=/#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])/.exec(str))return m(parseInt(res[1]+res[1],16),parseInt(res[2]+res[2],16),parseInt(res[3]+res[3],16));var name=$.trim(str).toLowerCase();if(name=="transparent")return m(255,255,255,0);else{res=lookupColors[name]||[0,0,0];return m(res[0],res[1],res[2])}};var lookupColors={aqua:[0,255,255],azure:[240,255,255],beige:[245,245,220],black:[0,0,0],blue:[0,0,255],brown:[165,42,42],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgrey:[169,169,169],darkgreen:[0,100,0],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkviolet:[148,0,211],fuchsia:[255,0,255],gold:[255,215,0],green:[0,128,0],indigo:[75,0,130],khaki:[240,230,140],lightblue:[173,216,230],lightcyan:[224,255,255],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightyellow:[255,255,224],lime:[0,255,0],magenta:[255,0,255],maroon:[128,0,0],navy:[0,0,128],olive:[128,128,0],orange:[255,165,0],pink:[255,192,203],purple:[128,0,128],violet:[128,0,128],red:[255,0,0],silver:[192,192,192],white:[255,255,255],yellow:[255,255,0]}})(jQuery);
                                                                                              Severity: Major
                                                                                              Found in client/plugins/flot/jquery.flot.js - About 30 mins to fix

                                                                                                Avoid too many return statements within this function.
                                                                                                Open

                                                                                                (function($){$.color={};$.color.make=function(r,g,b,a){var o={};o.r=r||0;o.g=g||0;o.b=b||0;o.a=a!=null?a:1;o.add=function(c,d){for(var i=0;i<c.length;++i)o[c.charAt(i)]+=d;return o.normalize()};o.scale=function(c,f){for(var i=0;i<c.length;++i)o[c.charAt(i)]*=f;return o.normalize()};o.toString=function(){if(o.a>=1){return"rgb("+[o.r,o.g,o.b].join(",")+")"}else{return"rgba("+[o.r,o.g,o.b,o.a].join(",")+")"}};o.normalize=function(){function clamp(min,value,max){return value<min?min:value>max?max:value}o.r=clamp(0,parseInt(o.r),255);o.g=clamp(0,parseInt(o.g),255);o.b=clamp(0,parseInt(o.b),255);o.a=clamp(0,o.a,1);return o};o.clone=function(){return $.color.make(o.r,o.b,o.g,o.a)};return o.normalize()};$.color.extract=function(elem,css){var c;do{c=elem.css(css).toLowerCase();if(c!=""&&c!="transparent")break;elem=elem.parent()}while(elem.length&&!$.nodeName(elem.get(0),"body"));if(c=="rgba(0, 0, 0, 0)")c="transparent";return $.color.parse(c)};$.color.parse=function(str){var res,m=$.color.make;if(res=/rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/.exec(str))return m(parseInt(res[1],10),parseInt(res[2],10),parseInt(res[3],10));if(res=/rgba\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]+(?:\.[0-9]+)?)\s*\)/.exec(str))return m(parseInt(res[1],10),parseInt(res[2],10),parseInt(res[3],10),parseFloat(res[4]));if(res=/rgb\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*\)/.exec(str))return m(parseFloat(res[1])*2.55,parseFloat(res[2])*2.55,parseFloat(res[3])*2.55);if(res=/rgba\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\s*\)/.exec(str))return m(parseFloat(res[1])*2.55,parseFloat(res[2])*2.55,parseFloat(res[3])*2.55,parseFloat(res[4]));if(res=/#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/.exec(str))return m(parseInt(res[1],16),parseInt(res[2],16),parseInt(res[3],16));if(res=/#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])/.exec(str))return m(parseInt(res[1]+res[1],16),parseInt(res[2]+res[2],16),parseInt(res[3]+res[3],16));var name=$.trim(str).toLowerCase();if(name=="transparent")return m(255,255,255,0);else{res=lookupColors[name]||[0,0,0];return m(res[0],res[1],res[2])}};var lookupColors={aqua:[0,255,255],azure:[240,255,255],beige:[245,245,220],black:[0,0,0],blue:[0,0,255],brown:[165,42,42],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgrey:[169,169,169],darkgreen:[0,100,0],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkviolet:[148,0,211],fuchsia:[255,0,255],gold:[255,215,0],green:[0,128,0],indigo:[75,0,130],khaki:[240,230,140],lightblue:[173,216,230],lightcyan:[224,255,255],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightyellow:[255,255,224],lime:[0,255,0],magenta:[255,0,255],maroon:[128,0,0],navy:[0,0,128],olive:[128,128,0],orange:[255,165,0],pink:[255,192,203],purple:[128,0,128],violet:[128,0,128],red:[255,0,0],silver:[192,192,192],white:[255,255,255],yellow:[255,255,0]}})(jQuery);
                                                                                                Severity: Major
                                                                                                Found in client/plugins/flot/jquery.flot.js - About 30 mins to fix

                                                                                                  Avoid too many return statements within this function.
                                                                                                  Open

                                                                                                  (function($){$.color={};$.color.make=function(r,g,b,a){var o={};o.r=r||0;o.g=g||0;o.b=b||0;o.a=a!=null?a:1;o.add=function(c,d){for(var i=0;i<c.length;++i)o[c.charAt(i)]+=d;return o.normalize()};o.scale=function(c,f){for(var i=0;i<c.length;++i)o[c.charAt(i)]*=f;return o.normalize()};o.toString=function(){if(o.a>=1){return"rgb("+[o.r,o.g,o.b].join(",")+")"}else{return"rgba("+[o.r,o.g,o.b,o.a].join(",")+")"}};o.normalize=function(){function clamp(min,value,max){return value<min?min:value>max?max:value}o.r=clamp(0,parseInt(o.r),255);o.g=clamp(0,parseInt(o.g),255);o.b=clamp(0,parseInt(o.b),255);o.a=clamp(0,o.a,1);return o};o.clone=function(){return $.color.make(o.r,o.b,o.g,o.a)};return o.normalize()};$.color.extract=function(elem,css){var c;do{c=elem.css(css).toLowerCase();if(c!=""&&c!="transparent")break;elem=elem.parent()}while(elem.length&&!$.nodeName(elem.get(0),"body"));if(c=="rgba(0, 0, 0, 0)")c="transparent";return $.color.parse(c)};$.color.parse=function(str){var res,m=$.color.make;if(res=/rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/.exec(str))return m(parseInt(res[1],10),parseInt(res[2],10),parseInt(res[3],10));if(res=/rgba\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]+(?:\.[0-9]+)?)\s*\)/.exec(str))return m(parseInt(res[1],10),parseInt(res[2],10),parseInt(res[3],10),parseFloat(res[4]));if(res=/rgb\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*\)/.exec(str))return m(parseFloat(res[1])*2.55,parseFloat(res[2])*2.55,parseFloat(res[3])*2.55);if(res=/rgba\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\s*\)/.exec(str))return m(parseFloat(res[1])*2.55,parseFloat(res[2])*2.55,parseFloat(res[3])*2.55,parseFloat(res[4]));if(res=/#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/.exec(str))return m(parseInt(res[1],16),parseInt(res[2],16),parseInt(res[3],16));if(res=/#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])/.exec(str))return m(parseInt(res[1]+res[1],16),parseInt(res[2]+res[2],16),parseInt(res[3]+res[3],16));var name=$.trim(str).toLowerCase();if(name=="transparent")return m(255,255,255,0);else{res=lookupColors[name]||[0,0,0];return m(res[0],res[1],res[2])}};var lookupColors={aqua:[0,255,255],azure:[240,255,255],beige:[245,245,220],black:[0,0,0],blue:[0,0,255],brown:[165,42,42],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgrey:[169,169,169],darkgreen:[0,100,0],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkviolet:[148,0,211],fuchsia:[255,0,255],gold:[255,215,0],green:[0,128,0],indigo:[75,0,130],khaki:[240,230,140],lightblue:[173,216,230],lightcyan:[224,255,255],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightyellow:[255,255,224],lime:[0,255,0],magenta:[255,0,255],maroon:[128,0,0],navy:[0,0,128],olive:[128,128,0],orange:[255,165,0],pink:[255,192,203],purple:[128,0,128],violet:[128,0,128],red:[255,0,0],silver:[192,192,192],white:[255,255,255],yellow:[255,255,0]}})(jQuery);
                                                                                                  Severity: Major
                                                                                                  Found in client/plugins/flot/jquery.flot.js - About 30 mins to fix

                                                                                                    Avoid too many return statements within this function.
                                                                                                    Open

                                                                                                    (function($){$.color={};$.color.make=function(r,g,b,a){var o={};o.r=r||0;o.g=g||0;o.b=b||0;o.a=a!=null?a:1;o.add=function(c,d){for(var i=0;i<c.length;++i)o[c.charAt(i)]+=d;return o.normalize()};o.scale=function(c,f){for(var i=0;i<c.length;++i)o[c.charAt(i)]*=f;return o.normalize()};o.toString=function(){if(o.a>=1){return"rgb("+[o.r,o.g,o.b].join(",")+")"}else{return"rgba("+[o.r,o.g,o.b,o.a].join(",")+")"}};o.normalize=function(){function clamp(min,value,max){return value<min?min:value>max?max:value}o.r=clamp(0,parseInt(o.r),255);o.g=clamp(0,parseInt(o.g),255);o.b=clamp(0,parseInt(o.b),255);o.a=clamp(0,o.a,1);return o};o.clone=function(){return $.color.make(o.r,o.b,o.g,o.a)};return o.normalize()};$.color.extract=function(elem,css){var c;do{c=elem.css(css).toLowerCase();if(c!=""&&c!="transparent")break;elem=elem.parent()}while(elem.length&&!$.nodeName(elem.get(0),"body"));if(c=="rgba(0, 0, 0, 0)")c="transparent";return $.color.parse(c)};$.color.parse=function(str){var res,m=$.color.make;if(res=/rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/.exec(str))return m(parseInt(res[1],10),parseInt(res[2],10),parseInt(res[3],10));if(res=/rgba\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]+(?:\.[0-9]+)?)\s*\)/.exec(str))return m(parseInt(res[1],10),parseInt(res[2],10),parseInt(res[3],10),parseFloat(res[4]));if(res=/rgb\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*\)/.exec(str))return m(parseFloat(res[1])*2.55,parseFloat(res[2])*2.55,parseFloat(res[3])*2.55);if(res=/rgba\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\s*\)/.exec(str))return m(parseFloat(res[1])*2.55,parseFloat(res[2])*2.55,parseFloat(res[3])*2.55,parseFloat(res[4]));if(res=/#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/.exec(str))return m(parseInt(res[1],16),parseInt(res[2],16),parseInt(res[3],16));if(res=/#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])/.exec(str))return m(parseInt(res[1]+res[1],16),parseInt(res[2]+res[2],16),parseInt(res[3]+res[3],16));var name=$.trim(str).toLowerCase();if(name=="transparent")return m(255,255,255,0);else{res=lookupColors[name]||[0,0,0];return m(res[0],res[1],res[2])}};var lookupColors={aqua:[0,255,255],azure:[240,255,255],beige:[245,245,220],black:[0,0,0],blue:[0,0,255],brown:[165,42,42],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgrey:[169,169,169],darkgreen:[0,100,0],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkviolet:[148,0,211],fuchsia:[255,0,255],gold:[255,215,0],green:[0,128,0],indigo:[75,0,130],khaki:[240,230,140],lightblue:[173,216,230],lightcyan:[224,255,255],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightyellow:[255,255,224],lime:[0,255,0],magenta:[255,0,255],maroon:[128,0,0],navy:[0,0,128],olive:[128,128,0],orange:[255,165,0],pink:[255,192,203],purple:[128,0,128],violet:[128,0,128],red:[255,0,0],silver:[192,192,192],white:[255,255,255],yellow:[255,255,0]}})(jQuery);
                                                                                                    Severity: Major
                                                                                                    Found in client/plugins/flot/jquery.flot.js - About 30 mins to fix

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

                                                                                                                  for (i = 0; i < axisCount; ++i) {
                                                                                                      
                                                                                                                      axisOptions = options.yaxes[i];
                                                                                                                      if (axisOptions && !axisOptions.tickColor) {
                                                                                                                          axisOptions.tickColor = axisOptions.color;
                                                                                                      Severity: Major
                                                                                                      Found in client/plugins/flot/jquery.flot.js and 1 other location - About 1 day to fix
                                                                                                      client/plugins/flot/jquery.flot.js on lines 782..801

                                                                                                      Duplicated Code

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

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

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

                                                                                                      Tuning

                                                                                                      This issue has a mass of 214.

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

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

                                                                                                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ 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 = 0; i < axisCount; ++i) {
                                                                                                      
                                                                                                                      axisOptions = options.xaxes[i];
                                                                                                                      if (axisOptions && !axisOptions.tickColor) {
                                                                                                                          axisOptions.tickColor = axisOptions.color;
                                                                                                      Severity: Major
                                                                                                      Found in client/plugins/flot/jquery.flot.js and 1 other location - About 1 day to fix
                                                                                                      client/plugins/flot/jquery.flot.js on lines 804..823

                                                                                                      Duplicated Code

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

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

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

                                                                                                      Tuning

                                                                                                      This issue has a mass of 214.

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

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

                                                                                                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ 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 (x1 <= x2 && x1 < axisx.min) {
                                                                                                                              if (x2 < axisx.min)
                                                                                                                                  continue;
                                                                                                                              y1 = (axisx.min - x1) / (x2 - x1) * (y2 - y1) + y1;
                                                                                                                              x1 = axisx.min;
                                                                                                      Severity: Major
                                                                                                      Found in client/plugins/flot/jquery.flot.js and 1 other location - About 6 hrs to fix
                                                                                                      client/plugins/flot/jquery.flot.js on lines 2270..2281

                                                                                                      Duplicated Code

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

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

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

                                                                                                      Tuning

                                                                                                      This issue has a mass of 169.

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

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

                                                                                                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ 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 (y1 >= y2 && y1 > axisy.max) {
                                                                                                                              if (y2 > axisy.max)
                                                                                                                                  continue;
                                                                                                                              x1 = (axisy.max - y1) / (y2 - y1) * (x2 - x1) + x1;
                                                                                                                              y1 = axisy.max;
                                                                                                      Severity: Major
                                                                                                      Found in client/plugins/flot/jquery.flot.js and 1 other location - About 6 hrs to fix
                                                                                                      client/plugins/flot/jquery.flot.js on lines 2284..2295

                                                                                                      Duplicated Code

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

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

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

                                                                                                      Tuning

                                                                                                      This issue has a mass of 169.

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

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

                                                                                                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ 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 (x1 >= x2 && x1 > axisx.max) {
                                                                                                                              if (x2 > axisx.max)
                                                                                                                                  continue;
                                                                                                                              y1 = (axisx.max - x1) / (x2 - x1) * (y2 - y1) + y1;
                                                                                                                              x1 = axisx.max;
                                                                                                      Severity: Major
                                                                                                      Found in client/plugins/flot/jquery.flot.js and 1 other location - About 6 hrs to fix
                                                                                                      client/plugins/flot/jquery.flot.js on lines 2381..2392

                                                                                                      Duplicated Code

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

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

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

                                                                                                      Tuning

                                                                                                      This issue has a mass of 167.

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

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

                                                                                                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ 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 (x1 >= x2 && x1 > axisx.max) {
                                                                                                                              if (x2 > axisx.max)
                                                                                                                                  continue;
                                                                                                                              y1 = (axisx.max - x1) / (x2 - x1) * (y2 - y1) + y1;
                                                                                                                              x1 = axisx.max;
                                                                                                      Severity: Major
                                                                                                      Found in client/plugins/flot/jquery.flot.js and 1 other location - About 6 hrs to fix
                                                                                                      client/plugins/flot/jquery.flot.js on lines 2298..2309

                                                                                                      Duplicated Code

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

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

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

                                                                                                      Tuning

                                                                                                      This issue has a mass of 167.

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

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

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

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

                                                                                                      Refactorings

                                                                                                      Further Reading

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

                                                                                                                  if (options.y2axis) {
                                                                                                                      options.yaxes[1] = $.extend(true, {}, options.yaxis, options.y2axis);
                                                                                                                      options.yaxes[1].position = "right";
                                                                                                                      // Override the inherit to allow the axis to auto-scale
                                                                                                                      if (options.y2axis.min == null) {
                                                                                                      Severity: Major
                                                                                                      Found in client/plugins/flot/jquery.flot.js and 1 other location - About 5 hrs to fix
                                                                                                      client/plugins/flot/jquery.flot.js on lines 830..840

                                                                                                      Duplicated Code

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

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

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

                                                                                                      Tuning

                                                                                                      This issue has a mass of 145.

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

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

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

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

                                                                                                      Refactorings

                                                                                                      Further Reading

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

                                                                                                                  if (options.x2axis) {
                                                                                                                      options.xaxes[1] = $.extend(true, {}, options.xaxis, options.x2axis);
                                                                                                                      options.xaxes[1].position = "top";
                                                                                                                      // Override the inherit to allow the axis to auto-scale
                                                                                                                      if (options.x2axis.min == null) {
                                                                                                      Severity: Major
                                                                                                      Found in client/plugins/flot/jquery.flot.js and 1 other location - About 5 hrs to fix
                                                                                                      client/plugins/flot/jquery.flot.js on lines 841..851

                                                                                                      Duplicated Code

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

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

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

                                                                                                      Tuning

                                                                                                      This issue has a mass of 145.

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

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

                                                                                                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ 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 = 0; i < xaxes.length; ++i) {
                                                                                                                      axis = xaxes[i];
                                                                                                                      if (axis && axis.used) {
                                                                                                                          key = "x" + axis.n;
                                                                                                                          if (pos[key] == null && axis.n == 1)
                                                                                                      Severity: Major
                                                                                                      Found in client/plugins/flot/jquery.flot.js and 1 other location - About 5 hrs to fix
                                                                                                      client/plugins/flot/jquery.flot.js on lines 963..975

                                                                                                      Duplicated Code

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

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

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

                                                                                                      Tuning

                                                                                                      This issue has a mass of 136.

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

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

                                                                                                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ 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 = 0; i < yaxes.length; ++i) {
                                                                                                                      axis = yaxes[i];
                                                                                                                      if (axis && axis.used) {
                                                                                                                          key = "y" + axis.n;
                                                                                                                          if (pos[key] == null && axis.n == 1)
                                                                                                      Severity: Major
                                                                                                      Found in client/plugins/flot/jquery.flot.js and 1 other location - About 5 hrs to fix
                                                                                                      client/plugins/flot/jquery.flot.js on lines 949..961

                                                                                                      Duplicated Code

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

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

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

                                                                                                      Tuning

                                                                                                      This issue has a mass of 136.

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

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

                                                                                                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ 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 (p.charAt(0) == "n")
                                                                                                                          pos += 'top:' + (m[1] + plotOffset.top) + 'px;';
                                                                                                                      else if (p.charAt(0) == "s")
                                                                                                                          pos += 'bottom:' + (m[1] + plotOffset.bottom) + 'px;';
                                                                                                      Severity: Major
                                                                                                      Found in client/plugins/flot/jquery.flot.js and 1 other location - About 2 hrs to fix
                                                                                                      client/plugins/flot/jquery.flot.js on lines 2797..2800

                                                                                                      Duplicated Code

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

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

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

                                                                                                      Tuning

                                                                                                      This issue has a mass of 87.

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

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

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

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

                                                                                                      Refactorings

                                                                                                      Further Reading

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

                                                                                                                      if (p.charAt(1) == "e")
                                                                                                                          pos += 'right:' + (m[0] + plotOffset.right) + 'px;';
                                                                                                                      else if (p.charAt(1) == "w")
                                                                                                                          pos += 'left:' + (m[0] + plotOffset.left) + 'px;';
                                                                                                      Severity: Major
                                                                                                      Found in client/plugins/flot/jquery.flot.js and 1 other location - About 2 hrs to fix
                                                                                                      client/plugins/flot/jquery.flot.js on lines 2793..2796

                                                                                                      Duplicated Code

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

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

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

                                                                                                      Tuning

                                                                                                      This issue has a mass of 87.

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

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

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

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

                                                                                                      Refactorings

                                                                                                      Further Reading

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

                                                                                                                          if (y1 <= y2 && y1 < axisy.min && y2 >= axisy.min) {
                                                                                                                              x1 = (axisy.min - y1) / (y2 - y1) * (x2 - x1) + x1;
                                                                                                                              y1 = axisy.min;
                                                                                                                          }
                                                                                                                          else if (y2 <= y1 && y2 < axisy.min && y1 >= axisy.min) {
                                                                                                      Severity: Major
                                                                                                      Found in client/plugins/flot/jquery.flot.js and 1 other location - About 2 hrs to fix
                                                                                                      client/plugins/flot/jquery.flot.js on lines 2433..2440

                                                                                                      Duplicated Code

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

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

                                                                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both 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 (y1 >= y2 && y1 > axisy.max && y2 <= axisy.max) {
                                                                                                                              x1 = (axisy.max - y1) / (y2 - y1) * (x2 - x1) + x1;
                                                                                                                              y1 = axisy.max;
                                                                                                                          }
                                                                                                                          else if (y2 >= y1 && y2 > axisy.max && y1 <= axisy.max) {
                                                                                                      Severity: Major
                                                                                                      Found in client/plugins/flot/jquery.flot.js and 1 other location - About 2 hrs to fix
                                                                                                      client/plugins/flot/jquery.flot.js on lines 2423..2430

                                                                                                      Duplicated Code

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

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

                                                                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both 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 (axis.direction == "x") {
                                                                                                                          x = 0;
                                                                                                                          if (t == "full")
                                                                                                                              y = (axis.position == "top" ? 0 : plotHeight);
                                                                                                                          else
                                                                                                      Severity: Major
                                                                                                      Found in client/plugins/flot/jquery.flot.js and 1 other location - About 2 hrs to fix
                                                                                                      client/plugins/flot/jquery.flot.js on lines 2045..2051

                                                                                                      Duplicated Code

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

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

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

                                                                                                      Tuning

                                                                                                      This issue has a mass of 81.

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

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

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

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

                                                                                                      Refactorings

                                                                                                      Further Reading

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

                                                                                                                      else {
                                                                                                                          y = 0;
                                                                                                                          if (t == "full")
                                                                                                                              x = (axis.position == "left" ? 0 : plotWidth);
                                                                                                                          else
                                                                                                      Severity: Major
                                                                                                      Found in client/plugins/flot/jquery.flot.js and 1 other location - About 2 hrs to fix
                                                                                                      client/plugins/flot/jquery.flot.js on lines 2038..2044

                                                                                                      Duplicated Code

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

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

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

                                                                                                      Tuning

                                                                                                      This issue has a mass of 81.

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

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

                                                                                                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ 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 = 0; i < xaxes.length; ++i) {
                                                                                                                      axis = xaxes[i];
                                                                                                                      if (axis && axis.used)
                                                                                                                          res["x" + axis.n] = axis.c2p(pos.left);
                                                                                                                  }
                                                                                                      Severity: Major
                                                                                                      Found in client/plugins/flot/jquery.flot.js and 1 other location - About 2 hrs to fix
                                                                                                      client/plugins/flot/jquery.flot.js on lines 931..935

                                                                                                      Duplicated Code

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

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

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

                                                                                                      Tuning

                                                                                                      This issue has a mass of 79.

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

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

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

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

                                                                                                      Refactorings

                                                                                                      Further Reading

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

                                                                                                                  for (i = 0; i < yaxes.length; ++i) {
                                                                                                                      axis = yaxes[i];
                                                                                                                      if (axis && axis.used)
                                                                                                                          res["y" + axis.n] = axis.c2p(pos.top);
                                                                                                                  }
                                                                                                      Severity: Major
                                                                                                      Found in client/plugins/flot/jquery.flot.js and 1 other location - About 2 hrs to fix
                                                                                                      client/plugins/flot/jquery.flot.js on lines 925..929

                                                                                                      Duplicated Code

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

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

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

                                                                                                      Tuning

                                                                                                      This issue has a mass of 79.

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

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

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

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

                                                                                                      Refactorings

                                                                                                      Further Reading

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

                                                                                                                  if (axis.direction == "x") {
                                                                                                                      axis.box.left = plotOffset.left - axis.labelWidth / 2;
                                                                                                                      axis.box.width = surface.width - plotOffset.left - plotOffset.right + axis.labelWidth;
                                                                                                                  }
                                                                                                      Severity: Major
                                                                                                      Found in client/plugins/flot/jquery.flot.js and 1 other location - About 2 hrs to fix
                                                                                                      client/plugins/flot/jquery.flot.js on lines 1519..1522

                                                                                                      Duplicated Code

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

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

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

                                                                                                      Tuning

                                                                                                      This issue has a mass of 77.

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

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

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

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

                                                                                                      Refactorings

                                                                                                      Further Reading

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

                                                                                                                  else {
                                                                                                                      axis.box.top = plotOffset.top - axis.labelHeight / 2;
                                                                                                                      axis.box.height = surface.height - plotOffset.bottom - plotOffset.top + axis.labelHeight;
                                                                                                                  }
                                                                                                      Severity: Major
                                                                                                      Found in client/plugins/flot/jquery.flot.js and 1 other location - About 2 hrs to fix
                                                                                                      client/plugins/flot/jquery.flot.js on lines 1515..1518

                                                                                                      Duplicated Code

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

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

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

                                                                                                      Tuning

                                                                                                      This issue has a mass of 77.

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

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

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

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

                                                                                                      Refactorings

                                                                                                      Further Reading

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

                                                                                                                      plotLine(series.datapoints, Math.sin(angle) * (lw/2 + sw/2), Math.cos(angle) * (lw/2 + sw/2), series.xaxis, series.yaxis);
                                                                                                      Severity: Major
                                                                                                      Found in client/plugins/flot/jquery.flot.js and 1 other location - About 1 hr to fix
                                                                                                      client/plugins/flot/jquery.flot.js on lines 2478..2478

                                                                                                      Duplicated Code

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

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

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

                                                                                                      Tuning

                                                                                                      This issue has a mass of 71.

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

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

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

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

                                                                                                      Refactorings

                                                                                                      Further Reading

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

                                                                                                      (function($){$.color={};$.color.make=function(r,g,b,a){var o={};o.r=r||0;o.g=g||0;o.b=b||0;o.a=a!=null?a:1;o.add=function(c,d){for(var i=0;i<c.length;++i)o[c.charAt(i)]+=d;return o.normalize()};o.scale=function(c,f){for(var i=0;i<c.length;++i)o[c.charAt(i)]*=f;return o.normalize()};o.toString=function(){if(o.a>=1){return"rgb("+[o.r,o.g,o.b].join(",")+")"}else{return"rgba("+[o.r,o.g,o.b,o.a].join(",")+")"}};o.normalize=function(){function clamp(min,value,max){return value<min?min:value>max?max:value}o.r=clamp(0,parseInt(o.r),255);o.g=clamp(0,parseInt(o.g),255);o.b=clamp(0,parseInt(o.b),255);o.a=clamp(0,o.a,1);return o};o.clone=function(){return $.color.make(o.r,o.b,o.g,o.a)};return o.normalize()};$.color.extract=function(elem,css){var c;do{c=elem.css(css).toLowerCase();if(c!=""&&c!="transparent")break;elem=elem.parent()}while(elem.length&&!$.nodeName(elem.get(0),"body"));if(c=="rgba(0, 0, 0, 0)")c="transparent";return $.color.parse(c)};$.color.parse=function(str){var res,m=$.color.make;if(res=/rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/.exec(str))return m(parseInt(res[1],10),parseInt(res[2],10),parseInt(res[3],10));if(res=/rgba\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]+(?:\.[0-9]+)?)\s*\)/.exec(str))return m(parseInt(res[1],10),parseInt(res[2],10),parseInt(res[3],10),parseFloat(res[4]));if(res=/rgb\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*\)/.exec(str))return m(parseFloat(res[1])*2.55,parseFloat(res[2])*2.55,parseFloat(res[3])*2.55);if(res=/rgba\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\s*\)/.exec(str))return m(parseFloat(res[1])*2.55,parseFloat(res[2])*2.55,parseFloat(res[3])*2.55,parseFloat(res[4]));if(res=/#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/.exec(str))return m(parseInt(res[1],16),parseInt(res[2],16),parseInt(res[3],16));if(res=/#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])/.exec(str))return m(parseInt(res[1]+res[1],16),parseInt(res[2]+res[2],16),parseInt(res[3]+res[3],16));var name=$.trim(str).toLowerCase();if(name=="transparent")return m(255,255,255,0);else{res=lookupColors[name]||[0,0,0];return m(res[0],res[1],res[2])}};var lookupColors={aqua:[0,255,255],azure:[240,255,255],beige:[245,245,220],black:[0,0,0],blue:[0,0,255],brown:[165,42,42],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgrey:[169,169,169],darkgreen:[0,100,0],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkviolet:[148,0,211],fuchsia:[255,0,255],gold:[255,215,0],green:[0,128,0],indigo:[75,0,130],khaki:[240,230,140],lightblue:[173,216,230],lightcyan:[224,255,255],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightyellow:[255,255,224],lime:[0,255,0],magenta:[255,0,255],maroon:[128,0,0],navy:[0,0,128],olive:[128,128,0],orange:[255,165,0],pink:[255,192,203],purple:[128,0,128],violet:[128,0,128],red:[255,0,0],silver:[192,192,192],white:[255,255,255],yellow:[255,255,0]}})(jQuery);
                                                                                                      Severity: Major
                                                                                                      Found in client/plugins/flot/jquery.flot.js and 1 other location - About 1 hr to fix
                                                                                                      client/plugins/flot/jquery.flot.js on lines 32..32

                                                                                                      Duplicated Code

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

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

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

                                                                                                      Tuning

                                                                                                      This issue has a mass of 71.

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

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

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

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

                                                                                                      Refactorings

                                                                                                      Further Reading

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

                                                                                                                      plotLine(series.datapoints, Math.sin(angle) * (lw/2 + sw/4), Math.cos(angle) * (lw/2 + sw/4), series.xaxis, series.yaxis);
                                                                                                      Severity: Major
                                                                                                      Found in client/plugins/flot/jquery.flot.js and 1 other location - About 1 hr to fix
                                                                                                      client/plugins/flot/jquery.flot.js on lines 2476..2476

                                                                                                      Duplicated Code

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

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

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

                                                                                                      Tuning

                                                                                                      This issue has a mass of 71.

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

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

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

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

                                                                                                      Refactorings

                                                                                                      Further Reading

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

                                                                                                                          switch (s.bars.align) {
                                                                                                                              case "left":
                                                                                                                                  barLeft = 0;
                                                                                                                                  break;
                                                                                                                              case "right":
                                                                                                      Severity: Major
                                                                                                      Found in client/plugins/flot/jquery.flot.js and 3 other locations - About 1 hr to fix
                                                                                                      client/plugins/flot/jquery.flot.js on lines 1267..1276
                                                                                                      client/plugins/flot/jquery.flot.js on lines 2682..2691
                                                                                                      client/plugins/flot/jquery.flot.js on lines 3097..3106

                                                                                                      Duplicated Code

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

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

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

                                                                                                      Tuning

                                                                                                      This issue has a mass of 69.

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

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

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

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

                                                                                                      Refactorings

                                                                                                      Further Reading

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

                                                                                                                  switch (series.bars.align) {
                                                                                                                      case "left":
                                                                                                                          barLeft = 0;
                                                                                                                          break;
                                                                                                                      case "right":
                                                                                                      Severity: Major
                                                                                                      Found in client/plugins/flot/jquery.flot.js and 3 other locations - About 1 hr to fix
                                                                                                      client/plugins/flot/jquery.flot.js on lines 1267..1276
                                                                                                      client/plugins/flot/jquery.flot.js on lines 2682..2691
                                                                                                      client/plugins/flot/jquery.flot.js on lines 2886..2895

                                                                                                      Duplicated Code

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

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

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

                                                                                                      Tuning

                                                                                                      This issue has a mass of 69.

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

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

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

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

                                                                                                      Refactorings

                                                                                                      Further Reading

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

                                                                                                                          else if (y1 <= axisy.min && y2 <= axisy.min) {
                                                                                                                              ctx.lineTo(axisx.p2c(x1), axisy.p2c(axisy.min));
                                                                                                                              ctx.lineTo(axisx.p2c(x2), axisy.p2c(axisy.min));
                                                                                                                              continue;
                                                                                                                          }
                                                                                                      Severity: Major
                                                                                                      Found in client/plugins/flot/jquery.flot.js and 1 other location - About 1 hr to fix
                                                                                                      client/plugins/flot/jquery.flot.js on lines 2402..2411

                                                                                                      Duplicated Code

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

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

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

                                                                                                      Tuning

                                                                                                      This issue has a mass of 69.

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

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

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

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

                                                                                                      Refactorings

                                                                                                      Further Reading

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

                                                                                                                          switch (s.bars.align) {
                                                                                                                              case "left":
                                                                                                                                  delta = 0;
                                                                                                                                  break;
                                                                                                                              case "right":
                                                                                                      Severity: Major
                                                                                                      Found in client/plugins/flot/jquery.flot.js and 3 other locations - About 1 hr to fix
                                                                                                      client/plugins/flot/jquery.flot.js on lines 2682..2691
                                                                                                      client/plugins/flot/jquery.flot.js on lines 2886..2895
                                                                                                      client/plugins/flot/jquery.flot.js on lines 3097..3106

                                                                                                      Duplicated Code

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

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

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

                                                                                                      Tuning

                                                                                                      This issue has a mass of 69.

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

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

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

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

                                                                                                      Refactorings

                                                                                                      Further Reading

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

                                                                                                                  switch (series.bars.align) {
                                                                                                                      case "left":
                                                                                                                          barLeft = 0;
                                                                                                                          break;
                                                                                                                      case "right":
                                                                                                      Severity: Major
                                                                                                      Found in client/plugins/flot/jquery.flot.js and 3 other locations - About 1 hr to fix
                                                                                                      client/plugins/flot/jquery.flot.js on lines 1267..1276
                                                                                                      client/plugins/flot/jquery.flot.js on lines 2886..2895
                                                                                                      client/plugins/flot/jquery.flot.js on lines 3097..3106

                                                                                                      Duplicated Code

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

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

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

                                                                                                      Tuning

                                                                                                      This issue has a mass of 69.

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

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

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

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

                                                                                                      Refactorings

                                                                                                      Further Reading

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

                                                                                                                          if (y1 >= axisy.max && y2 >= axisy.max) {
                                                                                                                              ctx.lineTo(axisx.p2c(x1), axisy.p2c(axisy.max));
                                                                                                                              ctx.lineTo(axisx.p2c(x2), axisy.p2c(axisy.max));
                                                                                                                              continue;
                                                                                                                          }
                                                                                                      Severity: Major
                                                                                                      Found in client/plugins/flot/jquery.flot.js and 1 other location - About 1 hr to fix
                                                                                                      client/plugins/flot/jquery.flot.js on lines 2407..2411

                                                                                                      Duplicated Code

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

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

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

                                                                                                      Tuning

                                                                                                      This issue has a mass of 69.

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

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

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

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

                                                                                                      Refactorings

                                                                                                      Further Reading

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

                                                                                                                  if (options.xaxis.color == null)
                                                                                                                      options.xaxis.color = $.color.parse(options.grid.color).scale('a', 0.22).toString();
                                                                                                      Severity: Major
                                                                                                      Found in client/plugins/flot/jquery.flot.js and 1 other location - About 1 hr to fix
                                                                                                      client/plugins/flot/jquery.flot.js on lines 751..752

                                                                                                      Duplicated Code

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

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

                                                                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both 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 (options.yaxis.color == null)
                                                                                                                      options.yaxis.color = $.color.parse(options.grid.color).scale('a', 0.22).toString();
                                                                                                      Severity: Major
                                                                                                      Found in client/plugins/flot/jquery.flot.js and 1 other location - About 1 hr to fix
                                                                                                      client/plugins/flot/jquery.flot.js on lines 749..750

                                                                                                      Duplicated Code

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

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

                                                                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both 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 (axis.direction === "x") {
                                                                                                                              margins.left = Math.max(margins.left, axis.labelWidth / 2);
                                                                                                                              margins.right = Math.max(margins.right, axis.labelWidth / 2);
                                                                                                                          } else {
                                                                                                      Severity: Major
                                                                                                      Found in client/plugins/flot/jquery.flot.js and 1 other location - About 1 hr to fix
                                                                                                      client/plugins/flot/jquery.flot.js on lines 1556..1559

                                                                                                      Duplicated Code

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

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

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

                                                                                                      Tuning

                                                                                                      This issue has a mass of 67.

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

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

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

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

                                                                                                      Refactorings

                                                                                                      Further Reading

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

                                                                                                                          } else {
                                                                                                                              margins.bottom = Math.max(margins.bottom, axis.labelHeight / 2);
                                                                                                                              margins.top = Math.max(margins.top, axis.labelHeight / 2);
                                                                                                                          }
                                                                                                      Severity: Major
                                                                                                      Found in client/plugins/flot/jquery.flot.js and 1 other location - About 1 hr to fix
                                                                                                      client/plugins/flot/jquery.flot.js on lines 1553..1556

                                                                                                      Duplicated Code

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

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

                                                                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both 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 (typeof point == "number") {
                                                                                                                      var ps = s.datapoints.pointsize;
                                                                                                                      point = s.datapoints.points.slice(ps * point, ps * (point + 1));
                                                                                                                  }
                                                                                                      Severity: Major
                                                                                                      Found in client/plugins/flot/jquery.flot.js and 1 other location - About 1 hr to fix
                                                                                                      client/plugins/flot/jquery.flot.js on lines 3020..3023

                                                                                                      Duplicated Code

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

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

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

                                                                                                      Tuning

                                                                                                      This issue has a mass of 64.

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

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

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

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

                                                                                                      Refactorings

                                                                                                      Further Reading

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

                                                                                                                  if (typeof point == "number") {
                                                                                                                      var ps = s.datapoints.pointsize;
                                                                                                                      point = s.datapoints.points.slice(ps * point, ps * (point + 1));
                                                                                                                  }
                                                                                                      Severity: Major
                                                                                                      Found in client/plugins/flot/jquery.flot.js and 1 other location - About 1 hr to fix
                                                                                                      client/plugins/flot/jquery.flot.js on lines 3045..3048

                                                                                                      Duplicated Code

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

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

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

                                                                                                      Tuning

                                                                                                      This issue has a mass of 64.

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

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

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

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

                                                                                                      Refactorings

                                                                                                      Further Reading

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

                                                                                                                          if (axis.direction == "x") {
                                                                                                                              x = axis.p2c(v);
                                                                                                                              yoff = t == "full" ? -plotHeight : t;
                                                                                                      
                                                                                                                              if (axis.position == "top")
                                                                                                      Severity: Major
                                                                                                      Found in client/plugins/flot/jquery.flot.js and 1 other location - About 1 hr to fix
                                                                                                      client/plugins/flot/jquery.flot.js on lines 2100..2106

                                                                                                      Duplicated Code

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

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

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

                                                                                                      Tuning

                                                                                                      This issue has a mass of 58.

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

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

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

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

                                                                                                      Refactorings

                                                                                                      Further Reading

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

                                                                                                                          else {
                                                                                                                              y = axis.p2c(v);
                                                                                                                              xoff = t == "full" ? -plotWidth : t;
                                                                                                      
                                                                                                                              if (axis.position == "left")
                                                                                                      Severity: Major
                                                                                                      Found in client/plugins/flot/jquery.flot.js and 1 other location - About 1 hr to fix
                                                                                                      client/plugins/flot/jquery.flot.js on lines 2093..2099

                                                                                                      Duplicated Code

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

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

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

                                                                                                      Tuning

                                                                                                      This issue has a mass of 58.

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

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

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

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

                                                                                                      Refactorings

                                                                                                      Further Reading

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

                                                                                                                      highlightColor = (typeof series.highlightColor === "string") ? series.highlightColor : $.color.parse(series.color).scale('a', 0.5).toString();
                                                                                                      Severity: Major
                                                                                                      Found in client/plugins/flot/jquery.flot.js and 1 other location - About 1 hr to fix
                                                                                                      client/plugins/flot/jquery.flot.js on lines 3093..3093

                                                                                                      Duplicated Code

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

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

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

                                                                                                                  var highlightColor = (typeof series.highlightColor === "string") ? series.highlightColor : $.color.parse(series.color).scale('a', 0.5).toString(),
                                                                                                      Severity: Major
                                                                                                      Found in client/plugins/flot/jquery.flot.js and 1 other location - About 1 hr to fix
                                                                                                      client/plugins/flot/jquery.flot.js on lines 3071..3071

                                                                                                      Duplicated Code

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

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

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

                                                                                                                          $('<div style="position:absolute;width:' + div.width() + 'px;height:' + div.height() + 'px;' + pos +'background-color:' + c + ';"> </div>').prependTo(legend).css('opacity', options.legend.backgroundOpacity);
                                                                                                      Severity: Major
                                                                                                      Found in client/plugins/flot/jquery.flot.js and 1 other location - About 1 hr to fix
                                                                                                      client/plugins/flot/jquery.flot.pie.js on lines 522..523

                                                                                                      Duplicated Code

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

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

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

                                                                                                      Tuning

                                                                                                      This issue has a mass of 56.

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

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

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

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

                                                                                                      Refactorings

                                                                                                      Further Reading

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

                                                                                                                      item.pageY = parseInt(item.series.yaxis.p2c(item.datapoint[1]) + offset.top + plotOffset.top, 10);
                                                                                                      Severity: Major
                                                                                                      Found in client/plugins/flot/jquery.flot.js and 1 other location - About 1 hr to fix
                                                                                                      client/plugins/flot/jquery.flot.js on lines 2961..2961

                                                                                                      Duplicated Code

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

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

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

                                                                                                      Tuning

                                                                                                      This issue has a mass of 55.

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

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

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

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

                                                                                                      Refactorings

                                                                                                      Further Reading

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

                                                                                                                      item.pageX = parseInt(item.series.xaxis.p2c(item.datapoint[0]) + offset.left + plotOffset.left, 10);
                                                                                                      Severity: Major
                                                                                                      Found in client/plugins/flot/jquery.flot.js and 1 other location - About 1 hr to fix
                                                                                                      client/plugins/flot/jquery.flot.js on lines 2962..2962

                                                                                                      Duplicated Code

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

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

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

                                                                                                      Tuning

                                                                                                      This issue has a mass of 55.

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

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

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

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

                                                                                                      Refactorings

                                                                                                      Further Reading

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

                                                                                                                  if (options.yaxis.tickColor == null) // grid.tickColor for back-compatibility
                                                                                                                      options.yaxis.tickColor = options.grid.tickColor || options.yaxis.color;
                                                                                                      Severity: Minor
                                                                                                      Found in client/plugins/flot/jquery.flot.js and 1 other location - About 55 mins to fix
                                                                                                      client/plugins/flot/jquery.flot.js on lines 754..755

                                                                                                      Duplicated Code

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

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

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

                                                                                                                  if (options.xaxis.tickColor == null) // grid.tickColor for back-compatibility
                                                                                                                      options.xaxis.tickColor = options.grid.tickColor || options.xaxis.color;
                                                                                                      Severity: Minor
                                                                                                      Found in client/plugins/flot/jquery.flot.js and 1 other location - About 55 mins to fix
                                                                                                      client/plugins/flot/jquery.flot.js on lines 756..757

                                                                                                      Duplicated Code

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

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

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

                                                                                                                      else {
                                                                                                                          plotOffset.right += lw + axisMargin;
                                                                                                                          axis.box = { left: surface.width - plotOffset.right, width: lw };
                                                                                                                      }
                                                                                                      Severity: Minor
                                                                                                      Found in client/plugins/flot/jquery.flot.js and 1 other location - About 50 mins to fix
                                                                                                      client/plugins/flot/jquery.flot.js on lines 1483..1486

                                                                                                      Duplicated Code

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

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

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

                                                                                                      Tuning

                                                                                                      This issue has a mass of 52.

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

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

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

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

                                                                                                      Refactorings

                                                                                                      Further Reading

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

                                                                                                                      if (pos == "bottom") {
                                                                                                                          plotOffset.bottom += lh + axisMargin;
                                                                                                                          axis.box = { top: surface.height - plotOffset.bottom, height: lh };
                                                                                                                      }
                                                                                                      Severity: Minor
                                                                                                      Found in client/plugins/flot/jquery.flot.js and 1 other location - About 50 mins to fix
                                                                                                      client/plugins/flot/jquery.flot.js on lines 1499..1502

                                                                                                      Duplicated Code

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

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

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

                                                                                                      Tuning

                                                                                                      This issue has a mass of 52.

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

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

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

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

                                                                                                      Refactorings

                                                                                                      Further Reading

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

                                                                                                              if (this.height != height) {
                                                                                                                  element.height = height * pixelRatio;
                                                                                                                  element.style.height = height + "px";
                                                                                                                  this.height = height;
                                                                                                              }
                                                                                                      Severity: Minor
                                                                                                      Found in client/plugins/flot/jquery.flot.js and 1 other location - About 40 mins to fix
                                                                                                      client/plugins/flot/jquery.flot.js on lines 149..153

                                                                                                      Duplicated Code

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

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

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

                                                                                                      Tuning

                                                                                                      This issue has a mass of 49.

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

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

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

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

                                                                                                      Refactorings

                                                                                                      Further Reading

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

                                                                                                              if (this.width != width) {
                                                                                                                  element.width = width * pixelRatio;
                                                                                                                  element.style.width = width + "px";
                                                                                                                  this.width = width;
                                                                                                              }
                                                                                                      Severity: Minor
                                                                                                      Found in client/plugins/flot/jquery.flot.js and 1 other location - About 40 mins to fix
                                                                                                      client/plugins/flot/jquery.flot.js on lines 155..159

                                                                                                      Duplicated Code

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

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

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

                                                                                                      Tuning

                                                                                                      This issue has a mass of 49.

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

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

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

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

                                                                                                      Refactorings

                                                                                                      Further Reading

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

                                                                                                                      else {
                                                                                                                          axis.box = { top: plotOffset.top + axisMargin, height: lh };
                                                                                                                          plotOffset.top += lh + axisMargin;
                                                                                                                      }
                                                                                                      Severity: Minor
                                                                                                      Found in client/plugins/flot/jquery.flot.js and 1 other location - About 40 mins to fix
                                                                                                      client/plugins/flot/jquery.flot.js on lines 1495..1498

                                                                                                      Duplicated Code

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

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

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

                                                                                                      Tuning

                                                                                                      This issue has a mass of 48.

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

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

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

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

                                                                                                      Refactorings

                                                                                                      Further Reading

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

                                                                                                                      if (pos == "left") {
                                                                                                                          axis.box = { left: plotOffset.left + axisMargin, width: lw };
                                                                                                                          plotOffset.left += lw + axisMargin;
                                                                                                                      }
                                                                                                      Severity: Minor
                                                                                                      Found in client/plugins/flot/jquery.flot.js and 1 other location - About 40 mins to fix
                                                                                                      client/plugins/flot/jquery.flot.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 48.

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

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

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

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

                                                                                                      Refactorings

                                                                                                      Further Reading

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

                                                                                                                      if (top < bottom) {
                                                                                                                          tmp = top;
                                                                                                                          top = bottom;
                                                                                                                          bottom = tmp;
                                                                                                                          drawBottom = true;
                                                                                                      Severity: Minor
                                                                                                      Found in client/plugins/flot/jquery.flot.js and 1 other location - About 40 mins to fix
                                                                                                      client/plugins/flot/jquery.flot.js on lines 2574..2580

                                                                                                      Duplicated Code

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

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

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

                                                                                                      Tuning

                                                                                                      This issue has a mass of 48.

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

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

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

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

                                                                                                      Refactorings

                                                                                                      Further Reading

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

                                                                                                                      if (right < left) {
                                                                                                                          tmp = right;
                                                                                                                          right = left;
                                                                                                                          left = tmp;
                                                                                                                          drawLeft = true;
                                                                                                      Severity: Minor
                                                                                                      Found in client/plugins/flot/jquery.flot.js and 1 other location - About 40 mins to fix
                                                                                                      client/plugins/flot/jquery.flot.js on lines 2591..2597

                                                                                                      Duplicated Code

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

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

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

                                                                                                      Tuning

                                                                                                      This issue has a mass of 48.

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

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

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

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

                                                                                                      Refactorings

                                                                                                      Further Reading

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

                                                                                                                      s = axis.scale = plotHeight / Math.abs(t(axis.max) - t(axis.min));
                                                                                                      Severity: Minor
                                                                                                      Found in client/plugins/flot/jquery.flot.js and 1 other location - About 35 mins to fix
                                                                                                      client/plugins/flot/jquery.flot.js on lines 1378..1378

                                                                                                      Duplicated Code

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

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

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

                                                                                                      Tuning

                                                                                                      This issue has a mass of 47.

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

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

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

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

                                                                                                      Refactorings

                                                                                                      Further Reading

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

                                                                                                                      s = axis.scale = plotWidth / Math.abs(t(axis.max) - t(axis.min));
                                                                                                      Severity: Minor
                                                                                                      Found in client/plugins/flot/jquery.flot.js and 1 other location - About 35 mins to fix
                                                                                                      client/plugins/flot/jquery.flot.js on lines 1382..1382

                                                                                                      Duplicated Code

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

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

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

                                                                                                      Tuning

                                                                                                      This issue has a mass of 47.

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

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

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

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

                                                                                                      Refactorings

                                                                                                      Further Reading

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

                                                                                                                  if (x < axisx.min || x > axisx.max || y < axisy.min || y > axisy.max)
                                                                                                                      return;
                                                                                                      Severity: Minor
                                                                                                      Found in client/plugins/flot/jquery.flot.js and 1 other location - About 35 mins to fix
                                                                                                      client/plugins/flot/jquery.flot.js on lines 2601..2603

                                                                                                      Duplicated Code

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

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

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

                                                                                                      Tuning

                                                                                                      This issue has a mass of 46.

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

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

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

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

                                                                                                      Refactorings

                                                                                                      Further Reading

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

                                                                                                                  if (right < axisx.min || left > axisx.max ||
                                                                                                                      top < axisy.min || bottom > axisy.max)
                                                                                                                      return;
                                                                                                      Severity: Minor
                                                                                                      Found in client/plugins/flot/jquery.flot.js and 1 other location - About 35 mins to fix
                                                                                                      client/plugins/flot/jquery.flot.js on lines 3073..3074

                                                                                                      Duplicated Code

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

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

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

                                                                                                      Tuning

                                                                                                      This issue has a mass of 46.

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

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

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

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

                                                                                                      Refactorings

                                                                                                      Further Reading

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

                                                                                                                      left: parseInt(xaxes[axisNumber(point, "x") - 1].p2c(+point.x) + plotOffset.left, 10),
                                                                                                      Severity: Minor
                                                                                                      Found in client/plugins/flot/jquery.flot.js and 1 other location - About 30 mins to fix
                                                                                                      client/plugins/flot/jquery.flot.js on lines 673..673

                                                                                                      Duplicated Code

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

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

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

                                                                                                      Tuning

                                                                                                      This issue has a mass of 45.

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

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

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

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

                                                                                                      Refactorings

                                                                                                      Further Reading

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

                                                                                                                      top: parseInt(yaxes[axisNumber(point, "y") - 1].p2c(+point.y) + plotOffset.top, 10)
                                                                                                      Severity: Minor
                                                                                                      Found in client/plugins/flot/jquery.flot.js and 1 other location - About 30 mins to fix
                                                                                                      client/plugins/flot/jquery.flot.js on lines 672..672

                                                                                                      Duplicated Code

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

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

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

                                                                                                      Tuning

                                                                                                      This issue has a mass of 45.

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

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

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

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

                                                                                                      Refactorings

                                                                                                      Further Reading

                                                                                                      There are no issues that match your filters.

                                                                                                      Category
                                                                                                      Status