dhgwilliam/google-voice-stats

View on GitHub

Showing 371 of 371 total issues

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

    brush.x = function(z) {
      if (!arguments.length) return x;
      x = z;
      resizes = d3_svg_brushResizes[!x << 1 | !y];
      return brush;
Severity: Major
Found in public/js/d3.v2.js and 1 other location - About 1 hr to fix
public/js/d3.v2.js on lines 4671..4676

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

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

Function partition has 35 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  d3.layout.partition = function() {
    function position(node, x, dx, dy) {
      var children = node.children;
      node.x = x;
      node.y = node.depth * dy;
Severity: Minor
Found in public/js/d3.v2.js - About 1 hr to fix

    Function pack has 35 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

      d3.layout.pack = function() {
        function pack(d, i) {
          var nodes = hierarchy.call(this, d, i), root = nodes[0];
          root.x = 0;
          root.y = 0;
    Severity: Minor
    Found in public/js/d3.v2.js - About 1 hr to fix

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

          brush.y = function(z) {
            if (!arguments.length) return y;
            y = z;
            resizes = d3_svg_brushResizes[!x << 1 | !y];
            return brush;
      Severity: Major
      Found in public/js/d3.v2.js and 1 other location - About 1 hr to fix
      public/js/d3.v2.js on lines 4665..4670

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

      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 (x1) x1.domain(x0.range().map(function(x) {
              return (x - translate[0]) / scale;
            }).map(x0.invert));
      Severity: Major
      Found in public/js/d3.v2.js and 1 other location - About 1 hr to fix
      public/js/d3.v2.js on lines 4822..4824

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

      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 (y1) y1.domain(y0.range().map(function(y) {
              return (y - translate[1]) / scale;
            }).map(y0.invert));
      Severity: Major
      Found in public/js/d3.v2.js and 1 other location - About 1 hr to fix
      public/js/d3.v2.js on lines 4819..4821

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

      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

      Function slide has 34 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

        , slide: function (type, next) {
            var $active = this.$element.find('.active')
              , $next = next || $active[type]()
              , isCycling = this.interval
              , direction = type == 'next' ? 'left' : 'right'
      Severity: Minor
      Found in public/js/bootstrap.js - About 1 hr to fix

        Function d3_rgb_parse has 34 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

          function d3_rgb_parse(format, rgb, hsl) {
            var r = 0, g = 0, b = 0, m1, m2, name;
            m1 = /([a-z]+)\((.*)\)/i.exec(format);
            if (m1) {
              m2 = m1[2].split(",");
        Severity: Minor
        Found in public/js/d3.v2.js - About 1 hr to fix

          Function attr has 34 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              attr: function( elem, name, value, pass ) {
                  var ret, hooks, notxml,
                      nType = elem.nodeType;
          
                  // don't get/set attributes on text, comment and attribute nodes
          Severity: Minor
          Found in public/js/jquery.js - About 1 hr to fix

            Function slide has 34 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

              , slide: function (type, next) {
                  var $active = this.$element.find('.active')
                    , $next = next || $active[type]()
                    , isCycling = this.interval
                    , direction = type == 'next' ? 'left' : 'right'
            Severity: Minor
            Found in public/js/bootstrap-carousel.js - About 1 hr to fix

              Function azimuthal has 34 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                d3.geo.azimuthal = function() {
                  function azimuthal(coordinates) {
                    var x1 = coordinates[0] * d3_geo_radians - x0, y1 = coordinates[1] * d3_geo_radians, cx1 = Math.cos(x1), sx1 = Math.sin(x1), cy1 = Math.cos(y1), sy1 = Math.sin(y1), cc = mode !== "orthographic" ? sy0 * sy1 + cy0 * cy1 * cx1 : null, c, k = mode === "stereographic" ? 1 / (1 + cc) : mode === "gnomonic" ? 1 / cc : mode === "equidistant" ? (c = Math.acos(cc), c ? c / Math.sin(c) : 0) : mode === "equalarea" ? Math.sqrt(2 / (1 + cc)) : 1, x = k * cy1 * sx1, y = k * (sy0 * cy1 * cx1 - cy0 * sy1);
                    return [ scale * x + translate[0], scale * y + translate[1] ];
                  }
              Severity: Minor
              Found in public/js/d3.v2.js - About 1 hr to fix

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

                        if (y) {
                          e = d3_scaleRange(y);
                          bg.attr("y", e[0]).attr("height", e[1] - e[0]);
                          redrawY(g);
                        }
                Severity: Major
                Found in public/js/d3.v2.js and 1 other location - About 1 hr to fix
                public/js/d3.v2.js on lines 4531..4535

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

                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 (x) {
                          e = d3_scaleRange(x);
                          bg.attr("x", e[0]).attr("width", e[1] - e[0]);
                          redrawX(g);
                        }
                Severity: Major
                Found in public/js/d3.v2.js and 1 other location - About 1 hr to fix
                public/js/d3.v2.js on lines 4536..4540

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

                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

                Consider simplifying this complex logical expression.
                Open

                            if ( match[1] === "nth" ) {
                                if ( !match[2] ) {
                                    Sizzle.error( match[0] );
                                }
                
                
                Severity: Critical
                Found in public/js/jquery.js - About 1 hr to fix

                  Function each has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      each: function( object, callback, args ) {
                          var name, i = 0,
                              length = object.length,
                              isObj = length === undefined || jQuery.isFunction( object );
                  
                  
                  Severity: Minor
                  Found in public/js/jquery.js - About 1 hr to fix

                    Function closest has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        closest: function( selectors, context ) {
                            var ret = [], i, l, cur = this[0];
                    
                            // Array (deprecated as of jQuery 1.7)
                            if ( jQuery.isArray( selectors ) ) {
                    Severity: Minor
                    Found in public/js/jquery.js - About 1 hr to fix

                      Function greatArc has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                        d3.geo.greatArc = function() {
                          function greatArc() {
                            var d = greatArc.distance.apply(this, arguments), t = 0, dt = precision / d, coordinates = [ p0 ];
                            while ((t += dt) < 1) coordinates.push(interpolate(t));
                            coordinates.push(p1);
                      Severity: Minor
                      Found in public/js/d3.v2.js - About 1 hr to fix

                        Function format has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                          d3.time.format = function(template) {
                            function format(date) {
                              var string = [], i = -1, j = 0, c, f;
                              while (++i < n) {
                                if (template.charCodeAt(i) == 37) {
                        Severity: Minor
                        Found in public/js/d3.v2.js - About 1 hr to fix

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

                            function d3_geo_boundsLineString(o, f) {
                              for (var a = o.coordinates, i = 0, n = a.length; i < n; i++) {
                                f.apply(null, a[i]);
                              }
                            }
                          Severity: Major
                          Found in public/js/d3.v2.js and 1 other location - About 1 hr to fix
                          public/js/d3.v2.js on lines 1933..1937

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

                          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

                              for (var a = o.coordinates, i = 0, n = a.length; i < n; i++) {
                                for (var b = a[i], j = 0, m = b.length; j < m; j++) {
                                  f.apply(null, b[j]);
                                }
                              }
                          Severity: Major
                          Found in public/js/d3.v2.js and 1 other location - About 1 hr to fix
                          public/js/d3.v2.js on lines 1927..1931

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

                          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

                          Severity
                          Category
                          Status
                          Source
                          Language