dhgwilliam/google-voice-stats

View on GitHub

Showing 371 of 371 total issues

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

        if ( jQuery.isFunction( value ) ) {
            return this.each(function( j ) {
                jQuery( this ).addClass( value.call(this, j, this.className) );
            });
        }
Severity: Major
Found in public/js/jquery.js and 1 other location - About 1 hr to fix
public/js/jquery.js on lines 2217..2221

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

        if ( jQuery.isFunction( value ) ) {
            return this.each(function( j ) {
                jQuery( this ).removeClass( value.call(this, j, this.className) );
            });
        }
Severity: Major
Found in public/js/jquery.js and 1 other location - About 1 hr to fix
public/js/jquery.js on lines 2181..2185

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

Function ATTR has 32 lines of code (exceeds 25 allowed). Consider refactoring.
Open

        ATTR: function( elem, match ) {
            var name = match[1],
                result = Sizzle.attr ?
                    Sizzle.attr( elem, name ) :
                    Expr.attrHandle[ name ] ?
Severity: Minor
Found in public/js/jquery.js - About 1 hr to fix

    Function d3_scale_pow has 32 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

      function d3_scale_pow(linear, exponent) {
        function scale(x) {
          return linear(powp(x));
        }
        var powp = d3_scale_powPow(exponent), powb = d3_scale_powPow(1 / exponent);
    Severity: Minor
    Found in public/js/d3.v2.js - About 1 hr to fix

      Function setOffset has 32 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          setOffset: function( elem, options, i ) {
              var position = jQuery.css( elem, "position" );
      
              // set position first, in-case top/left are set even on static elem
              if ( position === "static" ) {
      Severity: Minor
      Found in public/js/jquery.js - About 1 hr to fix

        Function rightOf has 32 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

              rightOf: function(he, p) {
                var e = he.edge, topsite = e.region.r, rightOfSite = p.x > topsite.x;
                if (rightOfSite && he.side === "l") {
                  return 1;
                }
        Severity: Minor
        Found in public/js/d3.v2.js - About 1 hr to fix

          Function cluster has 32 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

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

            Function cleanData has 31 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                cleanData: function( elems ) {
                    var data, id,
                        cache = jQuery.cache,
                        special = jQuery.event.special,
                        deleteExpando = jQuery.support.deleteExpando;
            Severity: Minor
            Found in public/js/jquery.js - About 1 hr to fix

              Function token has 31 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                    function token() {
                      if (reParse.lastIndex >= text.length) return EOF;
                      if (eol) {
                        eol = false;
                        return EOL;
              Severity: Minor
              Found in public/js/d3.v2.js - About 1 hr to fix

                Function dirCheck has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                function dirCheck( dir, cur, doneName, checkSet, nodeCheck, isXML ) {
                    for ( var i = 0, l = checkSet.length; i < l; i++ ) {
                        var elem = checkSet[i];
                
                        if ( elem ) {
                Severity: Minor
                Found in public/js/jquery.js - About 1 hr to fix

                  Function d3_scale_quantile has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                    function d3_scale_quantile(domain, range) {
                      function rescale() {
                        var k = 0, n = domain.length, q = range.length;
                        thresholds = [];
                        while (++k < q) thresholds[k - 1] = d3.quantile(domain, k / q);
                  Severity: Minor
                  Found in public/js/d3.v2.js - About 1 hr to fix

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

                          return da >= d3_svg_arcMax ? r0 ? "M0," + r1 + "A" + r1 + "," + r1 + " 0 1,1 0," + -r1 + "A" + r1 + "," + r1 + " 0 1,1 0," + r1 + "M0," + r0 + "A" + r0 + "," + r0 + " 0 1,0 0," + -r0 + "A" + r0 + "," + r0 + " 0 1,0 0," + r0 + "Z" : "M0," + r1 + "A" + r1 + "," + r1 + " 0 1,1 0," + -r1 + "A" + r1 + "," + r1 + " 0 1,1 0," + r1 + "Z" : r0 ? "M" + r1 * c0 + "," + r1 * s0 + "A" + r1 + "," + r1 + " 0 " + df + ",1 " + r1 * c1 + "," + r1 * s1 + "L" + r0 * c1 + "," + r0 * s1 + "A" + r0 + "," + r0 + " 0 " + df + ",0 " + r0 * c0 + "," + r0 * s0 + "Z" : "M" + r1 * c0 + "," + r1 * s0 + "A" + r1 + "," + r1 + " 0 " + df + ",1 " + r1 * c1 + "," + r1 * s1 + "L0,0" + "Z";
                    Severity: Major
                    Found in public/js/d3.v2.js and 2 other locations - About 1 hr to fix
                    public/js/d3.v2.js on lines 1406..1406
                    public/js/d3.v2.js on lines 4178..4178

                    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

                    Function arc has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                      d3.svg.arc = function() {
                        function arc() {
                          var r0 = innerRadius.apply(this, arguments), r1 = outerRadius.apply(this, arguments), a0 = startAngle.apply(this, arguments) + d3_svg_arcOffset, a1 = endAngle.apply(this, arguments) + d3_svg_arcOffset, da = (a1 < a0 && (da = a0, a0 = a1, a1 = da), a1 - a0), df = da < Math.PI ? "0" : "1", c0 = Math.cos(a0), s0 = Math.sin(a0), c1 = Math.cos(a1), s1 = Math.sin(a1);
                          return da >= d3_svg_arcMax ? r0 ? "M0," + r1 + "A" + r1 + "," + r1 + " 0 1,1 0," + -r1 + "A" + r1 + "," + r1 + " 0 1,1 0," + r1 + "M0," + r0 + "A" + r0 + "," + r0 + " 0 1,0 0," + -r0 + "A" + r0 + "," + r0 + " 0 1,0 0," + r0 + "Z" : "M0," + r1 + "A" + r1 + "," + r1 + " 0 1,1 0," + -r1 + "A" + r1 + "," + r1 + " 0 1,1 0," + r1 + "Z" : r0 ? "M" + r1 * c0 + "," + r1 * s0 + "A" + r1 + "," + r1 + " 0 " + df + ",1 " + r1 * c1 + "," + r1 * s1 + "L" + r0 * c1 + "," + r0 * s1 + "A" + r0 + "," + r0 + " 0 " + df + ",0 " + r0 * c0 + "," + r0 * s0 + "Z" : "M" + r1 * c0 + "," + r1 * s0 + "A" + r1 + "," + r1 + " 0 " + df + ",1 " + r1 * c1 + "," + r1 * s1 + "L0,0" + "Z";
                        }
                    Severity: Minor
                    Found in public/js/d3.v2.js - About 1 hr to fix

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

                          return "M0," + r + "A" + r + "," + r + " 0 1,1 0," + -r + "A" + r + "," + r + " 0 1,1 0," + r + "Z";
                      Severity: Major
                      Found in public/js/d3.v2.js and 2 other locations - About 1 hr to fix
                      public/js/d3.v2.js on lines 4178..4178
                      public/js/d3.v2.js on lines 4178..4178

                      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

                      Function clone has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          clone: function( elem, dataAndEvents, deepDataAndEvents ) {
                              var srcElements,
                                  destElements,
                                  i,
                                  // IE<=8 does not properly clone detached, unknown element nodes
                      Severity: Minor
                      Found in public/js/jquery.js - About 1 hr to fix

                        Function promise has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            promise: function( type, object ) {
                                if ( typeof type !== "string" ) {
                                    object = type;
                                    type = undefined;
                                }
                        Severity: Minor
                        Found in public/js/jquery.js - About 1 hr to fix

                          Function style has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                              style: function( elem, name, value, extra ) {
                                  // Don't set styles on text and comment nodes
                                  if ( !elem || elem.nodeType === 3 || elem.nodeType === 8 || !elem.style ) {
                                      return;
                                  }
                          Severity: Minor
                          Found in public/js/jquery.js - About 1 hr to fix

                            Function offset has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                jQuery.fn.offset = function( options ) {
                                    var elem = this[0], box;
                            
                                    if ( options ) {
                                        return this.each(function( i ) {
                            Severity: Minor
                            Found in public/js/jquery.js - About 1 hr to fix

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

                                  albers.parallels = function(x) {
                                    if (!arguments.length) return parallels;
                                    parallels = [ +x[0], +x[1] ];
                                    return reload();
                                  };
                              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 5944..5948

                              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

                                  albers.origin = function(x) {
                                    if (!arguments.length) return origin;
                                    origin = [ +x[0], +x[1] ];
                                    return reload();
                                  };
                              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 5949..5953

                              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

                              Severity
                              Category
                              Status
                              Source
                              Language