backlogs/redmine_backlogs

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

Summary

Maintainability
F
3 wks
Test Coverage

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

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

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

        $.jqplot.FunnelRenderer.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.FunnelLegendRenderer.prototype.draw = function() {
              var legend = this;
              if (this.show) {
                  var series = this._series;
                  var ss = 'position:absolute;';

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

            $.jqplot.FunnelRenderer.prototype.init = function(options, plot) {
                // Group: Properties
                //
                // prop: padding
                // padding between the funnel and plot edges, legend, etc.

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

              $.jqplot.FunnelRenderer.prototype.drawSection = function (ctx, vertices, color, isShadow) {
                  var fill = this.fill;
                  var lineWidth = this.lineWidth;
                  ctx.save();
                  

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

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

                            $.jqplot.FunnelLegendRenderer.prototype.draw = function() {
                                var legend = this;
                                if (this.show) {
                                    var series = this._series;
                                    var ss = 'position:absolute;';
                        assets/javascripts/jquery/jquery.jqplot/plugins/jqplot.donutRenderer.js on lines 513..615

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

                        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.donutRenderer.js on lines 338..372

                        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.donutRenderer.js on lines 186..198
                        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

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

                            function unhighlight (plot) {
                                var canvas = plot.plugins.funnelRenderer.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.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.donutRenderer.js on lines 278..288

                        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.donutRenderer.js on lines 742..751
                        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.funnelRenderer.highlightCanvas.createElement(this._gridPadding, 'jqplot-funnelRenderer-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.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.donutRenderer.js on lines 671..676
                        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 3 locations. Consider refactoring.
                        Open

                                function findright (l) {
                                    var m = (p1[1] - p3[1])/(p1[0] - p3[0]);
                                    var b = p1[1] - m*p1[0];
                                    var y = l + p1[1];
                                    
                        assets/javascripts/jquery/jquery.jqplot/jquery.jqplot.js on lines 3288..3294
                        assets/javascripts/jquery/jquery.jqplot/plugins/jqplot.funnelRenderer.js on lines 396..402

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

                        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 findleft (l) {
                                    var m = (p0[1] - p2[1])/(p0[0] - p2[0]);
                                    var b = p0[1] - m*p0[0];
                                    var y = l + p0[1];
                                    
                        assets/javascripts/jquery/jquery.jqplot/jquery.jqplot.js on lines 3288..3294
                        assets/javascripts/jquery/jquery.jqplot/plugins/jqplot.funnelRenderer.js on lines 404..410

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

                        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

                                for (var i=0; i<this.data.length; i++){
                                    sum += this.data[i][1];
                                    td.push([this.data[i][0], this.data[i][1]]);
                                }
                        assets/javascripts/jquery/jquery.jqplot/plugins/jqplot.funnelRenderer.js on lines 239..242

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

                        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

                                for (var i=0; i<this.data.length; i++){
                                    sum += this.data[i][1];
                                    td.push([this.data[i][0], this.data[i][1]]);
                                }
                        assets/javascripts/jquery/jquery.jqplot/plugins/jqplot.funnelRenderer.js on lines 219..222

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

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

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

                                for (var i=0; i<td.length; i++) {
                                    td[i][1] = td[i][1]/sum;
                                }
                        assets/javascripts/jquery/jquery.jqplot/plugins/jqplot.funnelRenderer.js on lines 245..247

                        Duplicated Code

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

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

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

                        Tuning

                        This issue has a mass of 56.

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

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

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

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

                        Refactorings

                        Further Reading

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

                                for (var i=0; i<td.length; i++) {
                                    td[i][1] = td[i][1]/sum;
                                }
                        assets/javascripts/jquery/jquery.jqplot/plugins/jqplot.funnelRenderer.js on lines 225..227

                        Duplicated Code

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

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

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

                        Tuning

                        This issue has a mass of 56.

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

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

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

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

                        Refactorings

                        Further Reading

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

                                        var y = (v[1][1] + v[2][1])/2 + this.canvas._offsets.top;
                        assets/javascripts/jquery/jquery.jqplot/plugins/jqplot.funnelRenderer.js on lines 481..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 47.

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

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

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

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

                        Refactorings

                        Further Reading

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

                                        var x = (v[0][0] + v[1][0])/2 + this.canvas._offsets.left;
                        assets/javascripts/jquery/jquery.jqplot/plugins/jqplot.funnelRenderer.js on lines 482..482

                        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

                        There are no issues that match your filters.

                        Category
                        Status