dhgwilliam/google-voice-stats

View on GitHub

Showing 371 of 371 total issues

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

  function d3_time_parseWeekdayAbbrev(date, string, i) {
    d3_time_dayAbbrevRe.lastIndex = 0;
    var n = d3_time_dayAbbrevRe.exec(string.substring(i));
    return n ? i += n[0].length : -1;
  }
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 2355..2359

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

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 d3_time_parseWeekday(date, string, i) {
    d3_time_dayRe.lastIndex = 0;
    var n = d3_time_dayRe.exec(string.substring(i));
    return n ? i += n[0].length : -1;
  }
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 2350..2354

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

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 extend has 40 lines of code (exceeds 25 allowed). Consider refactoring.
Open

jQuery.extend = jQuery.fn.extend = function() {
    var options, name, src, copy, copyIsArray, clone,
        target = arguments[0] || {},
        i = 1,
        length = arguments.length,
Severity: Minor
Found in public/js/jquery.js - About 1 hr to fix

    Function on has 40 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        on: function( types, selector, data, fn, /*INTERNAL*/ one ) {
            var origFn, type;
    
            // Types can be a map of types/handlers
            if ( typeof types === "object" ) {
    Severity: Minor
    Found in public/js/jquery.js - About 1 hr to fix

      Function val has 40 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          val: function( value ) {
              var hooks, ret, isFunction,
                  elem = this[0];
      
              if ( !arguments.length ) {
      Severity: Minor
      Found in public/js/jquery.js - About 1 hr to fix

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

            when: function( firstParam ) {
                var args = sliceDeferred.call( arguments, 0 ),
                    i = 0,
                    length = args.length,
                    pValues = new Array( length ),
        Severity: Minor
        Found in public/js/jquery.js - About 1 hr to fix

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

              brush.extent = function(z) {
                var x0, x1, y0, y1, t;
                if (!arguments.length) {
                  z = extentDomain || extent;
                  if (x) {
          Severity: Minor
          Found in public/js/d3.v2.js - About 1 hr to fix

            Method person_by has 38 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

              def person_by(person = nil, time_period = "month")
                messages = []
                unless person.nil?
                  Message.find(:sent_by_id => person.id).union(:sent_to_id => person.id).each {|message| messages << message}
                else
            Severity: Minor
            Found in helpers.rb - About 1 hr to fix

              Function albers has 38 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                d3.geo.albers = function() {
                  function albers(coordinates) {
                    var t = n * (d3_geo_radians * coordinates[0] - lng0), p = Math.sqrt(C - 2 * n * Math.sin(d3_geo_radians * coordinates[1])) / n;
                    return [ scale * p * Math.sin(t) + translate[0], scale * (p * Math.cos(t) - p0) + translate[1] ];
                  }
              Severity: Minor
              Found in public/js/d3.v2.js - About 1 hr to fix

                Function voronoi has 38 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                  d3.geom.voronoi = function(vertices) {
                    var polygons = vertices.map(function() {
                      return [];
                    });
                    d3_voronoi_tessellate(vertices, function(e) {
                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

                      greatArc.source = function(_) {
                        if (!arguments.length) return source;
                        source = _;
                        if (typeof source !== "function") interpolate.source(p0 = source);
                        return greatArc;
                  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 6385..6390

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

                  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

                      greatArc.target = function(_) {
                        if (!arguments.length) return target;
                        target = _;
                        if (typeof target !== "function") interpolate.target(p1 = target);
                        return greatArc;
                  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 6379..6384

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

                  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][0], 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 1949..1953

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

                  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 d3_geo_boundsPolygon(o, f) {
                      for (var a = o.coordinates[0], 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 1940..1944

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

                  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 d3_time_scaleGetYear(d) {
                      var y = d.getFullYear(), d0 = d3_time_scaleSetYear(y), d1 = d3_time_scaleSetYear(y + 1);
                      return y + (d - d0) / (d1 - d0);
                    }
                  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 2559..2562

                  Duplicated Code

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

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

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

                  Tuning

                  This issue has a mass of 64.

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

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

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

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

                  Refactorings

                  Further Reading

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

                      stack.offset = function(x) {
                        if (!arguments.length) return offset;
                        offset = typeof x === "function" ? x : d3_layout_stackOffsets.get(x) || d3_layout_stackOffsetZero;
                        return stack;
                      };
                  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 5375..5379

                  Duplicated Code

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

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

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

                  Tuning

                  This issue has a mass of 64.

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

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

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

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

                  Refactorings

                  Further Reading

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

                      stack.order = function(x) {
                        if (!arguments.length) return order;
                        order = typeof x === "function" ? x : d3_layout_stackOrders.get(x) || d3_layout_stackOrderDefault;
                        return stack;
                      };
                  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 5380..5384

                  Duplicated Code

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

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

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

                  Tuning

                  This issue has a mass of 64.

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

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

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

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

                  Refactorings

                  Further Reading

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

                    function d3_time_scaleUTCGetYear(d) {
                      var y = d.getUTCFullYear(), d0 = d3_time_scaleUTCSetYear(y), d1 = d3_time_scaleUTCSetYear(y + 1);
                      return y + (d - d0) / (d1 - d0);
                    }
                  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 2550..2553

                  Duplicated Code

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

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

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

                  Tuning

                  This issue has a mass of 64.

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

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

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

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

                  Refactorings

                  Further Reading

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

                  function getWH( elem, name, extra ) {
                  
                      // Start with offset property
                      var val = name === "width" ? elem.offsetWidth : elem.offsetHeight,
                          which = name === "width" ? cssWidth : cssHeight,
                  Severity: Minor
                  Found in public/js/jquery.js - About 1 hr to fix

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

                      function d3_time_scale(linear, methods, format) {
                        function scale(x) {
                          return linear(x);
                        }
                        scale.invert = function(x) {
                    Severity: Minor
                    Found in public/js/d3.v2.js - About 1 hr to fix
                      Severity
                      Category
                      Status
                      Source
                      Language