backlogs/redmine_backlogs

View on GitHub
assets/javascripts/jquery/jquery.jqplot/plugins/jqplot.pieRenderer.js

Summary

Maintainability
F
2 wks
Test Coverage

File jqplot.pieRenderer.js has 624 lines of code (exceeds 250 allowed). Consider refactoring.
Open

/**
 * jqPlot
 * Pure JavaScript plotting plugin using jQuery
 *
 * Version: 1.0.0
Severity: Major
Found in assets/javascripts/jquery/jquery.jqplot/plugins/jqplot.pieRenderer.js - About 1 day to fix

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

        $.jqplot.PieLegendRenderer.prototype.draw = function() {
            var legend = this;
            if (this.show) {
                var series = this._series;
    
    
    Severity: Major
    Found in assets/javascripts/jquery/jquery.jqplot/plugins/jqplot.pieRenderer.js - About 5 hrs to fix

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

          $.jqplot.PieRenderer.prototype.draw = function (ctx, gd, options, plot) {
              var i;
              var opts = (options != undefined) ? options : {};
              // offset and direction of offset due to legend placement
              var offx = 0;
      Severity: Major
      Found in assets/javascripts/jquery/jquery.jqplot/plugins/jqplot.pieRenderer.js - About 4 hrs to fix

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

            $.jqplot.PieRenderer.prototype.drawSlice = function (ctx, ang1, ang2, color, isShadow) {
                if (this._drawData) {
                    var r = this._radius;
                    var fill = this.fill;
                    var lineWidth = this.lineWidth;
        Severity: Major
        Found in assets/javascripts/jquery/jquery.jqplot/plugins/jqplot.pieRenderer.js - About 2 hrs to fix

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

              $.jqplot.PieRenderer.prototype.init = function(options, plot) {
                  // Group: Properties
                  //
                  // prop: diameter
                  // Outer diameter of the pie, auto computed by default
          Severity: Major
          Found in assets/javascripts/jquery/jquery.jqplot/plugins/jqplot.pieRenderer.js - About 2 hrs to fix

            Avoid deeply nested control flow statements.
            Open

                                    if (idx < pd.length){
                                        lt = this.labels[idx] || pd[idx][0].toString();
                                        color = colorGenerator.next();
                                        if (!reverse){
                                            if (i>0){
            Severity: Major
            Found in assets/javascripts/jquery/jquery.jqplot/plugins/jqplot.pieRenderer.js - About 45 mins to fix

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

                  function handleClick(ev, gridpos, datapos, neighbor, plot) {
              Severity: Minor
              Found in assets/javascripts/jquery/jquery.jqplot/plugins/jqplot.pieRenderer.js - About 35 mins to fix

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

                    function calcRPrime(ang1, ang2, sliceMargin, fill, lineWidth) {
                Severity: Minor
                Found in assets/javascripts/jquery/jquery.jqplot/plugins/jqplot.pieRenderer.js - About 35 mins to fix

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

                      function handleMove(ev, gridpos, datapos, neighbor, plot) {
                  Severity: Minor
                  Found in assets/javascripts/jquery/jquery.jqplot/plugins/jqplot.pieRenderer.js - About 35 mins to fix

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

                        function handleMouseDown(ev, gridpos, datapos, neighbor, plot) {
                    Severity: Minor
                    Found in assets/javascripts/jquery/jquery.jqplot/plugins/jqplot.pieRenderer.js - About 35 mins to fix

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

                          function handleRightClick(ev, gridpos, datapos, neighbor, plot) {
                      Severity: Minor
                      Found in assets/javascripts/jquery/jquery.jqplot/plugins/jqplot.pieRenderer.js - About 35 mins to fix

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

                            $.jqplot.PieRenderer.prototype.drawSlice = function (ctx, ang1, ang2, color, isShadow) {
                        Severity: Minor
                        Found in assets/javascripts/jquery/jquery.jqplot/plugins/jqplot.pieRenderer.js - About 35 mins to fix

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

                              $.jqplot.PieRenderer.prototype.handleMove = function(ev, gridpos, datapos, neighbor, plot) {
                          Severity: Minor
                          Found in assets/javascripts/jquery/jquery.jqplot/plugins/jqplot.pieRenderer.js - About 35 mins to fix

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

                                function handleMouseUp(ev, gridpos, datapos, neighbor, plot) {
                            Severity: Minor
                            Found in assets/javascripts/jquery/jquery.jqplot/plugins/jqplot.pieRenderer.js - About 35 mins to fix

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

                                  $.jqplot.PieRenderer.prototype.setGridData = function(plot) {
                                      // set gridData property.  This will hold angle in radians of each data point.
                                      var stack = [];
                                      var td = [];
                                      var sa = this.startAngle/180*Math.PI;
                              assets/javascripts/jquery/jquery.jqplot/plugins/jqplot.donutRenderer.js on lines 212..239

                              Duplicated Code

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

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

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

                              Tuning

                              This issue has a mass of 379.

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

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

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

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

                              Refactorings

                              Further Reading

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

                                  $.jqplot.PieRenderer.prototype.makeGridData = function(data, plot) {
                                      var stack = [];
                                      var td = [];
                                      var tot = 0;
                                      var sa = this.startAngle/180*Math.PI;
                              assets/javascripts/jquery/jquery.jqplot/plugins/jqplot.donutRenderer.js on lines 241..267

                              Duplicated Code

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

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

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

                              Tuning

                              This issue has a mass of 350.

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

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

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

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

                              Refactorings

                              Further Reading

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

                                  function handleMove(ev, gridpos, datapos, neighbor, plot) {
                                      if (neighbor) {
                                          var ins = [neighbor.seriesIndex, neighbor.pointIndex, neighbor.data];
                                          var evt1 = jQuery.Event('jqplotDataMouseOver');
                                          evt1.pageX = ev.pageX;
                              assets/javascripts/jquery/jquery.jqplot/plugins/jqplot.donutRenderer.js on lines 697..716
                              assets/javascripts/jquery/jquery.jqplot/plugins/jqplot.funnelRenderer.js on lines 835..854

                              Duplicated Code

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

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

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

                              Tuning

                              This issue has a mass of 293.

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

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

                              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ 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 preInit(target, data, options) {
                                      options = options || {};
                                      options.axesDefaults = options.axesDefaults || {};
                                      options.legend = options.legend || {};
                                      options.seriesDefaults = options.seriesDefaults || {};
                              assets/javascripts/jquery/jquery.jqplot/plugins/jqplot.donutRenderer.js on lines 619..643

                              Duplicated Code

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

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

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

                              Tuning

                              This issue has a mass of 291.

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

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

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

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

                              Refactorings

                              Further Reading

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

                                      if (this.highlightColors.length == 0) {
                                          for (var i=0; i<this.seriesColors.length; i++){
                                              var rgba = $.jqplot.getColorComponents(this.seriesColors[i]);
                                              var newrgb = [rgba[0], rgba[1], rgba[2]];
                                              var sum = newrgb[0] + newrgb[1] + newrgb[2];
                              assets/javascripts/jquery/jquery.jqplot/plugins/jqplot.donutRenderer.js on lines 186..198
                              assets/javascripts/jquery/jquery.jqplot/plugins/jqplot.funnelRenderer.js on lines 189..201

                              Duplicated Code

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

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

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

                              Tuning

                              This issue has a mass of 274.

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

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

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

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

                              Refactorings

                              Further Reading

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

                                              if (this.dataLabels == 'label') {
                                                  fstr = this.dataLabelFormatString || '%s';
                                                  label = $.jqplot.sprintf(fstr, gd[i][0]);
                                              }
                                              else if (this.dataLabels == 'value') {
                              assets/javascripts/jquery/jquery.jqplot/plugins/jqplot.donutRenderer.js on lines 423..438

                              Duplicated Code

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

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

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

                              Tuning

                              This issue has a mass of 247.

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

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

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

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

                              Refactorings

                              Further Reading

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

                                  function handleMouseDown(ev, gridpos, datapos, neighbor, plot) {
                                      if (neighbor) {
                                          var ins = [neighbor.seriesIndex, neighbor.pointIndex, neighbor.data];
                                          if (plot.series[ins[0]].highlightMouseDown && !(ins[0] == plot.plugins.pieRenderer.highlightedSeriesIndex && ins[1] == plot.series[ins[0]]._highlightedPoint)) {
                                              var evt = jQuery.Event('jqplotDataHighlight');
                              assets/javascripts/jquery/jquery.jqplot/plugins/jqplot.donutRenderer.js on lines 718..733
                              assets/javascripts/jquery/jquery.jqplot/plugins/jqplot.funnelRenderer.js on lines 856..871

                              Duplicated Code

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

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

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

                              Tuning

                              This issue has a mass of 232.

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

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

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

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

                              Refactorings

                              Further Reading

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

                                  function handleRightClick(ev, gridpos, datapos, neighbor, plot) {
                                      if (neighbor) {
                                          var ins = [neighbor.seriesIndex, neighbor.pointIndex, neighbor.data];
                                          var idx = plot.plugins.pieRenderer.highlightedSeriesIndex;
                                          if (idx != null && plot.series[idx].highlightMouseDown) {
                              assets/javascripts/jquery/jquery.jqplot/plugins/jqplot.donutRenderer.js on lines 753..766
                              assets/javascripts/jquery/jquery.jqplot/plugins/jqplot.funnelRenderer.js on lines 891..904

                              Duplicated Code

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

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

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

                              Tuning

                              This issue has a mass of 176.

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

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

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

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

                              Refactorings

                              Further Reading

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

                                  $.jqplot.PieAxisRenderer.prototype.init = function(options){
                                      //
                                      this.tickRenderer = $.jqplot.PieTickRenderer;
                                      $.extend(true, this, options);
                                      // I don't think I'm going to need _dataBounds here.
                              assets/javascripts/jquery/jquery.jqplot/plugins/jqplot.donutRenderer.js on lines 467..483
                              assets/javascripts/jquery/jquery.jqplot/plugins/jqplot.meterGaugeRenderer.js on lines 837..853

                              Duplicated Code

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

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

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

                              Tuning

                              This issue has a mass of 168.

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

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

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

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

                              Refactorings

                              Further Reading

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

                                  function unhighlight (plot) {
                                      var canvas = plot.plugins.pieRenderer.highlightCanvas;
                                      canvas._ctx.clearRect(0,0, canvas._ctx.canvas.width, canvas._ctx.canvas.height);
                                      for (var i=0; i<plot.series.length; i++) {
                                          plot.series[i]._highlightedPoint = null;
                              assets/javascripts/jquery/jquery.jqplot/plugins/jqplot.donutRenderer.js on lines 687..695
                              assets/javascripts/jquery/jquery.jqplot/plugins/jqplot.funnelRenderer.js on lines 825..833

                              Duplicated Code

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

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

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

                              Tuning

                              This issue has a mass of 154.

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

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

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

                                  function handleClick(ev, gridpos, datapos, neighbor, plot) {
                                      if (neighbor) {
                                          var ins = [neighbor.seriesIndex, neighbor.pointIndex, neighbor.data];
                                          var evt = jQuery.Event('jqplotDataClick');
                                      evt.which = ev.which;
                              assets/javascripts/jquery/jquery.jqplot/jquery.jqplot.js on lines 5937..5946
                              assets/javascripts/jquery/jquery.jqplot/plugins/jqplot.barRenderer.js on lines 729..738
                              assets/javascripts/jquery/jquery.jqplot/plugins/jqplot.donutRenderer.js on lines 742..751
                              assets/javascripts/jquery/jquery.jqplot/plugins/jqplot.funnelRenderer.js on lines 880..889

                              Duplicated Code

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

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

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

                              Tuning

                              This issue has a mass of 119.

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

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

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

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

                              Refactorings

                              Further Reading

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

                                      if (labels.length) {
                                          $(labels[0]).before(this.plugins.pieRenderer.highlightCanvas.createElement(this._gridPadding, 'jqplot-pieRenderer-highlight-canvas', this._plotDimensions, this));
                                      }
                                      // else put highlight canvas before event canvas.
                                      else {
                              assets/javascripts/jquery/jquery.jqplot/plugins/jqplot.donutRenderer.js on lines 783..789
                              assets/javascripts/jquery/jquery.jqplot/plugins/jqplot.funnelRenderer.js on lines 921..927

                              Duplicated Code

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

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

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

                              Tuning

                              This issue has a mass of 119.

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

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

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

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

                              Refactorings

                              Further Reading

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

                                  function postInit(target, data, options) {
                                      for (var i=0; i<this.series.length; i++) {
                                          if (this.series[i].renderer.constructor == $.jqplot.PieRenderer) {
                                              // don't allow mouseover and mousedown at same time.
                                              if (this.series[i].highlightMouseOver) {
                              assets/javascripts/jquery/jquery.jqplot/jquery.jqplot.js on lines 5836..5845
                              assets/javascripts/jquery/jquery.jqplot/plugins/jqplot.barRenderer.js on lines 631..640

                              Duplicated Code

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

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

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

                              Tuning

                              This issue has a mass of 110.

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

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

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

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

                              Refactorings

                              Further Reading

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

                                  function postParseOptions(options) {
                                      for (var i=0; i<this.series.length; i++) {
                                          this.series[i].seriesColors = this.seriesColors;
                                          this.series[i].colorGenerator = $.jqplot.colorGenerator;
                                      }
                              assets/javascripts/jquery/jquery.jqplot/plugins/jqplot.donutRenderer.js on lines 671..676
                              assets/javascripts/jquery/jquery.jqplot/plugins/jqplot.funnelRenderer.js on lines 809..814

                              Duplicated Code

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

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

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

                              Tuning

                              This issue has a mass of 92.

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

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

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

                                  $.jqplot.PieLegendRenderer.prototype.init = function(options) {
                                      // Group: Properties
                                      //
                                      // prop: numberRows
                                      // Maximum number of rows in the legend.  0 or null for unlimited.
                              assets/javascripts/jquery/jquery.jqplot/plugins/jqplot.donutRenderer.js on lines 500..510

                              Duplicated Code

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

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

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

                                  function handleMouseUp(ev, gridpos, datapos, neighbor, plot) {
                                      var idx = plot.plugins.pieRenderer.highlightedSeriesIndex;
                                      if (idx != null && plot.series[idx].highlightMouseDown) {
                                          unhighlight(plot);
                                      }
                              assets/javascripts/jquery/jquery.jqplot/jquery.jqplot.js on lines 5930..5935
                              assets/javascripts/jquery/jquery.jqplot/plugins/jqplot.barRenderer.js on lines 722..727
                              assets/javascripts/jquery/jquery.jqplot/plugins/jqplot.bubbleRenderer.js on lines 666..671
                              assets/javascripts/jquery/jquery.jqplot/plugins/jqplot.donutRenderer.js on lines 735..740
                              assets/javascripts/jquery/jquery.jqplot/plugins/jqplot.funnelRenderer.js on lines 873..878

                              Duplicated Code

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

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

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

                              Tuning

                              This issue has a mass of 66.

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

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

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

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

                              Refactorings

                              Further Reading

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

                                              var x = this._center[0] + Math.cos(avgang) * fact + this.canvas._offsets.left;
                              assets/javascripts/jquery/jquery.jqplot/plugins/jqplot.donutRenderer.js on lines 442..442
                              assets/javascripts/jquery/jquery.jqplot/plugins/jqplot.donutRenderer.js on lines 443..443
                              assets/javascripts/jquery/jquery.jqplot/plugins/jqplot.pieRenderer.js on lines 486..486

                              Duplicated Code

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

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

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

                                              var y = this._center[1] + Math.sin(avgang) * fact + this.canvas._offsets.top;
                              assets/javascripts/jquery/jquery.jqplot/plugins/jqplot.donutRenderer.js on lines 442..442
                              assets/javascripts/jquery/jquery.jqplot/plugins/jqplot.donutRenderer.js on lines 443..443
                              assets/javascripts/jquery/jquery.jqplot/plugins/jqplot.pieRenderer.js on lines 485..485

                              Duplicated Code

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

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

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

                              Tuning

                              This issue has a mass of 47.

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

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

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

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

                              Refactorings

                              Further Reading

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

                                           if (ang2 > 6.282 + this.startAngle) {
                                              ang2 = 6.282 + this.startAngle;
                                              if (ang1 > ang2) {
                                                  ang1 = 6.281 + this.startAngle;
                                              }
                              assets/javascripts/jquery/jquery.jqplot/plugins/jqplot.donutRenderer.js on lines 293..298

                              Duplicated Code

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

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

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