backlogs/redmine_backlogs

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

Summary

Maintainability
F
3 wks
Test Coverage

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

/**
 * jqPlot
 * Pure JavaScript plotting plugin using jQuery
 *
 * Version: 1.0.0

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

        $.jqplot.DonutRenderer.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;

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

          $.jqplot.DonutLegendRenderer.prototype.draw = function() {
              var legend = this;
              if (this.show) {
                  var series = this._series;
                  var ss = 'position:absolute;';

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

            $.jqplot.DonutRenderer.prototype.init = function(options, plot) {
                // Group: Properties
                //
                // prop: diameter
                // Outer diameter of the donut, auto computed by default

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

              $.jqplot.DonutRenderer.prototype.drawSlice = function (ctx, ang1, ang2, color, isShadow) {
                  var r = this._diameter / 2;
                  var ri = r - this._thickness;
                  var fill = this.fill;
                  // var lineWidth = this.lineWidth;

            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.donutRenderer.js - About 45 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.donutRenderer.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.donutRenderer.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.donutRenderer.js - About 35 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.donutRenderer.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.donutRenderer.js - About 35 mins to fix

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

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

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

                              $.jqplot.DonutLegendRenderer.prototype.draw = function() {
                                  var legend = this;
                                  if (this.show) {
                                      var series = this._series;
                                      var ss = 'position:absolute;';
                          assets/javascripts/jquery/jquery.jqplot/plugins/jqplot.funnelRenderer.js on lines 552..654

                          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 1040.

                          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.DonutRenderer.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.pieRenderer.js on lines 198..225

                          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.DonutRenderer.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.pieRenderer.js on lines 227..253

                          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.funnelRenderer.js on lines 835..854
                          assets/javascripts/jquery/jquery.jqplot/plugins/jqplot.pieRenderer.js on lines 795..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 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.pieRenderer.js on lines 731..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 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

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

                                  if (options.legendInfo && options.legendInfo.placement == 'insideGrid') {
                                      var li = options.legendInfo;
                                      switch (li.location) {
                                          case 'nw':
                                              offx = li.width + li.xoffset;
                          assets/javascripts/jquery/jquery.jqplot/plugins/jqplot.funnelRenderer.js on lines 309..343

                          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 279.

                          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.funnelRenderer.js on lines 189..201
                          assets/javascripts/jquery/jquery.jqplot/plugins/jqplot.pieRenderer.js on lines 172..184

                          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.pieRenderer.js on lines 466..481

                          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.donutRenderer.highlightedSeriesIndex && ins[1] == plot.series[ins[0]]._highlightedPoint)) {
                                          var evt = jQuery.Event('jqplotDataHighlight');
                          assets/javascripts/jquery/jquery.jqplot/plugins/jqplot.funnelRenderer.js on lines 856..871
                          assets/javascripts/jquery/jquery.jqplot/plugins/jqplot.pieRenderer.js on lines 816..831

                          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.donutRenderer.highlightedSeriesIndex;
                                      if (idx != null && plot.series[idx].highlightMouseDown) {
                          assets/javascripts/jquery/jquery.jqplot/plugins/jqplot.funnelRenderer.js on lines 891..904
                          assets/javascripts/jquery/jquery.jqplot/plugins/jqplot.pieRenderer.js on lines 851..864

                          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.DonutAxisRenderer.prototype.init = function(options){
                                  //
                                  this.tickRenderer = $.jqplot.DonutTickRenderer;
                                  $.extend(true, this, options);
                                  // I don't think I'm going to need _dataBounds here.
                          assets/javascripts/jquery/jquery.jqplot/plugins/jqplot.meterGaugeRenderer.js on lines 837..853
                          assets/javascripts/jquery/jquery.jqplot/plugins/jqplot.pieRenderer.js on lines 515..531

                          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.donutRenderer.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.funnelRenderer.js on lines 825..833
                          assets/javascripts/jquery/jquery.jqplot/plugins/jqplot.pieRenderer.js on lines 785..793

                          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

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

                                  if (isShadow) {
                                      for (var i=0; i<this.shadowDepth; i++) {
                                          ctx.save();
                                          ctx.translate(this.shadowOffset*Math.cos(this.shadowAngle/180*Math.PI), this.shadowOffset*Math.sin(this.shadowAngle/180*Math.PI));
                                          doDraw();
                          assets/javascripts/jquery/jquery.jqplot/plugins/jqplot.funnelRenderer.js on lines 260..270

                          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 123.

                          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.funnelRenderer.js on lines 880..889
                          assets/javascripts/jquery/jquery.jqplot/plugins/jqplot.pieRenderer.js on lines 840..849

                          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.donutRenderer.highlightCanvas.createElement(this._gridPadding, 'jqplot-donutRenderer-highlight-canvas', this._plotDimensions, this));
                                  }
                                  // else put highlight canvas before event canvas.
                                  else {
                          assets/javascripts/jquery/jquery.jqplot/plugins/jqplot.funnelRenderer.js on lines 921..927
                          assets/javascripts/jquery/jquery.jqplot/plugins/jqplot.pieRenderer.js on lines 881..887

                          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

                          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.funnelRenderer.js on lines 809..814
                          assets/javascripts/jquery/jquery.jqplot/plugins/jqplot.pieRenderer.js on lines 769..774

                          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.DonutLegendRenderer.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.pieRenderer.js on lines 548..558

                          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.donutRenderer.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.funnelRenderer.js on lines 873..878
                          assets/javascripts/jquery/jquery.jqplot/plugins/jqplot.pieRenderer.js on lines 833..838

                          Duplicated Code

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

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

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

                          Tuning

                          This issue has a mass of 66.

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

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

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

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

                          Refactorings

                          Further Reading

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

                                  this._center = [(cw - trans * offx)/2 + trans * offx, (ch - trans*offy)/2 + trans * offy];
                          assets/javascripts/jquery/jquery.jqplot/plugins/jqplot.meterGaugeRenderer.js on lines 822..822

                          Duplicated Code

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

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

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

                          Tuning

                          This issue has a mass of 54.

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

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

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

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

                          Refactorings

                          Further Reading

                          Similar blocks of code found in 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 443..443
                          assets/javascripts/jquery/jquery.jqplot/plugins/jqplot.pieRenderer.js on lines 485..485
                          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.pieRenderer.js on lines 485..485
                          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

                          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.pieRenderer.js on lines 322..327

                          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