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_scaleExtent(domain) {
    var start = domain[0], stop = domain[domain.length - 1];
    return start < stop ? [ start, stop ] : [ stop, start ];
  }
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 2531..2534

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

Function > has 26 lines of code (exceeds 25 allowed). Consider refactoring.
Open

        ">": function( checkSet, part ) {
            var elem,
                isPartStr = typeof part === "string",
                i = 0,
                l = checkSet.length;
Severity: Minor
Found in public/js/jquery.js - About 1 hr to fix

    Function d3_selection_on has 26 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

      function d3_selection_on(type, listener, capture) {
        function onRemove() {
          var wrapper = this[name];
          if (wrapper) {
            this.removeEventListener(type, wrapper, wrapper.$);
    Severity: Minor
    Found in public/js/d3.v2.js - About 1 hr to fix

      Function buildFragment has 26 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      jQuery.buildFragment = function( args, nodes, scripts ) {
          var fragment, cacheable, cacheresults, doc,
          first = args[ 0 ];
      
          // nodes may contain either an explicit document object,
      Severity: Minor
      Found in public/js/jquery.js - About 1 hr to fix

        Function cloneFixAttributes has 26 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        function cloneFixAttributes( src, dest ) {
            var nodeName;
        
            // We do not need to do anything for non-Elements
            if ( dest.nodeType !== 1 ) {
        Severity: Minor
        Found in public/js/jquery.js - About 1 hr to fix

          Function contour has 26 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

            d3.geom.contour = function(grid, start) {
              var s = start || d3_geom_contourStart(grid), c = [], x = s[0], y = s[1], dx = 0, dy = 0, pdx = NaN, pdy = NaN, i = 0;
              do {
                i = 0;
                if (grid(x - 1, y - 1)) i += 1;
          Severity: Minor
          Found in public/js/d3.v2.js - About 1 hr to fix

            Method graph has 26 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

              def graph
                sip_hash = {}
                sips = get_sip_corpus(false)
                sips.each do |word|
                  sip_hash[word] = who_has_sip(word)
            Severity: Minor
            Found in helpers.rb - About 1 hr to fix

              Function timer has 26 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                d3.timer = function(callback, delay, then) {
                  var found = false, t0, t1 = d3_timer_queue;
                  if (arguments.length < 3) {
                    if (arguments.length < 2) delay = 0; else if (!isFinite(delay)) return;
                    then = Date.now();
              Severity: Minor
              Found in public/js/d3.v2.js - About 1 hr to fix

                Function albersUsa has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                  d3.geo.albersUsa = function() {
                    function albersUsa(coordinates) {
                      var lon = coordinates[0], lat = coordinates[1];
                      return (lat > 50 ? alaska : lon < -140 ? hawaii : lat < 21 ? puertoRico : lower48)(coordinates);
                    }
                Severity: Minor
                Found in public/js/d3.v2.js - About 1 hr to fix

                  Consider simplifying this complex logical expression.
                  Open

                          if ( (!id || !cache[id] || (!isEvents && !pvt && !cache[id].data)) && getByName && data === undefined ) {
                              return;
                          }
                  Severity: Major
                  Found in public/js/jquery.js - About 1 hr to fix

                    Consider simplifying this complex logical expression.
                    Open

                                    if ( run_all || (!event.namespace && !handleObj.namespace) || event.namespace_re && event.namespace_re.test( handleObj.namespace ) ) {
                    
                                        event.data = handleObj.data;
                                        event.handleObj = handleObj;
                    
                    
                    Severity: Major
                    Found in public/js/jquery.js - About 1 hr to fix

                      Consider simplifying this complex logical expression.
                      Open

                      if ( jQuery.expr && jQuery.expr.filters ) {
                          jQuery.expr.filters.hidden = function( elem ) {
                              var width = elem.offsetWidth,
                                  height = elem.offsetHeight;
                      
                      
                      Severity: Major
                      Found in public/js/jquery.js - About 1 hr to fix

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

                            bonne.translate = function(x) {
                              if (!arguments.length) return translate;
                              translate = [ +x[0], +x[1] ];
                              return bonne;
                            };
                        Severity: Major
                        Found in public/js/d3.v2.js and 4 other locations - About 1 hr to fix
                        public/js/d3.v2.js on lines 5919..5923
                        public/js/d3.v2.js on lines 5959..5963
                        public/js/d3.v2.js on lines 6058..6062
                        public/js/d3.v2.js on lines 6080..6084

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

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

                            azimuthal.translate = function(x) {
                              if (!arguments.length) return translate;
                              translate = [ +x[0], +x[1] ];
                              return azimuthal;
                            };
                        Severity: Major
                        Found in public/js/d3.v2.js and 4 other locations - About 1 hr to fix
                        public/js/d3.v2.js on lines 5959..5963
                        public/js/d3.v2.js on lines 6036..6040
                        public/js/d3.v2.js on lines 6058..6062
                        public/js/d3.v2.js on lines 6080..6084

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

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

                            equirectangular.translate = function(x) {
                              if (!arguments.length) return translate;
                              translate = [ +x[0], +x[1] ];
                              return equirectangular;
                            };
                        Severity: Major
                        Found in public/js/d3.v2.js and 4 other locations - About 1 hr to fix
                        public/js/d3.v2.js on lines 5919..5923
                        public/js/d3.v2.js on lines 5959..5963
                        public/js/d3.v2.js on lines 6036..6040
                        public/js/d3.v2.js on lines 6080..6084

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

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

                            albers.translate = function(x) {
                              if (!arguments.length) return translate;
                              translate = [ +x[0], +x[1] ];
                              return albers;
                            };
                        Severity: Major
                        Found in public/js/d3.v2.js and 4 other locations - About 1 hr to fix
                        public/js/d3.v2.js on lines 5919..5923
                        public/js/d3.v2.js on lines 6036..6040
                        public/js/d3.v2.js on lines 6058..6062
                        public/js/d3.v2.js on lines 6080..6084

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

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

                            mercator.translate = function(x) {
                              if (!arguments.length) return translate;
                              translate = [ +x[0], +x[1] ];
                              return mercator;
                            };
                        Severity: Major
                        Found in public/js/d3.v2.js and 4 other locations - About 1 hr to fix
                        public/js/d3.v2.js on lines 5919..5923
                        public/js/d3.v2.js on lines 5959..5963
                        public/js/d3.v2.js on lines 6036..6040
                        public/js/d3.v2.js on lines 6058..6062

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

                        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

                            zoom.x = function(z) {
                              if (!arguments.length) return x1;
                              x1 = z;
                              x0 = z.copy();
                              return zoom;
                        Severity: Minor
                        Found in public/js/d3.v2.js and 1 other location - About 55 mins to fix
                        public/js/d3.v2.js on lines 4918..4923

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

                        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

                            zoom.y = function(z) {
                              if (!arguments.length) return y1;
                              y1 = z;
                              y0 = z.copy();
                              return zoom;
                        Severity: Minor
                        Found in public/js/d3.v2.js and 1 other location - About 55 mins to fix
                        public/js/d3.v2.js on lines 4912..4917

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

                        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

                          d3_time_scaleLocalMethods.year = function(extent, m) {
                            return d3_time_scaleLinear.domain(extent.map(d3_time_scaleGetYear)).ticks(m).map(d3_time_scaleSetYear);
                          };
                        Severity: Minor
                        Found in public/js/d3.v2.js and 1 other location - About 55 mins to fix
                        public/js/d3.v2.js on lines 7027..7029

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

                        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