backlogs/redmine_backlogs

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

Summary

Maintainability
F
3 wks
Test Coverage

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

    $.jqplot.BezierAxisRenderer.prototype.init = function(options){
        $.extend(true, this, options);
        var db = this._dataBounds;
        // Go through all the series attached to this axis and find
        // the min/max bounds for this axis.

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

        $.jqplot.BezierCurveRenderer.prototype.makeGridData = function(data, plot) {
            // recalculate the grid data
            var xp = this._xaxis.series_u2p;
            var yp = this._yaxis.series_u2p;
            var gd = [];

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

          $.jqplot.BezierCurveRenderer.prototype.setGridData = function(plot) {
              // recalculate the grid data
              var xp = this._xaxis.series_u2p;
              var yp = this._yaxis.series_u2p;
              // this._plotData should be same as this.data

        Avoid deeply nested control flow statements.
        Open

                                if (d[1][j] > db.max || db.max == null) {
                                    db.max = d[1][j];
                                }

          Avoid deeply nested control flow statements.
          Open

                                  if (d[j][0] < db.min || db.min == null) {
                                      db.min = d[j][0];
                                  }

            Avoid deeply nested control flow statements.
            Open

                                    if (d[1][j] < db.min || db.min == null) {
                                        db.min = d[1][j];
                                    }

              Avoid deeply nested control flow statements.
              Open

                                      if (d[j][0] > db.max || db.max == null) {
                                          db.max = d[j][0];
                                      }

                Avoid deeply nested control flow statements.
                Open

                                        if (d[j][1] > db.max || db.max == null) {
                                            db.max = d[j][1];
                                        }

                  Avoid deeply nested control flow statements.
                  Open

                                          if (d[1][j] < db.min || db.min == null) {
                                              db.min = d[1][j];
                                          }

                    Avoid deeply nested control flow statements.
                    Open

                                            if (d[j][1] < db.min || db.min == null) {
                                                db.min = d[j][1];
                                            }

                      Avoid deeply nested control flow statements.
                      Open

                                              if (d[1][j] > db.max || db.max == null) {
                                                  db.max = d[1][j];
                                              }

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

                                else {
                                    if (idx == 0) {
                                        this.gridData = [
                                            [xp.call(this._xaxis, data[0][0]), yp.call(this._yaxis, data[0][1])], 
                                            [xp.call(this._xaxis, data[1][0]), yp.call(this._yaxis, data[1][1]), 
                        assets/javascripts/jquery/jquery.jqplot/plugins/jqplot.BezierCurveRenderer.js on lines 60..84

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

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

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

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

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

                        Refactorings

                        Further Reading

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

                                if (data.length == 2) {
                                    if (idx == 0) {
                                        this.gridData = [
                                            [xp.call(this._xaxis, data[0][0]), yp.call(this._yaxis, data[0][1])], 
                                            [xp.call(this._xaxis, data[1][0]), yp.call(this._yaxis, data[1][1]), 
                        assets/javascripts/jquery/jquery.jqplot/plugins/jqplot.BezierCurveRenderer.js on lines 85..109

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

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

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

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

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

                        Refactorings

                        Further Reading

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

                                else {
                                    if (idx == 0) {
                                        gd = [
                                            [xp.call(this._xaxis, data[0][0]), yp.call(this._yaxis, data[0][1])], 
                                            [xp.call(this._xaxis, data[1][0]), yp.call(this._yaxis, data[1][1]), 
                        assets/javascripts/jquery/jquery.jqplot/plugins/jqplot.BezierCurveRenderer.js on lines 127..151

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

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

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

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

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

                        Refactorings

                        Further Reading

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

                                if (data.length == 2) {
                                    if (idx == 0) {
                                        gd = [
                                            [xp.call(this._xaxis, data[0][0]), yp.call(this._yaxis, data[0][1])], 
                                            [xp.call(this._xaxis, data[1][0]), yp.call(this._yaxis, data[1][1]), 
                        assets/javascripts/jquery/jquery.jqplot/plugins/jqplot.BezierCurveRenderer.js on lines 152..176

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

                        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 j=0; j<d.length; j++) { 
                                            if (this.name == 'xaxis' || this.name == 'x2axis') {
                                                if (d[j][0] < db.min || db.min == null) {
                                                    db.min = d[j][0];
                                                }
                        assets/javascripts/jquery/jquery.jqplot/plugins/jqplot.categoryAxisRenderer.js on lines 89..106

                        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 2 locations. Consider refactoring.
                        Open

                                        if (this.name == 'xaxis' || this.name == 'x2axis') {
                                            if (d[0][0] < db.min || db.min == null) {
                                                db.min = d[0][0];
                                            }
                                            if (d[0][0] > db.max || db.max == null) {
                        assets/javascripts/jquery/jquery.jqplot/plugins/jqplot.BezierCurveRenderer.js on lines 267..282

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

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

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

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

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

                        Refactorings

                        Further Reading

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

                                        else {
                                            if (d[0][1] < db.min || db.min == null) {
                                                db.min = d[0][1];
                                            }
                                            if (d[0][1] > db.max || db.max == null) {
                        assets/javascripts/jquery/jquery.jqplot/plugins/jqplot.BezierCurveRenderer.js on lines 251..266

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

                        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

                                            ctx.bezierCurveTo(gd[3][0], gd[3][1], gd[3][2], gd[3][3], gd[3][4], gd[3][5]);
                        assets/javascripts/jquery/jquery.jqplot/plugins/jqplot.BezierCurveRenderer.js on lines 192..192

                        Duplicated Code

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

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

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

                        Tuning

                        This issue has a mass of 64.

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

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

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

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

                        Refactorings

                        Further Reading

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

                                        ctx.bezierCurveTo(gd[1][0], gd[1][1], gd[1][2], gd[1][3], gd[1][4], gd[1][5]);
                        assets/javascripts/jquery/jquery.jqplot/plugins/jqplot.BezierCurveRenderer.js on lines 198..198

                        Duplicated Code

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

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

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

                        Tuning

                        This issue has a mass of 64.

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

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

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

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

                        Refactorings

                        Further Reading

                        There are no issues that match your filters.

                        Category
                        Status