sahat/satellizer

View on GitHub
examples/ionic/www/lib/ionic/js/ionic.js

Summary

Maintainability
F
1 mo
Test Coverage

File ionic.js has 4854 lines of code (exceeds 250 allowed). Consider refactoring.
Open

/*!
 * Copyright 2014 Drifty Co.
 * http://drifty.com/
 *
 * Ionic, v1.0.0
Severity: Major
Found in examples/ionic/www/lib/ionic/js/ionic.js - About 2 wks to fix

    Function initialize has 364 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

      initialize: function (options) {
        var slider = this;
    
        // utilities
        var noop = function() {}; // simple no operation function
    Severity: Major
    Found in examples/ionic/www/lib/ionic/js/ionic.js - About 1 day to fix

      Function __initEventHandlers has 190 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

        __initEventHandlers: function() {
          var self = this;
      
          // Event Handler
          var container = self.__container;
      Severity: Major
      Found in examples/ionic/www/lib/ionic/js/ionic.js - About 7 hrs to fix

        Function doTouchMove has 113 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

          doTouchMove: function(touches, timeStamp, scale) {
            if (timeStamp instanceof Date) {
              timeStamp = timeStamp.valueOf();
            }
            if (typeof timeStamp !== "number") {
        Severity: Major
        Found in examples/ionic/www/lib/ionic/js/ionic.js - About 4 hrs to fix

          Function initialize has 97 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

            initialize: function(options) {
              var self = this;
          
              self.__container = options.el;
              self.__content = options.el.firstElementChild;
          Severity: Major
          Found in examples/ionic/www/lib/ionic/js/ionic.js - About 3 hrs to fix

            Function doTouchEnd has 65 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

              doTouchEnd: function(e, timeStamp) {
                if (timeStamp instanceof Date) {
                  timeStamp = timeStamp.valueOf();
                }
                if (typeof timeStamp !== "number") {
            Severity: Major
            Found in examples/ionic/www/lib/ionic/js/ionic.js - About 2 hrs to fix

              Function dragGesture has 65 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  handler: function dragGesture(ev, inst) {
                    if (ev.srcEvent.type == 'touchstart' || ev.srcEvent.type == 'touchend') {
                      this.preventedFirstMove = false;
              
                    } else if (!this.preventedFirstMove && ev.srcEvent.type == 'touchmove') {
              Severity: Major
              Found in examples/ionic/www/lib/ionic/js/ionic.js - About 2 hrs to fix

                Function __stepThroughDeceleration has 62 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                  __stepThroughDeceleration: function(render) {
                    var self = this;
                
                
                    //
                Severity: Major
                Found in examples/ionic/www/lib/ionic/js/ionic.js - About 2 hrs to fix

                  Function DelegateService has 62 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                    ionic.DelegateService = function(methodNames) {
                  
                      if (methodNames.indexOf('$getByHandle') > -1) {
                        throw new Error("Method '$getByHandle' is implicitly added to each delegate service. Do not list it as a method.");
                      }
                  Severity: Major
                  Found in examples/ionic/www/lib/ionic/js/ionic.js - About 2 hrs to fix

                    Function __repositionScrollbars has 57 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                      __repositionScrollbars: function() {
                        var self = this,
                            heightScale, widthScale,
                            widthDiff, heightDiff,
                            x, y,
                    Severity: Major
                    Found in examples/ionic/www/lib/ionic/js/ionic.js - About 2 hrs to fix

                      Function getRenderFn has 56 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                        getRenderFn: function() {
                          var self = this;
                      
                          var content = self.__content;
                      
                      
                      Severity: Major
                      Found in examples/ionic/www/lib/ionic/js/ionic.js - About 2 hrs to fix

                        Function end has 54 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                              end: function() {
                        
                                // measure duration
                                var duration = +new Date() - start.time;
                        
                        
                        Severity: Major
                        Found in examples/ionic/www/lib/ionic/js/ionic.js - About 2 hrs to fix

                          Function __publish has 52 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                            __publish: function(left, top, zoom, animate, wasResize) {
                          
                              var self = this;
                          
                              // Remember whether we had an animation, then we try to continue based on the current "drive" of the animation
                          Severity: Major
                          Found in examples/ionic/www/lib/ionic/js/ionic.js - About 2 hrs to fix

                            Function onTouch has 50 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                onTouch: function onTouch(element, eventType, handler) {
                                  var self = this;
                            
                                  this.bindDom(element, ionic.Gestures.EVENT_TYPES[eventType], function bindDomOnTouch(ev) {
                                    var sourceEventType = ev.type.toLowerCase();
                            Severity: Minor
                            Found in examples/ionic/www/lib/ionic/js/ionic.js - About 2 hrs to fix

                              Function start has 48 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                  start: function(stepCallback, verifyCallback, completedCallback, duration, easingMethod, root) {
                              
                                    var start = time();
                                    var lastFrame = start;
                                    var percent = 0;
                              Severity: Minor
                              Found in examples/ionic/www/lib/ionic/js/ionic.js - About 1 hr to fix

                                Function bindDomOnTouch has 47 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                      this.bindDom(element, ionic.Gestures.EVENT_TYPES[eventType], function bindDomOnTouch(ev) {
                                        var sourceEventType = ev.type.toLowerCase();
                                
                                        // onmouseup, but when touchend has been fired we do nothing.
                                        // this is for touchdevices which also fire a mouseup on touchend
                                Severity: Minor
                                Found in examples/ionic/www/lib/ionic/js/ionic.js - About 1 hr to fix

                                  Function __startDeceleration has 46 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                    __startDeceleration: function() {
                                      var self = this;
                                  
                                      if (self.options.paging) {
                                  
                                  
                                  Severity: Minor
                                  Found in examples/ionic/www/lib/ionic/js/ionic.js - About 1 hr to fix

                                    Function doTouchStart has 44 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                      doTouchStart: function(touches, timeStamp) {
                                        var self = this;
                                    
                                        // remember if the deceleration was just stopped
                                        self.__decStopped = !!(self.__isDecelerating || self.__isAnimating);
                                    Severity: Minor
                                    Found in examples/ionic/www/lib/ionic/js/ionic.js - About 1 hr to fix

                                      Function viewportUpdate has 43 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                      function viewportUpdate() {
                                        // unit tests in viewport.unit.js
                                      
                                        var initWidth = viewportProperties.width;
                                        var initHeight = viewportProperties.height;
                                      Severity: Minor
                                      Found in examples/ionic/www/lib/ionic/js/ionic.js - About 1 hr to fix

                                        Function transformGesture has 43 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                            handler: function transformGesture(ev, inst) {
                                              // current gesture isnt drag, but dragged is true
                                              // this means an other gesture is busy. now call dragend
                                              if(ionic.Gestures.detection.current.name != this.name && this.triggered) {
                                                inst.trigger(this.name + 'end', ev);
                                        Severity: Minor
                                        Found in examples/ionic/www/lib/ionic/js/ionic.js - About 1 hr to fix

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

                                              requestAnimationFrame: (function() {
                                          
                                                // Check for request animation Frame support
                                                var requestFrame = global.requestAnimationFrame || global.webkitRequestAnimationFrame || global.mozRequestAnimationFrame || global.oRequestAnimationFrame;
                                                var isNative = !!requestFrame;
                                          Severity: Minor
                                          Found in examples/ionic/www/lib/ionic/js/ionic.js - About 1 hr to fix

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

                                                _startDrag: function(e) {
                                                  var self = this;
                                            
                                                  self._isDragging = false;
                                            
                                            
                                            Severity: Minor
                                            Found in examples/ionic/www/lib/ionic/js/ionic.js - About 1 hr to fix

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

                                                scrollTo: function(left, top, animate, zoom, wasResize) {
                                                  var self = this;
                                              
                                                  // Stop deceleration
                                                  if (self.__isDecelerating) {
                                              Severity: Minor
                                              Found in examples/ionic/www/lib/ionic/js/ionic.js - About 1 hr to fix

                                                Function __cleanup has 37 lines of code (exceeds 25 allowed). Consider refactoring.
                                                Open

                                                  __cleanup: function() {
                                                    var self = this;
                                                    var container = self.__container;
                                                
                                                    container.removeEventListener('touchstart', self.touchStart);
                                                Severity: Minor
                                                Found in examples/ionic/www/lib/ionic/js/ionic.js - About 1 hr to fix

                                                  Function scrollTo has 37 lines of code (exceeds 25 allowed). Consider refactoring.
                                                  Open

                                                      scrollTo: function(left, top, animate) {
                                                        var self = this;
                                                        if (!animate) {
                                                          self.el.scrollTop = top;
                                                          self.el.scrollLeft = left;
                                                  Severity: Minor
                                                  Found in examples/ionic/www/lib/ionic/js/ionic.js - About 1 hr to fix

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

                                                        self.scrollChildIntoView = function(e) {
                                                          //console.log("scrollChildIntoView at: " + Date.now());
                                                    
                                                          // D
                                                          var scrollBottomOffsetToTop = container.getBoundingClientRect().bottom;
                                                    Severity: Minor
                                                    Found in examples/ionic/www/lib/ionic/js/ionic.js - About 1 hr to fix

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

                                                            touchmove: function(event) {
                                                      
                                                              // ensure swiping with one touch and not pinching
                                                              // ensure sliding is enabled
                                                              if (event.touches.length > 1 ||
                                                      Severity: Minor
                                                      Found in examples/ionic/www/lib/ionic/js/ionic.js - About 1 hr to fix

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

                                                          ReorderDrag.prototype.drag = ionic.animationFrameThrottle(function(e) {
                                                            // We really aren't dragging
                                                            var self = this;
                                                            if (!this._currentDrag) {
                                                              return;
                                                        Severity: Minor
                                                        Found in examples/ionic/www/lib/ionic/js/ionic.js - About 1 hr to fix

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

                                                            SlideDrag.prototype.end = function(e, doneCallback) {
                                                              var self = this;
                                                          
                                                              // There is no drag, just end immediately
                                                              if (!self._currentDrag) {
                                                          Severity: Minor
                                                          Found in examples/ionic/www/lib/ionic/js/ionic.js - About 1 hr to fix

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

                                                                _checkPlatforms: function() {
                                                                  self.platforms = [];
                                                                  var grade = 'a';
                                                            
                                                                  if (self.isWebView()) {
                                                            Severity: Minor
                                                            Found in examples/ionic/www/lib/ionic/js/ionic.js - About 1 hr to fix

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

                                                                  initialize: function(options) {
                                                                    var self = this;
                                                                    self.__container = self.el = options.el;
                                                                    self.__content = options.el.firstElementChild;
                                                                    self.isNative = true;
                                                              Severity: Minor
                                                              Found in examples/ionic/www/lib/ionic/js/ionic.js - About 1 hr to fix

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

                                                                    start: function(e) {
                                                                      var hitX = ionic.tap.pointerCoord(e).x;
                                                                      if (hitX > 0 && hitX < 30) {
                                                                        return;
                                                                      }
                                                                Severity: Minor
                                                                Found in examples/ionic/www/lib/ionic/js/ionic.js - About 1 hr to fix

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

                                                                    register: function(ele) {
                                                                      tapDoc = ele;
                                                                  
                                                                      tapEventListener('click', true, true);
                                                                      tapEventListener('mouseup');
                                                                  Severity: Minor
                                                                  Found in examples/ionic/www/lib/ionic/js/ionic.js - About 1 hr to fix

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

                                                                      __resizeScrollbars: function() {
                                                                        var self = this;
                                                                    
                                                                        // Update horiz bar
                                                                        if (self.__indicatorX) {
                                                                    Severity: Minor
                                                                    Found in examples/ionic/www/lib/ionic/js/ionic.js - About 1 hr to fix

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

                                                                          function setup() {
                                                                      
                                                                            // do not setup if the container has no width
                                                                            if (!container.offsetWidth) {
                                                                              return;
                                                                      Severity: Minor
                                                                      Found in examples/ionic/www/lib/ionic/js/ionic.js - About 1 hr to fix

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

                                                                        function keyboardFocusIn(e) {
                                                                          clearTimeout(keyboardFocusOutTimer);
                                                                          //console.log("keyboardFocusIn from: " + e.type + " at: " + Date.now());
                                                                        
                                                                          if (!e.target ||
                                                                        Severity: Minor
                                                                        Found in examples/ionic/www/lib/ionic/js/ionic.js - About 1 hr to fix

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

                                                                            zoomTo: function(level, animate, originLeft, originTop) {
                                                                              var self = this;
                                                                          
                                                                              if (!self.options.zooming) {
                                                                                throw new Error("Zooming is not enabled!");
                                                                          Severity: Minor
                                                                          Found in examples/ionic/www/lib/ionic/js/ionic.js - About 1 hr to fix

                                                                            Function step has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                            Open

                                                                                  var step = function(virtual) {
                                                                            
                                                                                    // Normalize virtual value
                                                                                    var render = virtual !== true;
                                                                            
                                                                            
                                                                            Severity: Minor
                                                                            Found in examples/ionic/www/lib/ionic/js/ionic.js - About 1 hr to fix

                                                                              Function keyboardWaitForResize has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                              Open

                                                                              function keyboardWaitForResize(callback, isOpening) {
                                                                                clearInterval(waitForResizeTimer);
                                                                                var count = 0;
                                                                                var maxCount;
                                                                                var initialHeight = getViewportHeight();
                                                                              Severity: Minor
                                                                              Found in examples/ionic/www/lib/ionic/js/ionic.js - About 1 hr to fix

                                                                                Function start has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                Open

                                                                                  SlideDrag.prototype.start = function(e) {
                                                                                    var content, buttons, offsetX, buttonsWidth;
                                                                                
                                                                                    if (!this.canSwipe()) {
                                                                                      return;
                                                                                Severity: Minor
                                                                                Found in examples/ionic/www/lib/ionic/js/ionic.js - About 1 hr to fix

                                                                                  Function animateScroll has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                  Open

                                                                                        function animateScroll(Y, X) {
                                                                                          // scroll animation loop w/ easing
                                                                                          // credit https://gist.github.com/dezinezync/5487119
                                                                                          var start = Date.now(),
                                                                                            duration = 1000, //milliseconds
                                                                                  Severity: Minor
                                                                                  Found in examples/ionic/www/lib/ionic/js/ionic.js - About 1 hr to fix

                                                                                    Function get has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                    Open

                                                                                          get: function() {
                                                                                            var self = this;
                                                                                            function update(fn) {
                                                                                              return function() {
                                                                                                var x, classes = self.className.split(/\s+/);
                                                                                    Severity: Minor
                                                                                    Found in examples/ionic/www/lib/ionic/js/ionic.js - About 1 hr to fix

                                                                                      Function instanceMethodCaller has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                      Open

                                                                                            function instanceMethodCaller(methodName) {
                                                                                              return function caller() {
                                                                                                var handle = this.handle;
                                                                                                var args = arguments;
                                                                                                var foundInstancesCount = 0;
                                                                                      Severity: Minor
                                                                                      Found in examples/ionic/www/lib/ionic/js/ionic.js - About 1 hr to fix

                                                                                        Function initialize has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                        Open

                                                                                            initialize: function(opts) {
                                                                                              var self = this;
                                                                                        
                                                                                              opts = ionic.extend({
                                                                                                onReorder: function() {},
                                                                                        Severity: Minor
                                                                                        Found in examples/ionic/www/lib/ionic/js/ionic.js - About 1 hr to fix

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

                                                                                              self.touchMove = function(e) {
                                                                                                if (self.options.freeze || !self.__isDown ||
                                                                                                  (!self.__isDown && e.defaultPrevented) ||
                                                                                                  (e.target.tagName === 'TEXTAREA' && e.target.parentElement.querySelector(':focus')) ) {
                                                                                                  return;
                                                                                          Severity: Minor
                                                                                          Found in examples/ionic/www/lib/ionic/js/ionic.js - About 1 hr to fix

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

                                                                                                collectEventData: function collectEventData(element, eventType, touches, ev) {
                                                                                            
                                                                                                  // find out pointerType
                                                                                                  var pointerType = ionic.Gestures.POINTER_TOUCH;
                                                                                                  if(ev.type.match(/mouse/) || ionic.Gestures.PointerEvent.matchType(ionic.Gestures.POINTER_MOUSE, ev)) {
                                                                                            Severity: Minor
                                                                                            Found in examples/ionic/www/lib/ionic/js/ionic.js - About 1 hr to fix

                                                                                              Avoid deeply nested control flow statements.
                                                                                              Open

                                                                                                      if (initHeight) viewportProperties.height = '0';
                                                                                              Severity: Major
                                                                                              Found in examples/ionic/www/lib/ionic/js/ionic.js - About 45 mins to fix

                                                                                                Avoid deeply nested control flow statements.
                                                                                                Open

                                                                                                        if (initHeight) viewportProperties.height = '0';
                                                                                                Severity: Major
                                                                                                Found in examples/ionic/www/lib/ionic/js/ionic.js - About 45 mins to fix

                                                                                                  Function rectContains has 6 arguments (exceeds 4 allowed). Consider refactoring.
                                                                                                  Open

                                                                                                      rectContains: function(x, y, x1, y1, x2, y2) {
                                                                                                  Severity: Minor
                                                                                                  Found in examples/ionic/www/lib/ionic/js/ionic.js - About 45 mins to fix

                                                                                                    Avoid deeply nested control flow statements.
                                                                                                    Open

                                                                                                                if (!self.__enableScrollX && self.__refreshHeight != null) {
                                                                                                    
                                                                                                                  // hide the refresher when it's behind the header bar in case of header transparency
                                                                                                                  if (scrollTop < 0) {
                                                                                                                    self.__refreshHidden = false;
                                                                                                    Severity: Major
                                                                                                    Found in examples/ionic/www/lib/ionic/js/ionic.js - About 45 mins to fix

                                                                                                      Avoid deeply nested control flow statements.
                                                                                                      Open

                                                                                                                  if (!self.__refreshActive) {
                                                                                                                    self.__startDeceleration(timeStamp);
                                                                                                                  }
                                                                                                      Severity: Major
                                                                                                      Found in examples/ionic/www/lib/ionic/js/ionic.js - About 45 mins to fix

                                                                                                        Function start has 6 arguments (exceeds 4 allowed). Consider refactoring.
                                                                                                        Open

                                                                                                            start: function(stepCallback, verifyCallback, completedCallback, duration, easingMethod, root) {
                                                                                                        Severity: Minor
                                                                                                        Found in examples/ionic/www/lib/ionic/js/ionic.js - About 45 mins to fix

                                                                                                          Avoid deeply nested control flow statements.
                                                                                                          Open

                                                                                                                    } else if (scrollTop > maxScrollTop) {
                                                                                                          
                                                                                                                      scrollTop = maxScrollTop;
                                                                                                          
                                                                                                                    } else {
                                                                                                          Severity: Major
                                                                                                          Found in examples/ionic/www/lib/ionic/js/ionic.js - About 45 mins to fix

                                                                                                            Avoid deeply nested control flow statements.
                                                                                                            Open

                                                                                                                  } else if (version == 7) {
                                                                                                                    //iPhone == 7.0 WebView
                                                                                                                    viewportProperties.height = DEVICE_HEIGHT;
                                                                                                                  }
                                                                                                            Severity: Major
                                                                                                            Found in examples/ionic/www/lib/ionic/js/ionic.js - About 45 mins to fix

                                                                                                              Consider simplifying this complex logical expression.
                                                                                                              Open

                                                                                                                    if (!self.options.freeze && scrollParent === self.__container) {
                                                                                                              
                                                                                                                      self.hintResize();
                                                                                                                      self.scrollBy(
                                                                                                                        (e.wheelDeltaX || e.deltaX || 0) / self.options.wheelDampen,
                                                                                                              Severity: Major
                                                                                                              Found in examples/ionic/www/lib/ionic/js/ionic.js - About 40 mins to fix

                                                                                                                Consider simplifying this complex logical expression.
                                                                                                                Open

                                                                                                                  if (!("classList" in document.documentElement) && Object.defineProperty && typeof HTMLElement !== 'undefined') {
                                                                                                                    Object.defineProperty(HTMLElement.prototype, 'classList', {
                                                                                                                      get: function() {
                                                                                                                        var self = this;
                                                                                                                        function update(fn) {
                                                                                                                Severity: Major
                                                                                                                Found in examples/ionic/www/lib/ionic/js/ionic.js - About 40 mins to fix

                                                                                                                  Consider simplifying this complex logical expression.
                                                                                                                  Open

                                                                                                                      if (self.__isDragging) {
                                                                                                                          self.__decStopped = false;
                                                                                                                  
                                                                                                                        // Compute move distance
                                                                                                                        var moveX = currentTouchLeft - self.__lastTouchLeft;
                                                                                                                  Severity: Major
                                                                                                                  Found in examples/ionic/www/lib/ionic/js/ionic.js - About 40 mins to fix

                                                                                                                    Consider simplifying this complex logical expression.
                                                                                                                    Open

                                                                                                                          if (self.options.freeze || !self.__isDown ||
                                                                                                                            (!self.__isDown && e.defaultPrevented) ||
                                                                                                                            (e.target.tagName === 'TEXTAREA' && e.target.parentElement.querySelector(':focus')) ) {
                                                                                                                            return;
                                                                                                                          }
                                                                                                                    Severity: Major
                                                                                                                    Found in examples/ionic/www/lib/ionic/js/ionic.js - About 40 mins to fix

                                                                                                                      Function setDimensions has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                                                                                                      Open

                                                                                                                        setDimensions: function(clientWidth, clientHeight, contentWidth, contentHeight, continueScrolling) {
                                                                                                                      Severity: Minor
                                                                                                                      Found in examples/ionic/www/lib/ionic/js/ionic.js - About 35 mins to fix

                                                                                                                        Function scrollTo has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                                                                                                        Open

                                                                                                                          scrollTo: function(left, top, animate, zoom, wasResize) {
                                                                                                                        Severity: Minor
                                                                                                                        Found in examples/ionic/www/lib/ionic/js/ionic.js - About 35 mins to fix

                                                                                                                          Function __publish has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                                                                                                          Open

                                                                                                                            __publish: function(left, top, zoom, animate, wasResize) {
                                                                                                                          Severity: Minor
                                                                                                                          Found in examples/ionic/www/lib/ionic/js/ionic.js - About 35 mins to fix

                                                                                                                            Avoid too many return statements within this function.
                                                                                                                            Open

                                                                                                                                return 260;
                                                                                                                            Severity: Major
                                                                                                                            Found in examples/ionic/www/lib/ionic/js/ionic.js - About 30 mins to fix

                                                                                                                              Avoid too many return statements within this function.
                                                                                                                              Open

                                                                                                                                return 275;
                                                                                                                              Severity: Major
                                                                                                                              Found in examples/ionic/www/lib/ionic/js/ionic.js - About 30 mins to fix

                                                                                                                                Avoid too many return statements within this function.
                                                                                                                                Open

                                                                                                                                      return 206;
                                                                                                                                Severity: Major
                                                                                                                                Found in examples/ionic/www/lib/ionic/js/ionic.js - About 30 mins to fix

                                                                                                                                  Avoid too many return statements within this function.
                                                                                                                                  Open

                                                                                                                                        return 216;
                                                                                                                                  Severity: Major
                                                                                                                                  Found in examples/ionic/www/lib/ionic/js/ionic.js - About 30 mins to fix

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

                                                                                                                                        } else if (window.navigator.pointerEnabled) {
                                                                                                                                          // Pointer Events
                                                                                                                                          container.addEventListener("pointerdown", self.touchStart, false);
                                                                                                                                          if(self.options.preventDefault) container.addEventListener("pointermove", self.touchMoveBubble, false);
                                                                                                                                          document.addEventListener("pointermove", self.touchMove, false);
                                                                                                                                    Severity: Major
                                                                                                                                    Found in examples/ionic/www/lib/ionic/js/ionic.js and 1 other location - About 4 hrs to fix
                                                                                                                                    examples/ionic/www/lib/ionic/js/ionic.js on lines 5270..5327

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

                                                                                                                                    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

                                                                                                                                        } else if (window.navigator.msPointerEnabled) {
                                                                                                                                          // IE10, WP8 (Pointer Events)
                                                                                                                                          container.addEventListener("MSPointerDown", self.touchStart, false);
                                                                                                                                          if(self.options.preventDefault) container.addEventListener("MSPointerMove", self.touchMoveBubble, false);
                                                                                                                                          document.addEventListener("MSPointerMove", self.touchMove, false);
                                                                                                                                    Severity: Major
                                                                                                                                    Found in examples/ionic/www/lib/ionic/js/ionic.js and 1 other location - About 4 hrs to fix
                                                                                                                                    examples/ionic/www/lib/ionic/js/ionic.js on lines 5261..5327

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

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

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

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

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

                                                                                                                                    Refactorings

                                                                                                                                    Further Reading

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

                                                                                                                                        if (self.options.scrollingX) {
                                                                                                                                          indicatorX = {
                                                                                                                                            el: self.__createScrollbar('h'),
                                                                                                                                            sizeRatio: 1
                                                                                                                                          };
                                                                                                                                    Severity: Major
                                                                                                                                    Found in examples/ionic/www/lib/ionic/js/ionic.js and 1 other location - About 3 hrs to fix
                                                                                                                                    examples/ionic/www/lib/ionic/js/ionic.js on lines 5414..5425

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

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

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

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

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

                                                                                                                                    Refactorings

                                                                                                                                    Further Reading

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

                                                                                                                                        if (self.options.scrollingY) {
                                                                                                                                          indicatorY = {
                                                                                                                                            el: self.__createScrollbar('v'),
                                                                                                                                            sizeRatio: 1
                                                                                                                                          };
                                                                                                                                    Severity: Major
                                                                                                                                    Found in examples/ionic/www/lib/ionic/js/ionic.js and 1 other location - About 3 hrs to fix
                                                                                                                                    examples/ionic/www/lib/ionic/js/ionic.js on lines 5401..5412

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

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

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

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

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

                                                                                                                                    Refactorings

                                                                                                                                    Further Reading

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

                                                                                                                                          if (scrollOutsideX !== 0) {
                                                                                                                                            var isHeadingOutwardsX = scrollOutsideX * self.__decelerationVelocityX <= self.__minDecelerationScrollLeft;
                                                                                                                                            if (isHeadingOutwardsX) {
                                                                                                                                              self.__decelerationVelocityX += scrollOutsideX * penetrationDeceleration;
                                                                                                                                            }
                                                                                                                                    Severity: Major
                                                                                                                                    Found in examples/ionic/www/lib/ionic/js/ionic.js and 1 other location - About 3 hrs to fix
                                                                                                                                    examples/ionic/www/lib/ionic/js/ionic.js on lines 6804..6814

                                                                                                                                    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

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

                                                                                                                                          if (scrollOutsideY !== 0) {
                                                                                                                                            var isHeadingOutwardsY = scrollOutsideY * self.__decelerationVelocityY <= self.__minDecelerationScrollTop;
                                                                                                                                            if (isHeadingOutwardsY) {
                                                                                                                                              self.__decelerationVelocityY += scrollOutsideY * penetrationDeceleration;
                                                                                                                                            }
                                                                                                                                    Severity: Major
                                                                                                                                    Found in examples/ionic/www/lib/ionic/js/ionic.js and 1 other location - About 3 hrs to fix
                                                                                                                                    examples/ionic/www/lib/ionic/js/ionic.js on lines 6792..6802

                                                                                                                                    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

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

                                                                                                                                        if (!self.options.scrollingX) {
                                                                                                                                    
                                                                                                                                          left = self.__scrollLeft;
                                                                                                                                    
                                                                                                                                        } else {
                                                                                                                                    Severity: Major
                                                                                                                                    Found in examples/ionic/www/lib/ionic/js/ionic.js and 1 other location - About 3 hrs to fix
                                                                                                                                    examples/ionic/www/lib/ionic/js/ionic.js on lines 5999..6011

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

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

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

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

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

                                                                                                                                    Refactorings

                                                                                                                                    Further Reading

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

                                                                                                                                        if (!self.options.scrollingY) {
                                                                                                                                    
                                                                                                                                          top = self.__scrollTop;
                                                                                                                                    
                                                                                                                                        } else {
                                                                                                                                    Severity: Major
                                                                                                                                    Found in examples/ionic/www/lib/ionic/js/ionic.js and 1 other location - About 3 hrs to fix
                                                                                                                                    examples/ionic/www/lib/ionic/js/ionic.js on lines 5985..5997

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

                                                                                                                                    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

                                                                                                                                        resize: function(continueScrolling) {
                                                                                                                                          var self = this;
                                                                                                                                          if (!self.__container || !self.options) return;
                                                                                                                                    
                                                                                                                                          // Update Scroller dimensions for changed content
                                                                                                                                    Severity: Major
                                                                                                                                    Found in examples/ionic/www/lib/ionic/js/ionic.js and 1 other location - About 3 hrs to fix
                                                                                                                                    examples/ionic/www/lib/ionic/js/ionic.js on lines 5604..5617

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

                                                                                                                                    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

                                                                                                                                      resize: function(continueScrolling) {
                                                                                                                                        var self = this;
                                                                                                                                        if (!self.__container || !self.options) return;
                                                                                                                                    
                                                                                                                                        // Update Scroller dimensions for changed content
                                                                                                                                    Severity: Major
                                                                                                                                    Found in examples/ionic/www/lib/ionic/js/ionic.js and 1 other location - About 3 hrs to fix
                                                                                                                                    examples/ionic/www/lib/ionic/js/ionic.js on lines 6924..6937

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

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

                                                                                                                                        getScale: function getScale(start, end) {
                                                                                                                                          // need two fingers...
                                                                                                                                          if(start.length >= 2 && end.length >= 2) {
                                                                                                                                            return this.getDistance(end[0], end[1]) /
                                                                                                                                              this.getDistance(start[0], start[1]);
                                                                                                                                    Severity: Major
                                                                                                                                    Found in examples/ionic/www/lib/ionic/js/ionic.js and 2 other locations - About 2 hrs to fix
                                                                                                                                    examples/ionic/www/lib/ionic/js/ionic.js on lines 1282..1289
                                                                                                                                    examples/ionic/www/lib/ionic/js/ionic.js on lines 6839..6846

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

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

                                                                                                                                        getRotation: function getRotation(start, end) {
                                                                                                                                          // need two fingers
                                                                                                                                          if(start.length >= 2 && end.length >= 2) {
                                                                                                                                            return this.getAngle(end[1], end[0]) -
                                                                                                                                              this.getAngle(start[1], start[0]);
                                                                                                                                    Severity: Major
                                                                                                                                    Found in examples/ionic/www/lib/ionic/js/ionic.js and 2 other locations - About 2 hrs to fix
                                                                                                                                    examples/ionic/www/lib/ionic/js/ionic.js on lines 1266..1273
                                                                                                                                    examples/ionic/www/lib/ionic/js/ionic.js on lines 6839..6846

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

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

                                                                                                                                      __getScale: function getScale(start, end) {
                                                                                                                                        // need two fingers...
                                                                                                                                        if (start.length >= 2 && end.length >= 2) {
                                                                                                                                          return this.__getDistance(end[0], end[1]) /
                                                                                                                                            this.__getDistance(start[0], start[1]);
                                                                                                                                    Severity: Major
                                                                                                                                    Found in examples/ionic/www/lib/ionic/js/ionic.js and 2 other locations - About 2 hrs to fix
                                                                                                                                    examples/ionic/www/lib/ionic/js/ionic.js on lines 1266..1273
                                                                                                                                    examples/ionic/www/lib/ionic/js/ionic.js on lines 1282..1289

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

                                                                                                                                    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

                                                                                                                                        off: function offEvent(gesture, handler){
                                                                                                                                          var gestures = gesture.split(' ');
                                                                                                                                          for(var t = 0; t < gestures.length; t++) {
                                                                                                                                            this.element.removeEventListener(gestures[t], handler, false);
                                                                                                                                          }
                                                                                                                                    Severity: Major
                                                                                                                                    Found in examples/ionic/www/lib/ionic/js/ionic.js and 1 other location - About 2 hrs to fix
                                                                                                                                    examples/ionic/www/lib/ionic/js/ionic.js on lines 761..767

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

                                                                                                                                    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

                                                                                                                                        on: function onEvent(gesture, handler){
                                                                                                                                          var gestures = gesture.split(' ');
                                                                                                                                          for(var t = 0; t < gestures.length; t++) {
                                                                                                                                            this.element.addEventListener(gestures[t], handler, false);
                                                                                                                                          }
                                                                                                                                    Severity: Major
                                                                                                                                    Found in examples/ionic/www/lib/ionic/js/ionic.js and 1 other location - About 2 hrs to fix
                                                                                                                                    examples/ionic/www/lib/ionic/js/ionic.js on lines 776..782

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

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

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

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

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

                                                                                                                                    Refactorings

                                                                                                                                    Further Reading

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

                                                                                                                                          if(ionic.Gestures.detection.current.name != this.name && this.triggered) {
                                                                                                                                            inst.trigger(this.name + 'end', ev);
                                                                                                                                            this.triggered = false;
                                                                                                                                            return;
                                                                                                                                          }
                                                                                                                                    Severity: Major
                                                                                                                                    Found in examples/ionic/www/lib/ionic/js/ionic.js and 1 other location - About 2 hrs to fix
                                                                                                                                    examples/ionic/www/lib/ionic/js/ionic.js on lines 1898..1902

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

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

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

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

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

                                                                                                                                    Refactorings

                                                                                                                                    Further Reading

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

                                                                                                                                          if(ionic.Gestures.detection.current.name != this.name && this.triggered) {
                                                                                                                                            inst.trigger(this.name + 'end', ev);
                                                                                                                                            this.triggered = false;
                                                                                                                                            return;
                                                                                                                                          }
                                                                                                                                    Severity: Major
                                                                                                                                    Found in examples/ionic/www/lib/ionic/js/ionic.js and 1 other location - About 2 hrs to fix
                                                                                                                                    examples/ionic/www/lib/ionic/js/ionic.js on lines 1788..1792

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

                                                                                                                                    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

                                                                                                                                        getDistance: function getDistance(touch1, touch2) {
                                                                                                                                          var x = touch2.pageX - touch1.pageX,
                                                                                                                                          y = touch2.pageY - touch1.pageY;
                                                                                                                                          return Math.sqrt((x * x) + (y * y));
                                                                                                                                        },
                                                                                                                                    Severity: Major
                                                                                                                                    Found in examples/ionic/www/lib/ionic/js/ionic.js and 1 other location - About 2 hrs to fix
                                                                                                                                    examples/ionic/www/lib/ionic/js/ionic.js on lines 6825..6829

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

                                                                                                                                    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

                                                                                                                                      __getDistance: function getDistance(touch1, touch2) {
                                                                                                                                        var x = touch2.pageX - touch1.pageX,
                                                                                                                                        y = touch2.pageY - touch1.pageY;
                                                                                                                                        return Math.sqrt((x * x) + (y * y));
                                                                                                                                      },
                                                                                                                                    Severity: Major
                                                                                                                                    Found in examples/ionic/www/lib/ionic/js/ionic.js and 1 other location - About 2 hrs to fix
                                                                                                                                    examples/ionic/www/lib/ionic/js/ionic.js on lines 1252..1256

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

                                                                                                                                    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 (i = 0; i < keys.length; i++) {
                                                                                                                                          if (document.documentElement.style[keys[i]] !== undefined) {
                                                                                                                                            ionic.CSS.TRANSITION = keys[i];
                                                                                                                                            break;
                                                                                                                                          }
                                                                                                                                    Severity: Major
                                                                                                                                    Found in examples/ionic/www/lib/ionic/js/ionic.js and 1 other location - About 1 hr to fix
                                                                                                                                    examples/ionic/www/lib/ionic/js/ionic.js on lines 2462..2467

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

                                                                                                                                    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 (i = 0; i < keys.length; i++) {
                                                                                                                                          if (document.documentElement.style[keys[i]] !== undefined) {
                                                                                                                                            ionic.CSS.TRANSFORM = keys[i];
                                                                                                                                            break;
                                                                                                                                          }
                                                                                                                                    Severity: Major
                                                                                                                                    Found in examples/ionic/www/lib/ionic/js/ionic.js and 1 other location - About 1 hr to fix
                                                                                                                                    examples/ionic/www/lib/ionic/js/ionic.js on lines 2471..2476

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

                                                                                                                                    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

                                                                                                                                            self.__scrollbarFadeTimeout = setTimeout(function() {
                                                                                                                                              if (self.__indicatorX) { self.__indicatorX.indicator.classList.add(className); }
                                                                                                                                              if (self.__indicatorY) { self.__indicatorY.indicator.classList.add(className); }
                                                                                                                                            }, delay || self.options.scrollbarFadeDelay);
                                                                                                                                    Severity: Major
                                                                                                                                    Found in examples/ionic/www/lib/ionic/js/ionic.js and 1 other location - About 1 hr to fix
                                                                                                                                    examples/ionic/www/lib/ionic/js/ionic.js on lines 5586..5589

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

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

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

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

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

                                                                                                                                    Refactorings

                                                                                                                                    Further Reading

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

                                                                                                                                          if (direction == 'in') {
                                                                                                                                            if (self.__indicatorX) { self.__indicatorX.indicator.classList.remove(className); }
                                                                                                                                            if (self.__indicatorY) { self.__indicatorY.indicator.classList.remove(className); }
                                                                                                                                          } else {
                                                                                                                                    Severity: Major
                                                                                                                                    Found in examples/ionic/www/lib/ionic/js/ionic.js and 1 other location - About 1 hr to fix
                                                                                                                                    examples/ionic/www/lib/ionic/js/ionic.js on lines 5590..5593

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

                                                                                                                                    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

                                                                                                                                        __waitForSize: function() {
                                                                                                                                          var self = this;
                                                                                                                                    
                                                                                                                                          clearTimeout(self.__sizerTimeout);
                                                                                                                                    
                                                                                                                                    
                                                                                                                                    Severity: Major
                                                                                                                                    Found in examples/ionic/www/lib/ionic/js/ionic.js and 1 other location - About 1 hr to fix
                                                                                                                                    examples/ionic/www/lib/ionic/js/ionic.js on lines 6596..6607

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

                                                                                                                                    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

                                                                                                                                      __waitForSize: function() {
                                                                                                                                        var self = this;
                                                                                                                                    
                                                                                                                                        clearTimeout(self.__sizerTimeout);
                                                                                                                                    
                                                                                                                                    
                                                                                                                                    Severity: Major
                                                                                                                                    Found in examples/ionic/www/lib/ionic/js/ionic.js and 1 other location - About 1 hr to fix
                                                                                                                                    examples/ionic/www/lib/ionic/js/ionic.js on lines 7117..7128

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

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

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

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

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

                                                                                                                                    Refactorings

                                                                                                                                    Further Reading

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

                                                                                                                                            if (self.__indicatorY.originProp !== 'center bottom') {
                                                                                                                                              self.__indicatorY.indicator.style[self.__transformOriginProperty] = 'center bottom';
                                                                                                                                              self.__indicatorY.originProp = 'center bottom';
                                                                                                                                            }
                                                                                                                                    Severity: Major
                                                                                                                                    Found in examples/ionic/www/lib/ionic/js/ionic.js and 1 other location - About 1 hr to fix
                                                                                                                                    examples/ionic/www/lib/ionic/js/ionic.js on lines 5540..5543

                                                                                                                                    Duplicated Code

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

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

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

                                                                                                                                    Tuning

                                                                                                                                    This issue has a mass of 63.

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

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

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

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

                                                                                                                                    Refactorings

                                                                                                                                    Further Reading

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

                                                                                                                                            if (self.__indicatorY.originProp !== 'center top') {
                                                                                                                                              self.__indicatorY.indicator.style[self.__transformOriginProperty] = 'center top';
                                                                                                                                              self.__indicatorY.originProp = 'center top';
                                                                                                                                            }
                                                                                                                                    Severity: Major
                                                                                                                                    Found in examples/ionic/www/lib/ionic/js/ionic.js and 1 other location - About 1 hr to fix
                                                                                                                                    examples/ionic/www/lib/ionic/js/ionic.js on lines 5553..5556

                                                                                                                                    Duplicated Code

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

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

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

                                                                                                                                    Tuning

                                                                                                                                    This issue has a mass of 63.

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

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

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

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

                                                                                                                                    Refactorings

                                                                                                                                    Further Reading

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

                                                                                                                                            heightScale = Math.max(self.__indicatorY.minScale, (self.__indicatorY.size - Math.abs(self.__scrollTop)) / self.__indicatorY.size);
                                                                                                                                    Severity: Major
                                                                                                                                    Found in examples/ionic/www/lib/ionic/js/ionic.js and 1 other location - About 1 hr to fix
                                                                                                                                    examples/ionic/www/lib/ionic/js/ionic.js on lines 5489..5490

                                                                                                                                    Duplicated Code

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

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

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

                                                                                                                                    Tuning

                                                                                                                                    This issue has a mass of 62.

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

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

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

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

                                                                                                                                    Refactorings

                                                                                                                                    Further Reading

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

                                                                                                                                            widthScale = Math.max(self.__indicatorX.minScale,
                                                                                                                                                (self.__indicatorX.size - Math.abs(self.__scrollLeft)) / self.__indicatorX.size);
                                                                                                                                    Severity: Major
                                                                                                                                    Found in examples/ionic/www/lib/ionic/js/ionic.js and 1 other location - About 1 hr to fix
                                                                                                                                    examples/ionic/www/lib/ionic/js/ionic.js on lines 5534..5534

                                                                                                                                    Duplicated Code

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

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

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

                                                                                                                                    Tuning

                                                                                                                                    This issue has a mass of 62.

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

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

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

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

                                                                                                                                    Refactorings

                                                                                                                                    Further Reading

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

                                                                                                                                          if (self.__indicatorX.transformProp !== translate3dX) {
                                                                                                                                            self.__indicatorX.indicator.style[self.__transformProperty] = translate3dX;
                                                                                                                                            self.__indicatorX.transformProp = translate3dX;
                                                                                                                                          }
                                                                                                                                    Severity: Major
                                                                                                                                    Found in examples/ionic/www/lib/ionic/js/ionic.js and 1 other location - About 1 hr to fix
                                                                                                                                    examples/ionic/www/lib/ionic/js/ionic.js on lines 5567..5570

                                                                                                                                    Duplicated Code

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

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

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

                                                                                                                                    Tuning

                                                                                                                                    This issue has a mass of 61.

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

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

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

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

                                                                                                                                    Refactorings

                                                                                                                                    Further Reading

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

                                                                                                                                          if (self.__indicatorY.transformProp !== translate3dY) {
                                                                                                                                            self.__indicatorY.indicator.style[self.__transformProperty] = translate3dY;
                                                                                                                                            self.__indicatorY.transformProp = translate3dY;
                                                                                                                                          }
                                                                                                                                    Severity: Major
                                                                                                                                    Found in examples/ionic/www/lib/ionic/js/ionic.js and 1 other location - About 1 hr to fix
                                                                                                                                    examples/ionic/www/lib/ionic/js/ionic.js on lines 5517..5520

                                                                                                                                    Duplicated Code

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

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

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

                                                                                                                                    Tuning

                                                                                                                                    This issue has a mass of 61.

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

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

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

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

                                                                                                                                    Refactorings

                                                                                                                                    Further Reading

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

                                                                                                                                        if (self.__isAnimating) {
                                                                                                                                          zyngaCore.effect.Animate.stop(self.__isAnimating);
                                                                                                                                          self.__isAnimating = false;
                                                                                                                                          self.__interruptedAnimation = true;
                                                                                                                                        }
                                                                                                                                    Severity: Major
                                                                                                                                    Found in examples/ionic/www/lib/ionic/js/ionic.js and 1 other location - About 1 hr to fix
                                                                                                                                    examples/ionic/www/lib/ionic/js/ionic.js on lines 6083..6087

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

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

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

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

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

                                                                                                                                    Refactorings

                                                                                                                                    Further Reading

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

                                                                                                                                        if (self.__isDecelerating) {
                                                                                                                                          zyngaCore.effect.Animate.stop(self.__isDecelerating);
                                                                                                                                          self.__isDecelerating = false;
                                                                                                                                          self.__interruptedAnimation = true;
                                                                                                                                        }
                                                                                                                                    Severity: Major
                                                                                                                                    Found in examples/ionic/www/lib/ionic/js/ionic.js and 1 other location - About 1 hr to fix
                                                                                                                                    examples/ionic/www/lib/ionic/js/ionic.js on lines 6090..6094

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

                                                                                                                                    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

                                                                                                                                            case ionic.Gestures.EVENT_END:
                                                                                                                                              // trigger dragend
                                                                                                                                              if(this.triggered) {
                                                                                                                                                inst.trigger(this.name + 'end', ev);
                                                                                                                                              }
                                                                                                                                    Severity: Major
                                                                                                                                    Found in examples/ionic/www/lib/ionic/js/ionic.js and 1 other location - About 1 hr to fix
                                                                                                                                    examples/ionic/www/lib/ionic/js/ionic.js on lines 1953..1960

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

                                                                                                                                    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

                                                                                                                                            case ionic.Gestures.EVENT_END:
                                                                                                                                              // trigger dragend
                                                                                                                                              if(this.triggered) {
                                                                                                                                                inst.trigger(this.name + 'end', ev);
                                                                                                                                              }
                                                                                                                                    Severity: Major
                                                                                                                                    Found in examples/ionic/www/lib/ionic/js/ionic.js and 1 other location - About 1 hr to fix
                                                                                                                                    examples/ionic/www/lib/ionic/js/ionic.js on lines 1863..1870

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

                                                                                                                                    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 (!self.__didWaitForSize && !self.__maxScrollLeft && !self.__maxScrollTop) {
                                                                                                                                            self.__didWaitForSize = true;
                                                                                                                                            self.__waitForSize();
                                                                                                                                          }
                                                                                                                                    Severity: Minor
                                                                                                                                    Found in examples/ionic/www/lib/ionic/js/ionic.js and 1 other location - About 55 mins to fix
                                                                                                                                    examples/ionic/www/lib/ionic/js/ionic.js on lines 6586..6589

                                                                                                                                    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

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

                                                                                                                                        if (!self.__didWaitForSize && !self.__maxScrollLeft && !self.__maxScrollTop) {
                                                                                                                                          self.__didWaitForSize = true;
                                                                                                                                          self.__waitForSize();
                                                                                                                                        }
                                                                                                                                    Severity: Minor
                                                                                                                                    Found in examples/ionic/www/lib/ionic/js/ionic.js and 1 other location - About 55 mins to fix
                                                                                                                                    examples/ionic/www/lib/ionic/js/ionic.js on lines 7140..7143

                                                                                                                                    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

                                                                                                                                        if (keyboardHasPlugin()) {
                                                                                                                                          window.removeEventListener('native.keyboardshow', debouncedKeyboardNativeShow );
                                                                                                                                          window.removeEventListener('native.keyboardhide', keyboardFocusOut);
                                                                                                                                        } else {
                                                                                                                                          document.body.removeEventListener('focusout', keyboardFocusOut);
                                                                                                                                    Severity: Minor
                                                                                                                                    Found in examples/ionic/www/lib/ionic/js/ionic.js and 1 other location - About 55 mins to fix
                                                                                                                                    examples/ionic/www/lib/ionic/js/ionic.js on lines 3688..3693

                                                                                                                                    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

                                                                                                                                      if (keyboardHasPlugin()) {
                                                                                                                                        window.addEventListener('native.keyboardshow', debouncedKeyboardNativeShow);
                                                                                                                                        window.addEventListener('native.keyboardhide', keyboardFocusOut);
                                                                                                                                      } else {
                                                                                                                                        document.body.addEventListener('focusout', keyboardFocusOut);
                                                                                                                                    Severity: Minor
                                                                                                                                    Found in examples/ionic/www/lib/ionic/js/ionic.js and 1 other location - About 55 mins to fix
                                                                                                                                    examples/ionic/www/lib/ionic/js/ionic.js on lines 3644..3649

                                                                                                                                    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

                                                                                                                                            getContentHeight: function() {
                                                                                                                                              return Math.max(self.__content.scrollHeight, self.__content.offsetHeight + (self.__content.offsetTop * 2));
                                                                                                                                            }
                                                                                                                                    Severity: Minor
                                                                                                                                    Found in examples/ionic/www/lib/ionic/js/ionic.js and 1 other location - About 55 mins to fix
                                                                                                                                    examples/ionic/www/lib/ionic/js/ionic.js on lines 4755..4757

                                                                                                                                    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

                                                                                                                                          getContentHeight: function() {
                                                                                                                                            return Math.max(self.__content.scrollHeight, self.__content.offsetHeight + (self.__content.offsetTop * 2));
                                                                                                                                          }
                                                                                                                                    Severity: Minor
                                                                                                                                    Found in examples/ionic/www/lib/ionic/js/ionic.js and 1 other location - About 55 mins to fix
                                                                                                                                    examples/ionic/www/lib/ionic/js/ionic.js on lines 6884..6886

                                                                                                                                    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

                                                                                                                                        bringUp: function() {
                                                                                                                                          if(this.el.style.zIndex !== '0') {
                                                                                                                                            this.el.style.zIndex = '0';
                                                                                                                                          }
                                                                                                                                        },
                                                                                                                                    Severity: Minor
                                                                                                                                    Found in examples/ionic/www/lib/ionic/js/ionic.js and 1 other location - About 50 mins to fix
                                                                                                                                    examples/ionic/www/lib/ionic/js/ionic.js on lines 7886..7890

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

                                                                                                                                    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

                                                                                                                                        pushDown: function() {
                                                                                                                                          if(this.el.style.zIndex !== '-1') {
                                                                                                                                            this.el.style.zIndex = '-1';
                                                                                                                                          }
                                                                                                                                        }
                                                                                                                                    Severity: Minor
                                                                                                                                    Found in examples/ionic/www/lib/ionic/js/ionic.js and 1 other location - About 50 mins to fix
                                                                                                                                    examples/ionic/www/lib/ionic/js/ionic.js on lines 7881..7885

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

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

                                                                                                                                          types[ionic.Gestures.POINTER_TOUCH] = (ev.pointerType == ev.MSPOINTER_TYPE_TOUCH || ev.pointerType == ionic.Gestures.POINTER_TOUCH);
                                                                                                                                    Severity: Major
                                                                                                                                    Found in examples/ionic/www/lib/ionic/js/ionic.js and 2 other locations - About 50 mins to fix
                                                                                                                                    examples/ionic/www/lib/ionic/js/ionic.js on lines 1114..1114
                                                                                                                                    examples/ionic/www/lib/ionic/js/ionic.js on lines 1116..1116

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

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

                                                                                                                                          types[ionic.Gestures.POINTER_PEN] = (ev.pointerType == ev.MSPOINTER_TYPE_PEN || ev.pointerType == ionic.Gestures.POINTER_PEN);
                                                                                                                                    Severity: Major
                                                                                                                                    Found in examples/ionic/www/lib/ionic/js/ionic.js and 2 other locations - About 50 mins to fix
                                                                                                                                    examples/ionic/www/lib/ionic/js/ionic.js on lines 1114..1114
                                                                                                                                    examples/ionic/www/lib/ionic/js/ionic.js on lines 1115..1115

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

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

                                                                                                                                          types[ionic.Gestures.POINTER_MOUSE] = (ev.pointerType == ev.MSPOINTER_TYPE_MOUSE || ev.pointerType == ionic.Gestures.POINTER_MOUSE);
                                                                                                                                    Severity: Major
                                                                                                                                    Found in examples/ionic/www/lib/ionic/js/ionic.js and 2 other locations - About 50 mins to fix
                                                                                                                                    examples/ionic/www/lib/ionic/js/ionic.js on lines 1115..1115
                                                                                                                                    examples/ionic/www/lib/ionic/js/ionic.js on lines 1116..1116

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

                                                                                                                                    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

                                                                                                                                            widthScale = Math.max(self.__indicatorX.minScale,
                                                                                                                                                (self.__indicatorX.size - widthDiff) / self.__indicatorX.size);
                                                                                                                                    Severity: Minor
                                                                                                                                    Found in examples/ionic/www/lib/ionic/js/ionic.js and 1 other location - About 45 mins to fix
                                                                                                                                    examples/ionic/www/lib/ionic/js/ionic.js on lines 5547..5547

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

                                                                                                                                    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

                                                                                                                                            heightScale = Math.max(self.__indicatorY.minScale, (self.__indicatorY.size - heightDiff) / self.__indicatorY.size);
                                                                                                                                    Severity: Minor
                                                                                                                                    Found in examples/ionic/www/lib/ionic/js/ionic.js and 1 other location - About 45 mins to fix
                                                                                                                                    examples/ionic/www/lib/ionic/js/ionic.js on lines 5499..5500

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

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

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

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

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

                                                                                                                                    Refactorings

                                                                                                                                    Further Reading

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

                                                                                                                                        if (top > self.__maxScrollTop) {
                                                                                                                                          top = self.__maxScrollTop;
                                                                                                                                        } else if (top < 0) {
                                                                                                                                          top = 0;
                                                                                                                                        }
                                                                                                                                    Severity: Minor
                                                                                                                                    Found in examples/ionic/www/lib/ionic/js/ionic.js and 1 other location - About 40 mins to fix
                                                                                                                                    examples/ionic/www/lib/ionic/js/ionic.js on lines 5916..5920

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

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

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

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

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

                                                                                                                                    Refactorings

                                                                                                                                    Further Reading

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

                                                                                                                                        if (left > self.__maxScrollLeft) {
                                                                                                                                          left = self.__maxScrollLeft;
                                                                                                                                        } else if (left < 0) {
                                                                                                                                          left = 0;
                                                                                                                                        }
                                                                                                                                    Severity: Minor
                                                                                                                                    Found in examples/ionic/www/lib/ionic/js/ionic.js and 1 other location - About 40 mins to fix
                                                                                                                                    examples/ionic/www/lib/ionic/js/ionic.js on lines 5923..5927

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

                                                                                                                                    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

                                                                                                                                        ionic.Gestures.event.onTouch(ionic.Gestures.DOCUMENT, ionic.Gestures.EVENT_END, ionic.Gestures.detection.detect);
                                                                                                                                    Severity: Minor
                                                                                                                                    Found in examples/ionic/www/lib/ionic/js/ionic.js and 1 other location - About 40 mins to fix
                                                                                                                                    examples/ionic/www/lib/ionic/js/ionic.js on lines 696..696

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

                                                                                                                                    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

                                                                                                                                              var currentTime = Date.now(),
                                                                                                                                                time = Math.min(1, ((currentTime - start) / duration)),
                                                                                                                                              // where .5 would be 50% of time on a linear scale easedT gives a
                                                                                                                                              // fraction based on the easing method
                                                                                                                                                easedT = easeOutCubic(time);
                                                                                                                                    Severity: Minor
                                                                                                                                    Found in examples/ionic/www/lib/ionic/js/ionic.js and 1 other location - About 40 mins to fix
                                                                                                                                    examples/ionic/www/lib/ionic/js/ionic-angular.js on lines 6794..6798

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

                                                                                                                                    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

                                                                                                                                        ionic.Gestures.event.onTouch(ionic.Gestures.DOCUMENT, ionic.Gestures.EVENT_MOVE, ionic.Gestures.detection.detect);
                                                                                                                                    Severity: Minor
                                                                                                                                    Found in examples/ionic/www/lib/ionic/js/ionic.js and 1 other location - About 40 mins to fix
                                                                                                                                    examples/ionic/www/lib/ionic/js/ionic.js on lines 697..697

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

                                                                                                                                    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

                                                                                                                                        platform: function() {
                                                                                                                                          // singleton to get the platform name
                                                                                                                                          if (platformName === null) self.setPlatform(self.device().platform);
                                                                                                                                          return platformName;
                                                                                                                                        },
                                                                                                                                    Severity: Minor
                                                                                                                                    Found in examples/ionic/www/lib/ionic/js/ionic.js and 1 other location - About 35 mins to fix
                                                                                                                                    examples/ionic/www/lib/ionic/js/ionic.js on lines 2285..2289

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

                                                                                                                                    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

                                                                                                                                        version: function() {
                                                                                                                                          // singleton to get the platform version
                                                                                                                                          if (platformVersion === null) self.setVersion(self.device().version);
                                                                                                                                          return platformVersion;
                                                                                                                                        },
                                                                                                                                    Severity: Minor
                                                                                                                                    Found in examples/ionic/www/lib/ionic/js/ionic.js and 1 other location - About 35 mins to fix
                                                                                                                                    examples/ionic/www/lib/ionic/js/ionic.js on lines 2255..2259

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

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

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

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

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

                                                                                                                                    Refactorings

                                                                                                                                    Further Reading

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

                                                                                                                                              if (self._showStatusBar) {
                                                                                                                                                // they do not want it to be full screen
                                                                                                                                                window.StatusBar && window.StatusBar.show();
                                                                                                                                                document.body.classList.remove('status-bar-hide');
                                                                                                                                              } else {
                                                                                                                                    Severity: Minor
                                                                                                                                    Found in examples/ionic/www/lib/ionic/js/ionic.js and 1 other location - About 35 mins to fix
                                                                                                                                    examples/ionic/www/lib/ionic/js/ionic.js on lines 2367..2371

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

                                                                                                                                    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

                                                                                                                                              } else {
                                                                                                                                                // it should be full screen
                                                                                                                                                window.StatusBar && window.StatusBar.hide();
                                                                                                                                                document.body.classList.add('status-bar-hide');
                                                                                                                                              }
                                                                                                                                    Severity: Minor
                                                                                                                                    Found in examples/ionic/www/lib/ionic/js/ionic.js and 1 other location - About 35 mins to fix
                                                                                                                                    examples/ionic/www/lib/ionic/js/ionic.js on lines 2363..2367

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

                                                                                                                                    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

                                                                                                                                            level = Math.max(Math.min(level, self.options.maxZoom), self.options.minZoom);
                                                                                                                                    Severity: Minor
                                                                                                                                    Found in examples/ionic/www/lib/ionic/js/ionic.js and 1 other location - About 30 mins to fix
                                                                                                                                    examples/ionic/www/lib/ionic/js/ionic.js on lines 5906..5906

                                                                                                                                    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

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

                                                                                                                                          while (target) {
                                                                                                                                            if (target.classList && target.classList.contains(ITEM_CLASS)) {
                                                                                                                                              return target;
                                                                                                                                            }
                                                                                                                                            target = target.parentNode;
                                                                                                                                    Severity: Minor
                                                                                                                                    Found in examples/ionic/www/lib/ionic/js/ionic.js and 1 other location - About 30 mins to fix
                                                                                                                                    examples/ionic/www/lib/ionic/js/ionic.js on lines 365..370

                                                                                                                                    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

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

                                                                                                                                          while (e && depth--) {
                                                                                                                                            if (e.classList && e.classList.contains(className)) {
                                                                                                                                              return e;
                                                                                                                                            }
                                                                                                                                            e = e.parentNode;
                                                                                                                                    Severity: Minor
                                                                                                                                    Found in examples/ionic/www/lib/ionic/js/ionic.js and 1 other location - About 30 mins to fix
                                                                                                                                    examples/ionic/www/lib/ionic/js/ionic.js on lines 7700..7705

                                                                                                                                    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

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

                                                                                                                                        level = Math.max(Math.min(level, self.options.maxZoom), self.options.minZoom);
                                                                                                                                    Severity: Minor
                                                                                                                                    Found in examples/ionic/www/lib/ionic/js/ionic.js and 1 other location - About 30 mins to fix
                                                                                                                                    examples/ionic/www/lib/ionic/js/ionic.js on lines 6207..6207

                                                                                                                                    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