hummingbird-me/hummingbird

View on GitHub
public/2013/assets/js/fastclick.js

Summary

Maintainability
F
3 wks
Test Coverage

File fastclick.js has 382 lines of code (exceeds 250 allowed). Consider refactoring.
Open

/**
 * @preserve FastClick: polyfill to remove click delays on browsers with touch UIs.
 *
 * @version 0.6.11
 * @codingstandard ftlabs-jsv2
Severity: Minor
Found in public/2013/assets/js/fastclick.js - About 5 hrs to fix

    Function onTouchEnd has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring.
    Open

    FastClick.prototype.onTouchEnd = function(event) {
        'use strict';
        var forElement, trackingClickStart, targetTagName, scrollParent, touch, targetElement = this.targetElement;
    
        if (!this.trackingClick) {
    Severity: Minor
    Found in public/2013/assets/js/fastclick.js - About 2 hrs to fix

    Cognitive Complexity

    Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

    A method's cognitive complexity is based on a few simple rules:

    • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
    • Code is considered more complex for each "break in the linear flow of the code"
    • Code is considered more complex when "flow breaking structures are nested"

    Further reading

    Function FastClick has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring.
    Open

    function FastClick(layer) {
        'use strict';
        var oldOnClick, self = this;
    
    
    
    Severity: Minor
    Found in public/2013/assets/js/fastclick.js - About 2 hrs to fix

    Cognitive Complexity

    Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

    A method's cognitive complexity is based on a few simple rules:

    • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
    • Code is considered more complex for each "break in the linear flow of the code"
    • Code is considered more complex when "flow breaking structures are nested"

    Further reading

    Function notNeeded has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring.
    Open

    FastClick.notNeeded = function(layer) {
        'use strict';
        var metaViewport;
        var chromeVersion;
    
    
    Severity: Minor
    Found in public/2013/assets/js/fastclick.js - About 2 hrs to fix

    Cognitive Complexity

    Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

    A method's cognitive complexity is based on a few simple rules:

    • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
    • Code is considered more complex for each "break in the linear flow of the code"
    • Code is considered more complex when "flow breaking structures are nested"

    Further reading

    Function FastClick has 60 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    function FastClick(layer) {
        'use strict';
        var oldOnClick, self = this;
    
    
    
    Severity: Major
    Found in public/2013/assets/js/fastclick.js - About 2 hrs to fix

      Function onTouchEnd has 51 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      FastClick.prototype.onTouchEnd = function(event) {
          'use strict';
          var forElement, trackingClickStart, targetTagName, scrollParent, touch, targetElement = this.targetElement;
      
          if (!this.trackingClick) {
      Severity: Major
      Found in public/2013/assets/js/fastclick.js - About 2 hrs to fix

        Function onTouchStart has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
        Open

        FastClick.prototype.onTouchStart = function(event) {
            'use strict';
            var targetElement, touch, selection;
        
            // Ignore multiple touches, otherwise pinch-to-zoom is prevented if both fingers are on the FastClick element (issue #111).
        Severity: Minor
        Found in public/2013/assets/js/fastclick.js - About 1 hr to fix

        Cognitive Complexity

        Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

        A method's cognitive complexity is based on a few simple rules:

        • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
        • Code is considered more complex for each "break in the linear flow of the code"
        • Code is considered more complex when "flow breaking structures are nested"

        Further reading

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

        FastClick.prototype.onTouchStart = function(event) {
            'use strict';
            var targetElement, touch, selection;
        
            // Ignore multiple touches, otherwise pinch-to-zoom is prevented if both fingers are on the FastClick element (issue #111).
        Severity: Minor
        Found in public/2013/assets/js/fastclick.js - About 1 hr to fix

          Function updateScrollParent has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
          Open

          FastClick.prototype.updateScrollParent = function(targetElement) {
              'use strict';
              var scrollParent, parentElement;
          
              scrollParent = targetElement.fastClickScrollParent;
          Severity: Minor
          Found in public/2013/assets/js/fastclick.js - About 45 mins to fix

          Cognitive Complexity

          Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

          A method's cognitive complexity is based on a few simple rules:

          • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
          • Code is considered more complex for each "break in the linear flow of the code"
          • Code is considered more complex when "flow breaking structures are nested"

          Further reading

          Function onMouse has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
          Open

          FastClick.prototype.onMouse = function(event) {
              'use strict';
          
              // If a target element was never set (because a touch event was never fired) allow the event
              if (!this.targetElement) {
          Severity: Minor
          Found in public/2013/assets/js/fastclick.js - About 45 mins to fix

          Cognitive Complexity

          Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

          A method's cognitive complexity is based on a few simple rules:

          • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
          • Code is considered more complex for each "break in the linear flow of the code"
          • Code is considered more complex when "flow breaking structures are nested"

          Further reading

          Avoid too many return statements within this function.
          Open

                      return true;
          Severity: Major
          Found in public/2013/assets/js/fastclick.js - About 30 mins to fix

            Avoid too many return statements within this function.
            Open

                return false;
            Severity: Major
            Found in public/2013/assets/js/fastclick.js - About 30 mins to fix

              Avoid too many return statements within this function.
              Open

                  return false;
              Severity: Major
              Found in public/2013/assets/js/fastclick.js - About 30 mins to fix

                Avoid too many return statements within this function.
                Open

                        return true;
                Severity: Major
                Found in public/2013/assets/js/fastclick.js - About 30 mins to fix

                  Avoid too many return statements within this function.
                  Open

                          return false;
                  Severity: Major
                  Found in public/2013/assets/js/fastclick.js - About 30 mins to fix

                    Avoid too many return statements within this function.
                    Open

                        return true;
                    Severity: Major
                    Found in public/2013/assets/js/fastclick.js - About 30 mins to fix

                      Function needsClick has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                      Open

                      FastClick.prototype.needsClick = function(target) {
                          'use strict';
                          switch (target.nodeName.toLowerCase()) {
                      
                          // Don't send a synthetic click to disabled inputs (issue #62)
                      Severity: Minor
                      Found in public/2013/assets/js/fastclick.js - About 25 mins to fix

                      Cognitive Complexity

                      Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                      A method's cognitive complexity is based on a few simple rules:

                      • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                      • Code is considered more complex for each "break in the linear flow of the code"
                      • Code is considered more complex when "flow breaking structures are nested"

                      Further reading

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

                      function FastClick(layer) {
                          'use strict';
                          var oldOnClick, self = this;
                      
                      
                      
                      Severity: Major
                      Found in public/2013/assets/js/fastclick.js and 1 other location - About 5 days to fix
                      public/2014/assets/js/fastclick.js on lines 20..167

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

                      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

                      FastClick.prototype.onTouchEnd = function(event) {
                          'use strict';
                          var forElement, trackingClickStart, targetTagName, scrollParent, touch, targetElement = this.targetElement;
                      
                          if (!this.trackingClick) {
                      Severity: Major
                      Found in public/2013/assets/js/fastclick.js and 1 other location - About 3 days to fix
                      public/2014/assets/js/fastclick.js on lines 509..593

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

                      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

                      FastClick.prototype.onTouchStart = function(event) {
                          'use strict';
                          var targetElement, touch, selection;
                      
                          // Ignore multiple touches, otherwise pinch-to-zoom is prevented if both fingers are on the FastClick element (issue #111).
                      Severity: Major
                      Found in public/2013/assets/js/fastclick.js and 1 other location - About 1 day to fix
                      public/2014/assets/js/fastclick.js on lines 378..435

                      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

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

                      FastClick.notNeeded = function(layer) {
                          'use strict';
                          var metaViewport;
                          var chromeVersion;
                      
                      
                      Severity: Major
                      Found in public/2013/assets/js/fastclick.js and 1 other location - About 1 day to fix
                      public/2014/assets/js/fastclick.js on lines 721..762

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

                      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

                      FastClick.prototype.onMouse = function(event) {
                          'use strict';
                      
                          // If a target element was never set (because a touch event was never fired) allow the event
                          if (!this.targetElement) {
                      Severity: Major
                      Found in public/2013/assets/js/fastclick.js and 1 other location - About 7 hrs to fix
                      public/2014/assets/js/fastclick.js on lines 614..654

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

                      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

                      FastClick.prototype.destroy = function() {
                          'use strict';
                          var layer = this.layer;
                      
                          if (this.deviceIsAndroid) {
                      Severity: Major
                      Found in public/2013/assets/js/fastclick.js and 1 other location - About 7 hrs to fix
                      public/2014/assets/js/fastclick.js on lines 698..713

                      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

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

                      FastClick.prototype.sendClick = function(targetElement, event) {
                          'use strict';
                          var clickEvent, touch;
                      
                          // On some Android devices activeElement needs to be blurred otherwise the synthetic click will have no effect (#24)
                      Severity: Major
                      Found in public/2013/assets/js/fastclick.js and 1 other location - About 7 hrs to fix
                      public/2014/assets/js/fastclick.js on lines 276..292

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

                      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

                      FastClick.prototype.updateScrollParent = function(targetElement) {
                          'use strict';
                          var scrollParent, parentElement;
                      
                          scrollParent = targetElement.fastClickScrollParent;
                      Severity: Major
                      Found in public/2013/assets/js/fastclick.js and 1 other location - About 6 hrs to fix
                      public/2014/assets/js/fastclick.js on lines 328..353

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

                      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

                      FastClick.prototype.onClick = function(event) {
                          'use strict';
                          var permitted;
                      
                          // It's possible for another FastClick-like library delivered with third-party code to fire a click event before FastClick does (issue #44). In that case, set the click-tracking flag back to false and return early. This will cause onTouchEnd to return early.
                      Severity: Major
                      Found in public/2013/assets/js/fastclick.js and 1 other location - About 5 hrs to fix
                      public/2014/assets/js/fastclick.js on lines 665..690

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

                      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

                      FastClick.prototype.needsFocus = function(target) {
                          'use strict';
                          switch (target.nodeName.toLowerCase()) {
                          case 'textarea':
                              return true;
                      Severity: Major
                      Found in public/2013/assets/js/fastclick.js and 1 other location - About 5 hrs to fix
                      public/2014/assets/js/fastclick.js on lines 244..267

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

                      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

                      FastClick.prototype.needsClick = function(target) {
                          'use strict';
                          switch (target.nodeName.toLowerCase()) {
                      
                          // Don't send a synthetic click to disabled inputs (issue #62)
                      Severity: Major
                      Found in public/2013/assets/js/fastclick.js and 1 other location - About 5 hrs to fix
                      public/2014/assets/js/fastclick.js on lines 208..235

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

                      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

                      FastClick.prototype.focus = function(targetElement) {
                          'use strict';
                          var length;
                      
                          // Issue #160: on iOS 7, some input elements (e.g. date datetime) throw a vague TypeError on setSelectionRange. These elements don't have an integer value for the selectionStart and selectionEnd properties, but unfortunately that can't be used for detection because accessing the properties also throws a TypeError. Just check the type instead. Filed as Apple bug #15122724.
                      Severity: Major
                      Found in public/2013/assets/js/fastclick.js and 1 other location - About 4 hrs to fix
                      public/2014/assets/js/fastclick.js on lines 309..320

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

                      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

                      FastClick.prototype.touchHasMoved = function(event) {
                          'use strict';
                          var touch = event.changedTouches[0], boundary = this.touchBoundary;
                      
                          if (Math.abs(touch.pageX - this.touchStartX) > boundary || Math.abs(touch.pageY - this.touchStartY) > boundary) {
                      Severity: Major
                      Found in public/2013/assets/js/fastclick.js and 1 other location - About 3 hrs to fix
                      public/2014/assets/js/fastclick.js on lines 444..453

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

                      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

                      FastClick.prototype.onTouchMove = function(event) {
                          'use strict';
                          if (!this.trackingClick) {
                              return true;
                          }
                      Severity: Major
                      Found in public/2013/assets/js/fastclick.js and 1 other location - About 3 hrs to fix
                      public/2014/assets/js/fastclick.js on lines 462..475

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

                      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

                      if (typeof define !== 'undefined' && define.amd) {
                      
                          // AMD. Register as an anonymous module.
                          define(function() {
                              'use strict';
                      Severity: Major
                      Found in public/2013/assets/js/fastclick.js and 1 other location - About 3 hrs to fix
                      public/2014/assets/js/fastclick.js on lines 776..788

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

                      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

                      FastClick.prototype.findControl = function(labelElement) {
                          'use strict';
                      
                          // Fast path for newer browsers supporting the HTML5 control attribute
                          if (labelElement.control !== undefined) {
                      Severity: Major
                      Found in public/2013/assets/js/fastclick.js and 1 other location - About 3 hrs to fix
                      public/2014/assets/js/fastclick.js on lines 484..500

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

                      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

                      FastClick.prototype.determineEventType = function(targetElement) {
                          'use strict';
                      
                          //Issue #159: Android Chrome Select Box does not open with a synthetic click event
                          if (this.deviceIsAndroid && targetElement.tagName.toLowerCase() === 'select') {
                      Severity: Major
                      Found in public/2013/assets/js/fastclick.js and 1 other location - About 1 hr to fix
                      public/2014/assets/js/fastclick.js on lines 294..303

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

                      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

                      FastClick.prototype.getTargetElementFromEventTarget = function(eventTarget) {
                          'use strict';
                      
                          // On some older browsers (notably Safari on iOS 4.1 - see issue #56) the event target may be a text node.
                          if (eventTarget.nodeType === Node.TEXT_NODE) {
                      Severity: Major
                      Found in public/2013/assets/js/fastclick.js and 1 other location - About 1 hr to fix
                      public/2014/assets/js/fastclick.js on lines 360..369

                      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

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

                      FastClick.prototype.onTouchCancel = function() {
                          'use strict';
                          this.trackingClick = false;
                          this.targetElement = null;
                      };
                      Severity: Minor
                      Found in public/2013/assets/js/fastclick.js and 1 other location - About 30 mins to fix
                      public/2014/assets/js/fastclick.js on lines 601..605

                      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