camdub/Internships

View on GitHub
public/javascripts/jquery.svg/jquery.svgplot.js

Summary

Maintainability
F
2 wks
Test Coverage

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

/* http://keith-wood.name/svg.html
   SVG plotting extension for jQuery v1.4.3.
   Written by Keith Wood (kbwood{at}iinet.com.au) December 2008.
   Dual licensed under the GPL (http://dev.jquery.com/browser/trunk/jquery/GPL-LICENSE.txt) and
   MIT (http://dev.jquery.com/browser/trunk/jquery/MIT-LICENSE.txt) licenses.
Severity: Major
Found in public/javascripts/jquery.svg/jquery.svgplot.js - About 1 day to fix

    Function _drawAxis has 50 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        _drawAxis: function(horiz) {
            var id = (horiz ? 'x' : 'y') + 'Axis';
            var axis = (horiz ? this.xAxis : this.yAxis);
            var axis2 = (horiz ? this.yAxis : this.xAxis);
            var dims = this._getDims();
    Severity: Minor
    Found in public/javascripts/jquery.svg/jquery.svgplot.js - About 2 hrs to fix

      Function _drawPlot has 44 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          _drawPlot: function() {
              if (!this._drawNow) {
                  return;
              }
              while (this._plotCont.firstChild) {
      Severity: Minor
      Found in public/javascripts/jquery.svg/jquery.svgplot.js - About 1 hr to fix

        Function SVGPlotFunction has 39 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        function SVGPlotFunction(plot, name, fn, range, points, stroke, strokeWidth, settings) {
            if (typeof name != 'string') {
                settings = strokeWidth;
                strokeWidth = stroke;
                stroke = points;
        Severity: Minor
        Found in public/javascripts/jquery.svg/jquery.svgplot.js - About 1 hr to fix

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

          function SVGPlotFunction(plot, name, fn, range, points, stroke, strokeWidth, settings) {
          Severity: Major
          Found in public/javascripts/jquery.svg/jquery.svgplot.js - About 1 hr to fix

            Function addFunction has 7 arguments (exceeds 4 allowed). Consider refactoring.
            Open

                addFunction: function(name, fn, range, points, stroke, strokeWidth, settings) {
            Severity: Major
            Found in public/javascripts/jquery.svg/jquery.svgplot.js - About 50 mins to fix

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

              function SVGPlotAxis(plot, title, min, max, major, minor) {
              Severity: Minor
              Found in public/javascripts/jquery.svg/jquery.svgplot.js - About 45 mins to fix

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

                $.extend(SVGPlotLegend.prototype, {
                
                    /* Set or retrieve whether the legend should be shown.
                       @param  show  (boolean) true to display it, false to hide it
                       @return  (SVGPlotLegend) this legend object or
                Severity: Major
                Found in public/javascripts/jquery.svg/jquery.svgplot.js and 1 other location - About 1 day to fix
                public/javascripts/jquery.svg/jquery.svggraph.js on lines 821..880

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

                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

                    title: function(title, offset, colour, format) {
                        if (arguments.length == 0) {
                            return {title: this._title, offset: this._titleOffset, format: this._titleFormat};
                        }
                        if (typeof offset != 'number') {
                Severity: Major
                Found in public/javascripts/jquery.svg/jquery.svgplot.js and 1 other location - About 1 day to fix
                public/javascripts/jquery.svg/jquery.svggraph.js on lines 736..756

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

                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

                    title: function(value, offset, colour, settings) {
                        if (arguments.length == 0) {
                            return this._title;
                        }
                        if (typeof offset != 'number') {
                Severity: Major
                Found in public/javascripts/jquery.svg/jquery.svgplot.js and 1 other location - About 7 hrs to fix
                public/javascripts/jquery.svg/jquery.svggraph.js on lines 240..258

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

                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._plotCont.width) {
                            this._plotCont.setAttribute('width',
                                parseInt(this._plotCont.getAttribute('width'), 10) || this._wrapper._width());
                        }
                        else if (this._plotCont.width.baseVal) {
                Severity: Major
                Found in public/javascripts/jquery.svg/jquery.svgplot.js and 1 other location - About 7 hrs to fix
                public/javascripts/jquery.svg/jquery.svggraph.js on lines 318..328

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

                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._plotCont.height) {
                            this._plotCont.setAttribute('height',
                                parseInt(this._plotCont.getAttribute('height'), 10) || this._wrapper._height());
                        }
                        else if (this._plotCont.height.baseVal) {
                Severity: Major
                Found in public/javascripts/jquery.svg/jquery.svgplot.js and 1 other location - About 7 hrs to fix
                public/javascripts/jquery.svg/jquery.svggraph.js on lines 329..339

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

                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

                    ticks: function(major, minor, size, position) {
                        if (arguments.length == 0) {
                            return this._ticks;
                        }
                        if (typeof size == 'string') {
                Severity: Major
                Found in public/javascripts/jquery.svg/jquery.svgplot.js and 1 other location - About 6 hrs to fix
                public/javascripts/jquery.svg/jquery.svggraph.js on lines 713..727

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

                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

                    gridlines: function(xSettings, ySettings) {
                        if (arguments.length == 0) {
                            return this._gridlines;
                        }
                        this._gridlines = [(typeof xSettings == 'string' ? {stroke: xSettings} : xSettings),
                Severity: Major
                Found in public/javascripts/jquery.svg/jquery.svgplot.js and 1 other location - About 5 hrs to fix
                public/javascripts/jquery.svg/jquery.svggraph.js on lines 219..230

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

                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 SVGPlotLegend(plot, bgSettings, textSettings) {
                    this._plot = plot; // The owning plot
                    this._show = true; // Show the legend?
                    this._area = [0.9, 0.1, 1.0, 0.9]; // The legend area: left, top, right, bottom,
                        // > 1 in pixels, <= 1 as proportion
                Severity: Major
                Found in public/javascripts/jquery.svg/jquery.svgplot.js and 1 other location - About 4 hrs to fix
                public/javascripts/jquery.svg/jquery.svggraph.js on lines 811..819

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

                    format: function(fill, stroke, settings) {
                        if (arguments.length == 0) {
                            return this._areaFormat;
                        }
                        if (typeof stroke == 'object') {
                Severity: Major
                Found in public/javascripts/jquery.svg/jquery.svgplot.js and 1 other location - About 4 hrs to fix
                public/javascripts/jquery.svg/jquery.svggraph.js on lines 166..178

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

                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

                        this._wrapper.line(gl, (horiz ? dims[this.X] : zero), (horiz ? zero : dims[this.Y]),
                            (horiz ? dims[this.X] + dims[this.W] : zero),
                            (horiz ? zero : dims[this.Y] + dims[this.H]));
                Severity: Major
                Found in public/javascripts/jquery.svg/jquery.svgplot.js and 2 other locations - About 3 hrs to fix
                public/javascripts/jquery.svg/jquery.svggraph.js on lines 403..404
                public/javascripts/jquery.svg/jquery.svgplot.js on lines 324..325

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

                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

                            this._wrapper.line(g, (horiz ? dims[this.X] : v), (horiz ? v : dims[this.Y]),
                                (horiz ? dims[this.X] + dims[this.W] : v), (horiz ? v : dims[this.Y] + dims[this.H]));
                Severity: Major
                Found in public/javascripts/jquery.svg/jquery.svgplot.js and 2 other locations - About 3 hrs to fix
                public/javascripts/jquery.svg/jquery.svggraph.js on lines 403..404
                public/javascripts/jquery.svg/jquery.svgplot.js on lines 343..345

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

                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._wrapper.line(gl, (horiz ? xy : zero + len * offsets[0]),
                                    (horiz ? zero + len * offsets[0] : xy),
                                    (horiz ? xy : zero + len * offsets[1]),
                                    (horiz ? zero + len * offsets[1] : xy));
                Severity: Major
                Found in public/javascripts/jquery.svg/jquery.svgplot.js and 1 other location - About 2 hrs to fix
                public/javascripts/jquery.svg/jquery.svggraph.js on lines 480..483

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

                    scale: function(min, max) {
                        if (arguments.length == 0) {
                            return this._scale;
                        }
                        this._scale.min = min;
                Severity: Major
                Found in public/javascripts/jquery.svg/jquery.svgplot.js and 1 other location - About 2 hrs to fix
                public/javascripts/jquery.svg/jquery.svggraph.js on lines 695..703

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

                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

                    area: function(left, top, right, bottom) {
                        if (arguments.length == 0) {
                            return this._area;
                        }
                        this._area = (isArray(left) ? left : [left, top, right, bottom]);
                Severity: Major
                Found in public/javascripts/jquery.svg/jquery.svgplot.js and 1 other location - About 2 hrs to fix
                public/javascripts/jquery.svg/jquery.svggraph.js on lines 201..208

                Duplicated Code

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

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

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

                Tuning

                This issue has a mass of 77.

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

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

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

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

                Refactorings

                Further Reading

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

                    _drawTitle: function() {
                        this._wrapper.text(this._plotCont, this._getValue(this._plotCont, 'width') / 2,
                            this._title.offset, this._title.value, this._title.settings);
                    },
                Severity: Major
                Found in public/javascripts/jquery.svg/jquery.svgplot.js and 1 other location - About 2 hrs to fix
                public/javascripts/jquery.svg/jquery.svggraph.js on lines 353..356

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

                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._wrapper.text(g, xBase + (horiz ? i * offset : 0) + this.legend._sampleSize + 5,
                                yBase + (horiz ? 0 : i * offset), fn._name, this.legend._textSettings);
                Severity: Major
                Found in public/javascripts/jquery.svg/jquery.svgplot.js and 1 other location - About 2 hrs to fix
                public/javascripts/jquery.svg/jquery.svggraph.js on lines 546..547

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

                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 minor = (!axis._ticks.minor ? axis._scale.max + 1 :
                                Math.floor(axis._scale.min / axis._ticks.minor) * axis._ticks.minor);
                Severity: Major
                Found in public/javascripts/jquery.svg/jquery.svgplot.js and 1 other location - About 2 hrs to fix
                public/javascripts/jquery.svg/jquery.svggraph.js on lines 470..471

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

                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

                    _getValue: function(node, name) {
                        return (!node[name] ? parseInt(node.getAttribute(name), 10) :
                            (node[name].baseVal ? node[name].baseVal.value : node[name]));
                    },
                Severity: Major
                Found in public/javascripts/jquery.svg/jquery.svgplot.js and 1 other location - About 1 hr to fix
                public/javascripts/jquery.svg/jquery.svggraph.js on lines 347..350

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

                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

                        this._wrapper.rect(g, dims[this.X], dims[this.Y], dims[this.W], dims[this.H],
                            this.legend._bgSettings);
                Severity: Major
                Found in public/javascripts/jquery.svg/jquery.svgplot.js and 1 other location - About 1 hr to fix
                public/javascripts/jquery.svg/jquery.svggraph.js on lines 533..534

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

                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._gridlines[0] && this.yAxis._ticks.major && !noYGrid) {
                            this._drawGridlines(bg, true, this._gridlines[0], dims);
                        }
                Severity: Major
                Found in public/javascripts/jquery.svg/jquery.svgplot.js and 1 other location - About 1 hr to fix
                public/javascripts/jquery.svg/jquery.svgplot.js on lines 305..307

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

                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._gridlines[1] && this.xAxis._ticks.major && !noXGrid) {
                            this._drawGridlines(bg, false, this._gridlines[1], dims);
                        }
                Severity: Major
                Found in public/javascripts/jquery.svg/jquery.svgplot.js and 1 other location - About 1 hr to fix
                public/javascripts/jquery.svg/jquery.svgplot.js on lines 302..304

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

                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 p = this._wrapper.path(this._plot, path,
                            $.extend({class_: 'fn' + cur, fill: 'none', stroke: fn._stroke,
                            strokeWidth: fn._strokeWidth}, fn._settings || {}));
                Severity: Major
                Found in public/javascripts/jquery.svg/jquery.svgplot.js and 1 other location - About 1 hr to fix
                public/javascripts/jquery.svg/jquery.svggraph.js on lines 1362..1364

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

                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 gt = this._wrapper.group(this._plot, $.extend({class_: id + 'Labels',
                            textAnchor: (horiz ? 'middle' : 'end')}, axis._labelFormat));
                Severity: Major
                Found in public/javascripts/jquery.svg/jquery.svgplot.js and 1 other location - About 1 hr to fix
                public/javascripts/jquery.svg/jquery.svggraph.js on lines 460..461

                Duplicated Code

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

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

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

                Tuning

                This issue has a mass of 58.

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

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

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

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

                Refactorings

                Further Reading

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

                        this._wrapper.rect(bg, dims[this.X], dims[this.Y], dims[this.W], dims[this.H], this._areaFormat);
                Severity: Major
                Found in public/javascripts/jquery.svg/jquery.svgplot.js and 1 other location - About 1 hr to fix
                public/javascripts/jquery.svg/jquery.svggraph.js on lines 379..379

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

                    equalXY: function(value) {
                        if (arguments.length == 0) {
                            return this._equalXY;
                        }
                        this._equalXY = value;
                Severity: Major
                Found in public/javascripts/jquery.svg/jquery.svgplot.js and 2 other locations - About 40 mins to fix
                public/javascripts/jquery.svg/jquery.svggraph.js on lines 89..95
                public/javascripts/jquery.svg/jquery.svgplot.js on lines 53..59

                Duplicated Code

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

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

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

                Tuning

                This issue has a mass of 49.

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

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

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

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

                Refactorings

                Further Reading

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

                        var height = (area[this.B] > 1 ? area[this.B] : availHeight * area[this.B]) - top;
                Severity: Major
                Found in public/javascripts/jquery.svg/jquery.svgplot.js and 3 other locations - About 40 mins to fix
                public/javascripts/jquery.svg/jquery.svggraph.js on lines 367..367
                public/javascripts/jquery.svg/jquery.svggraph.js on lines 368..368
                public/javascripts/jquery.svg/jquery.svgplot.js on lines 275..275

                Duplicated Code

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

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

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

                Tuning

                This issue has a mass of 49.

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

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

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

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

                Refactorings

                Further Reading

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

                        var width = (area[this.R] > 1 ? area[this.R] : availWidth * area[this.R]) - left;
                Severity: Major
                Found in public/javascripts/jquery.svg/jquery.svgplot.js and 3 other locations - About 40 mins to fix
                public/javascripts/jquery.svg/jquery.svggraph.js on lines 367..367
                public/javascripts/jquery.svg/jquery.svggraph.js on lines 368..368
                public/javascripts/jquery.svg/jquery.svgplot.js on lines 276..276

                Duplicated Code

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

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

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

                Tuning

                This issue has a mass of 49.

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

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

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

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

                Refactorings

                Further Reading

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

                    container: function(cont) {
                        if (arguments.length == 0) {
                            return this._plotCont;
                        }
                        this._plotCont = cont;
                Severity: Major
                Found in public/javascripts/jquery.svg/jquery.svgplot.js and 2 other locations - About 40 mins to fix
                public/javascripts/jquery.svg/jquery.svggraph.js on lines 89..95
                public/javascripts/jquery.svg/jquery.svgplot.js on lines 124..130

                Duplicated Code

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

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

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

                Tuning

                This issue has a mass of 49.

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

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

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

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

                Refactorings

                Further Reading

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

                        var yBase = dims[this.Y] + ((horiz ? dims[this.H] : offset) + this.legend._sampleSize) / 2;
                Severity: Minor
                Found in public/javascripts/jquery.svg/jquery.svgplot.js and 1 other location - About 40 mins to fix
                public/javascripts/jquery.svg/jquery.svggraph.js on lines 539..539

                Duplicated Code

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

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

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

                Tuning

                This issue has a mass of 49.

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

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

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

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

                Refactorings

                Further Reading

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

                        var major = Math.floor(axis._scale.min / axis._ticks.major) * axis._ticks.major;
                Severity: Major
                Found in public/javascripts/jquery.svg/jquery.svgplot.js and 3 other locations - About 35 mins to fix
                public/javascripts/jquery.svg/jquery.svggraph.js on lines 398..398
                public/javascripts/jquery.svg/jquery.svggraph.js on lines 468..468
                public/javascripts/jquery.svg/jquery.svgplot.js on lines 348..348

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

                            var major = Math.floor(axis._scale.min / axis._ticks.major) * axis._ticks.major;
                Severity: Major
                Found in public/javascripts/jquery.svg/jquery.svgplot.js and 3 other locations - About 35 mins to fix
                public/javascripts/jquery.svg/jquery.svggraph.js on lines 398..398
                public/javascripts/jquery.svg/jquery.svggraph.js on lines 468..468
                public/javascripts/jquery.svg/jquery.svgplot.js on lines 319..319

                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

                    functions: function(i) {
                        return (arguments.length > 0 ? this._functions[i] : null) || this._functions;
                    },
                Severity: Minor
                Found in public/javascripts/jquery.svg/jquery.svgplot.js and 1 other location - About 35 mins to fix
                public/javascripts/jquery.svg/jquery.svggraph.js on lines 279..281

                Duplicated Code

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

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

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

                Tuning

                This issue has a mass of 46.

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

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

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

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

                Refactorings

                Further Reading

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

                        var top = (area[this.T] > 1 ? area[this.T] : availHeight * area[this.T]);
                Severity: Major
                Found in public/javascripts/jquery.svg/jquery.svgplot.js and 3 other locations - About 30 mins to fix
                public/javascripts/jquery.svg/jquery.svggraph.js on lines 365..365
                public/javascripts/jquery.svg/jquery.svggraph.js on lines 366..366
                public/javascripts/jquery.svg/jquery.svgplot.js on lines 273..273

                Duplicated Code

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

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

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

                Tuning

                This issue has a mass of 45.

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

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

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

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

                Refactorings

                Further Reading

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

                        var left = (area[this.L] > 1 ? area[this.L] : availWidth * area[this.L]);
                Severity: Major
                Found in public/javascripts/jquery.svg/jquery.svgplot.js and 3 other locations - About 30 mins to fix
                public/javascripts/jquery.svg/jquery.svggraph.js on lines 365..365
                public/javascripts/jquery.svg/jquery.svggraph.js on lines 366..366
                public/javascripts/jquery.svg/jquery.svgplot.js on lines 274..274

                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