sahat/satellizer

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

Summary

Maintainability
F
2 mos
Test Coverage

File ionic-angular.js has 7396 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-angular.js - About 3 wks to fix

    Function RepeatManagerFactory has 460 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    function RepeatManagerFactory($rootScope, $window, $$rAF) {
      var EMPTY_DIMENSION = { primaryPos: 0, secondaryPos: 0, primarySize: 0, secondarySize: 0, rowPrimarySize: 0 };
    
      return function RepeatController(options) {
        var afterItemsNode = options.afterItemsNode;
    Severity: Major
    Found in examples/ionic/www/lib/ionic/js/ionic-angular.js - About 2 days to fix

      Function RepeatController has 457 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

        return function RepeatController(options) {
          var afterItemsNode = options.afterItemsNode;
          var containerNode = options.containerNode;
          var forceRefreshImages = options.forceRefreshImages;
          var heightData = options.heightData;
      Severity: Major
      Found in examples/ionic/www/lib/ionic/js/ionic-angular.js - About 2 days to fix

        Function CollectionRepeatDirective has 230 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        function CollectionRepeatDirective($ionicCollectionManager, $parse, $window, $$rAF, $rootScope, $timeout) {
          return {
            restrict: 'A',
            priority: 1000,
            transclude: 'element',
        Severity: Major
        Found in examples/ionic/www/lib/ionic/js/ionic-angular.js - About 1 day to fix

          Function postLink has 220 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

            function postLink(scope, element, attr, scrollCtrl, transclude) {
              var scrollView = scrollCtrl.scrollView;
              var node = element[0];
              var containerNode = angular.element('<div class="collection-repeat-container">')[0];
              node.parentNode.replaceChild(containerNode, node);
          Severity: Major
          Found in examples/ionic/www/lib/ionic/js/ionic-angular.js - About 1 day to fix

            Function create has 213 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                create: function(navViewCtrl, viewLocals, enteringView, leavingView, renderStart, renderEnd) {
                  // get a reference to an entering/leaving element if they exist
                  // loop through to see if the view is already in the navViewElement
                  var enteringEle, leavingEle;
                  var transitionId = ++transitionCounter;
            Severity: Major
            Found in examples/ionic/www/lib/ionic/js/ionic-angular.js - About 1 day to fix

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

                  register: function(parentScope, viewLocals) {
              
                    var currentStateId = getCurrentStateId(),
                        hist = getHistory(parentScope),
                        currentView = viewHistory.currentView,
              Severity: Major
              Found in examples/ionic/www/lib/ionic/js/ionic-angular.js - About 7 hrs to fix

                Function compile has 135 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    compile: function(element, attr) {
                      element.addClass('menu-content pane');
                
                      return { pre: prelink };
                      function prelink($scope, $element, $attr, sideMenuCtrl) {
                Severity: Major
                Found in examples/ionic/www/lib/ionic/js/ionic-angular.js - About 5 hrs to fix

                  Function prelink has 131 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                        function prelink($scope, $element, $attr, sideMenuCtrl) {
                          var startCoord = null;
                          var primaryScrollAxis = null;
                  
                          if (isDefined(attr.dragContent)) {
                  Severity: Major
                  Found in examples/ionic/www/lib/ionic/js/ionic-angular.js - About 5 hrs to fix

                    Function DynamicViewType has 122 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        function DynamicViewType() {
                          var self = this;
                          var debouncedScrollViewSetDimensions = ionic.debounce(scrollViewSetDimensions, 25, true);
                          var calculateDimensions = isGridView ? calculateDimensionsGrid : calculateDimensionsList;
                          var dimensionsIndex;
                    Severity: Major
                    Found in examples/ionic/www/lib/ionic/js/ionic-angular.js - About 4 hrs to fix

                      Function createHeaderBar has 119 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                        self.createHeaderBar = function(isActive) {
                          var containerEle = jqLite('<div class="nav-bar-block">');
                          ionic.DomUtil.cachedAttr(containerEle, 'nav-bar', isActive ? 'active' : 'cached');
                      
                          var alignTitle = $attrs.alignTitle || $ionicConfig.navBar.alignTitle();
                      Severity: Major
                      Found in examples/ionic/www/lib/ionic/js/ionic-angular.js - About 4 hrs to fix

                        Function compile has 104 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            compile: function(element, attr) {
                        
                              //We create the tabNavTemplate in the compile phase so that the
                              //attributes we pass down won't be interpolated yet - we want
                              //to pass down the 'raw' versions of the attributes
                        Severity: Major
                        Found in examples/ionic/www/lib/ionic/js/ionic-angular.js - About 4 hrs to fix

                          Function compile has 99 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                              compile: function(element, attr) {
                                var innerElement;
                                var scrollCtrl;
                          
                                element.addClass('scroll-content ionic-scroll');
                          Severity: Major
                          Found in examples/ionic/www/lib/ionic/js/ionic-angular.js - About 3 hrs to fix

                            Function transition has 94 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                    transition: function(direction, enableBack, allowAnimate) {
                                      var deferred;
                                      var enteringData = getTransitionData(viewLocals, enteringEle, direction, enteringView);
                                      var leavingData = extend(extend({}, enteringData), getViewData(leavingView));
                                      enteringData.transitionId = leavingData.transitionId = transitionId;
                            Severity: Major
                            Found in examples/ionic/www/lib/ionic/js/ionic-angular.js - About 3 hrs to fix

                              Function initSwipeBack has 93 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                self.initSwipeBack = function() {
                                  var swipeBackHitWidth = $ionicConfig.views.swipeBackHitWidth();
                                  var viewTransition, associatedNavBarCtrl, backView;
                                  var deregDragStart, deregDrag, deregRelease;
                                  var windowWidth, startDragX, dragPoints;
                              Severity: Major
                              Found in examples/ionic/www/lib/ionic/js/ionic-angular.js - About 3 hrs to fix

                                Function calcWidths has 90 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                  self.calcWidths = function(textAlign, isPreviousTitle) {
                                    var titleEle = getEle(TITLE);
                                    var backBtnEle = getEle(BACK_BUTTON);
                                    var x, y, z, b, c, d, childSize, bounds;
                                    var childNodes = $element[0].childNodes;
                                Severity: Major
                                Found in examples/ionic/www/lib/ionic/js/ionic-angular.js - About 3 hrs to fix

                                  Function prelink has 82 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                        function prelink($scope, $element, $attr) {
                                          var parentScope = $scope.$parent;
                                          $scope.$watch(function() {
                                            return (parentScope.$hasHeader ? ' has-header' : '') +
                                              (parentScope.$hasSubheader ? ' has-subheader' : '') +
                                  Severity: Major
                                  Found in examples/ionic/www/lib/ionic/js/ionic-angular.js - About 3 hrs to fix

                                    Function render has 81 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                        function render(forceRerender) {
                                          if (render.destroyed) return;
                                          var i;
                                          var ii;
                                          var item;
                                    Severity: Major
                                    Found in examples/ionic/www/lib/ionic/js/ionic-angular.js - About 3 hrs to fix

                                      Function compile has 77 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                          compile: function($element, $attr) {
                                            var listEl = jqLite('<div class="list">')
                                              .append($element.contents())
                                              .addClass($attr.type);
                                      
                                      
                                      Severity: Major
                                      Found in examples/ionic/www/lib/ionic/js/ionic-angular.js - About 3 hrs to fix

                                        Function actionSheet has 75 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                          function actionSheet(opts) {
                                            var scope = $rootScope.$new(true);
                                        
                                            extend(scope, {
                                              cancel: noop,
                                        Severity: Major
                                        Found in examples/ionic/www/lib/ionic/js/ionic-angular.js - About 3 hrs to fix

                                          Function link has 71 lines of code (exceeds 25 allowed). Consider refactoring.
                                          Open

                                                return function link($scope, $element, $attr, ctrls) {
                                                  var childScope;
                                                  var childElement;
                                                  var tabsCtrl = ctrls[0];
                                                  var tabCtrl = ctrls[1];
                                          Severity: Major
                                          Found in examples/ionic/www/lib/ionic/js/ionic-angular.js - About 2 hrs to fix

                                            Function controller has 70 lines of code (exceeds 25 allowed). Consider refactoring.
                                            Open

                                                controller: ['$scope', '$element', '$attrs', function($scope, $element, $attrs) {
                                                  var _this = this;
                                            
                                                  var continuous = $scope.$eval($scope.doesContinue) === true;
                                                  var shouldAutoPlay = isDefined($attrs.autoPlay) ? !!$scope.autoPlay : false;
                                            Severity: Major
                                            Found in examples/ionic/www/lib/ionic/js/ionic-angular.js - About 2 hrs to fix

                                              Function transition has 69 lines of code (exceeds 25 allowed). Consider refactoring.
                                              Open

                                                self.transition = function(enteringHeaderBar, leavingHeaderBar, viewData) {
                                                  var enteringHeaderBarCtrl = enteringHeaderBar.controller();
                                                  var transitionFn = $ionicConfig.transitions.navBar[viewData.navBarTransition] || $ionicConfig.transitions.navBar.none;
                                                  var transitionId = viewData.transitionId;
                                              
                                              
                                              Severity: Major
                                              Found in examples/ionic/www/lib/ionic/js/ionic-angular.js - About 2 hrs to fix

                                                Function getLoader has 68 lines of code (exceeds 25 allowed). Consider refactoring.
                                                Open

                                                  function getLoader() {
                                                    if (!loaderInstance) {
                                                      loaderInstance = $ionicTemplateLoader.compile({
                                                        template: LOADING_TPL,
                                                        appendTo: $ionicBody.get()
                                                Severity: Major
                                                Found in examples/ionic/www/lib/ionic/js/ionic-angular.js - About 2 hrs to fix

                                                  Function init has 66 lines of code (exceeds 25 allowed). Consider refactoring.
                                                  Open

                                                          function init() {
                                                            var listView = listCtrl.listView = new ionic.views.ListView({
                                                              el: $element[0],
                                                              listEl: $element.children()[0],
                                                              scrollEl: scrollCtrl && scrollCtrl.element,
                                                  Severity: Major
                                                  Found in examples/ionic/www/lib/ionic/js/ionic-angular.js - About 2 hrs to fix

                                                    Function createPopup has 64 lines of code (exceeds 25 allowed). Consider refactoring.
                                                    Open

                                                      function createPopup(options) {
                                                        options = extend({
                                                          scope: null,
                                                          title: '',
                                                          buttons: []
                                                    Severity: Major
                                                    Found in examples/ionic/www/lib/ionic/js/ionic-angular.js - About 2 hrs to fix

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

                                                          $get: ['$q', function($q) {
                                                            var self = {
                                                      
                                                              /**
                                                               * @ngdoc method
                                                      Severity: Major
                                                      Found in examples/ionic/www/lib/ionic/js/ionic-angular.js - About 2 hrs to fix

                                                        Function compile has 55 lines of code (exceeds 25 allowed). Consider refactoring.
                                                        Open

                                                            compile: function(tElement, tAttrs) {
                                                        
                                                              // clone the back button, but as a <div>
                                                              var buttonEle = $document[0].createElement('button');
                                                              for (var n in tAttrs.$attr) {
                                                        Severity: Major
                                                        Found in examples/ionic/www/lib/ionic/js/ionic-angular.js - About 2 hrs to fix

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

                                                              compile: function(element) {
                                                                element.addClass('scroll-view ionic-scroll');
                                                          
                                                                //We cannot transclude here because it breaks element.data() inheritance on compile
                                                                var innerElement = jqLite('<div class="scroll"></div>');
                                                          Severity: Major
                                                          Found in examples/ionic/www/lib/ionic/js/ionic-angular.js - About 2 hrs to fix

                                                            Function show has 49 lines of code (exceeds 25 allowed). Consider refactoring.
                                                            Open

                                                                show: function(target) {
                                                                  var self = this;
                                                            
                                                                  if (self.scope.$$destroyed) {
                                                                    $log.error('Cannot call ' + self.viewType + '.show() after remove(). Please create a new ' + self.viewType + ' instance.');
                                                            Severity: Minor
                                                            Found in examples/ionic/www/lib/ionic/js/ionic-angular.js - About 1 hr to fix

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

                                                              function headerFooterBarDirective(isHeader) {
                                                                return ['$document', '$timeout', function($document, $timeout) {
                                                                  return {
                                                                    restrict: 'E',
                                                                    controller: '$ionicHeaderBar',
                                                              Severity: Minor
                                                              Found in examples/ionic/www/lib/ionic/js/ionic-angular.js - About 1 hr to fix

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

                                                                    this.refreshLayout = function() {
                                                                      if (data.length) {
                                                                        estimatedHeight = heightGetter(0, data[0]);
                                                                        estimatedWidth = widthGetter(0, data[0]);
                                                                      } else {
                                                                Severity: Minor
                                                                Found in examples/ionic/www/lib/ionic/js/ionic-angular.js - About 1 hr to fix

                                                                  Function prelink has 45 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                  Open

                                                                        function prelink($scope, $element, $attr) {
                                                                          $ionicBind($scope, $attr, {
                                                                            direction: '@',
                                                                            paging: '@',
                                                                            $onScroll: '&onScroll',
                                                                  Severity: Minor
                                                                  Found in examples/ionic/www/lib/ionic/js/ionic-angular.js - About 1 hr to fix

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

                                                                        compile: function(element, attr) {
                                                                          var input = element.find('input');
                                                                          forEach({
                                                                            'name': attr.name,
                                                                            'ng-value': attr.ngValue,
                                                                    Severity: Minor
                                                                    Found in examples/ionic/www/lib/ionic/js/ionic-angular.js - About 1 hr to fix

                                                                      Function compile has 42 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                      Open

                                                                          compile: function(tElement) {
                                                                            //We cannot use regular transclude here because it breaks element.data()
                                                                            //inheritance on compile
                                                                            var innerElement = jqLite('<div class="tab-nav tabs">');
                                                                            innerElement.append(tElement.contents());
                                                                      Severity: Minor
                                                                      Found in examples/ionic/www/lib/ionic/js/ionic-angular.js - About 1 hr to fix

                                                                        Function showPopup has 42 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                        Open

                                                                          function showPopup(options) {
                                                                            var popup = $ionicPopup._createPopup(options);
                                                                            var showDelay = 0;
                                                                        
                                                                            if (popupStack.length > 0) {
                                                                        Severity: Minor
                                                                        Found in examples/ionic/www/lib/ionic/js/ionic-angular.js - About 1 hr to fix

                                                                          Consider simplifying this complex logical expression.
                                                                          Open

                                                                                  if (isSwipingRight && (releaseSwipeCompletion > 0.5 || velocity > 0.1)) {
                                                                                    // complete view transition on release
                                                                                    var speed = (velocity > 0.5 || velocity < 0.05 || releaseX > windowWidth - 45) ? 'fast' : 'slow';
                                                                                    navSwipeAttr(disableAnimation ? '' : speed);
                                                                                    backView.go();
                                                                          Severity: Critical
                                                                          Found in examples/ionic/www/lib/ionic/js/ionic-angular.js - About 1 hr to fix

                                                                            Function compile has 41 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                            Open

                                                                                compile: function($element, $attrs) {
                                                                                  var isAnchor = isDefined($attrs.href) ||
                                                                                                 isDefined($attrs.ngHref) ||
                                                                                                 isDefined($attrs.uiSref);
                                                                                  var isComplexItem = isAnchor ||
                                                                            Severity: Minor
                                                                            Found in examples/ionic/www/lib/ionic/js/ionic-angular.js - About 1 hr to fix

                                                                              Function parseDimensionAttr has 41 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                              Open

                                                                                  function parseDimensionAttr(attrValue, dimensionData) {
                                                                                    if (!attrValue) return;
                                                                              
                                                                                    var parsedValue;
                                                                                    // Try to just parse the plain attr value
                                                                              Severity: Minor
                                                                              Found in examples/ionic/www/lib/ionic/js/ionic-angular.js - About 1 hr to fix

                                                                                Function updateRenderRange has 41 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                Open

                                                                                      this.updateRenderRange = function(scrollValue, scrollValueEnd) {
                                                                                        var i;
                                                                                        var len;
                                                                                        var dim;
                                                                                
                                                                                
                                                                                Severity: Minor
                                                                                Found in examples/ionic/www/lib/ionic/js/ionic-angular.js - About 1 hr to fix

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

                                                                                          self.show = function(options) {
                                                                                            var templatePromise = options.templateUrl ?
                                                                                              $ionicTemplateLoader.load(options.templateUrl) :
                                                                                              //options.content: deprecated
                                                                                              $q.when(options.template || options.content || '');
                                                                                  Severity: Minor
                                                                                  Found in examples/ionic/www/lib/ionic/js/ionic-angular.js - About 1 hr to fix

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

                                                                                        function handleTouchmove(e) {
                                                                                          // if multitouch or regular scroll event, get out immediately
                                                                                          if (!canOverscroll || e.touches.length > 1) {
                                                                                            return;
                                                                                          }
                                                                                    Severity: Minor
                                                                                    Found in examples/ionic/www/lib/ionic/js/ionic-angular.js - About 1 hr to fix

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

                                                                                            compile: function(tElement) {
                                                                                              tElement.addClass(isHeader ? 'bar bar-header' : 'bar bar-footer');
                                                                                              // top style tabs? if so, remove bottom border for seamless display
                                                                                              $timeout(function() {
                                                                                                if (isHeader && $document[0].getElementsByClassName('tabs-top').length) tElement.addClass('has-tabs-top');
                                                                                      Severity: Minor
                                                                                      Found in examples/ionic/www/lib/ionic/js/ionic-angular.js - About 1 hr to fix

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

                                                                                          provider.transitions.navBar.ios = function(enteringHeaderBar, leavingHeaderBar, direction, shouldAnimate) {
                                                                                        
                                                                                            function setStyles(ctrl, opacity, titleX, backTextX) {
                                                                                              var css = {};
                                                                                              css[ionic.CSS.TRANSITION_DURATION] = d.shouldAnimate ? '' : '0ms';
                                                                                        Severity: Minor
                                                                                        Found in examples/ionic/www/lib/ionic/js/ionic-angular.js - About 1 hr to fix

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

                                                                                            self.select = function(tab, shouldEmitEvent) {
                                                                                              var tabIndex;
                                                                                              if (isNumber(tab)) {
                                                                                                tabIndex = tab;
                                                                                                if (tabIndex >= self.tabs.length) return;
                                                                                          Severity: Minor
                                                                                          Found in examples/ionic/www/lib/ionic/js/ionic-angular.js - About 1 hr to fix

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

                                                                                              self.updatePositions = function(titleEle, updateTitleLeft, updateTitleRight, buttonsLeft, buttonsRight, updateCss, showPreviousTitle) {
                                                                                                var deferred = $q.defer();
                                                                                            
                                                                                                // only make DOM updates when there are actual changes
                                                                                                if (titleEle) {
                                                                                            Severity: Minor
                                                                                            Found in examples/ionic/www/lib/ionic/js/ionic-angular.js - About 1 hr to fix

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

                                                                                                      fn: function(i) {
                                                                                                        return {
                                                                                                          x1: 10 + (i * 14),
                                                                                                          x2: 10 + (i * 14),
                                                                                                          a: [{
                                                                                              Severity: Minor
                                                                                              Found in examples/ionic/www/lib/ionic/js/ionic-angular.js - About 1 hr to fix

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

                                                                                                    android: function(ele) {
                                                                                                      var rIndex = 0;
                                                                                                      var rotateCircle = 0;
                                                                                                      var startTime;
                                                                                                      var svgEle = ele.querySelector('g');
                                                                                                Severity: Minor
                                                                                                Found in examples/ionic/www/lib/ionic/js/ionic-angular.js - About 1 hr to fix

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

                                                                                                  function tapScrollToTopDirective() {
                                                                                                    return ['$ionicScrollDelegate', function($ionicScrollDelegate) {
                                                                                                      return {
                                                                                                        restrict: 'E',
                                                                                                        link: function($scope, $element, $attr) {
                                                                                                  Severity: Minor
                                                                                                  Found in examples/ionic/www/lib/ionic/js/ionic-angular.js - About 1 hr to fix

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

                                                                                                      function loadAndCompile(options) {
                                                                                                        options = extend({
                                                                                                          template: '',
                                                                                                          templateUrl: '',
                                                                                                          scope: null,
                                                                                                    Severity: Minor
                                                                                                    Found in examples/ionic/www/lib/ionic/js/ionic-angular.js - About 1 hr to fix

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

                                                                                                              function prelink($scope, $element, $attr, ctrl) {
                                                                                                                if (isHeader) {
                                                                                                                  $scope.$watch(function() { return $element[0].className; }, function(value) {
                                                                                                                    var isShown = value.indexOf('ng-hide') === -1;
                                                                                                                    var isSubheader = value.indexOf('bar-subheader') !== -1;
                                                                                                      Severity: Minor
                                                                                                      Found in examples/ionic/www/lib/ionic/js/ionic-angular.js - About 1 hr to fix

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

                                                                                                          function positionView(target, popoverEle) {
                                                                                                            var targetEle = jqLite(target.target || target);
                                                                                                            var buttonOffset = $ionicPosition.offset(targetEle);
                                                                                                            var popoverWidth = popoverEle.prop('offsetWidth');
                                                                                                            var popoverHeight = popoverEle.prop('offsetHeight');
                                                                                                        Severity: Minor
                                                                                                        Found in examples/ionic/www/lib/ionic/js/ionic-angular.js - About 1 hr to fix

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

                                                                                                              function onRelease(ev) {
                                                                                                                if (isPrimary && viewTransition && dragPoints && dragPoints.length > 1) {
                                                                                                          
                                                                                                                  var now = Date.now();
                                                                                                                  var releaseX = getDragX(ev);
                                                                                                          Severity: Minor
                                                                                                          Found in examples/ionic/www/lib/ionic/js/ionic-angular.js - About 1 hr to fix

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

                                                                                                              self.openAmount = function(amount) {
                                                                                                                var maxLeft = self.left && self.left.width || 0;
                                                                                                                var maxRight = self.right && self.right.width || 0;
                                                                                                            
                                                                                                                // Check if we can move to that side, depending if the left/right panel is enabled
                                                                                                            Severity: Minor
                                                                                                            Found in examples/ionic/www/lib/ionic/js/ionic-angular.js - About 1 hr to fix

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

                                                                                                                  isActiveScope: function(scope) {
                                                                                                                    if (!scope) return false;
                                                                                                              
                                                                                                                    var climbScope = scope;
                                                                                                                    var currentHistoryId = this.currentHistoryId();
                                                                                                              Severity: Minor
                                                                                                              Found in examples/ionic/www/lib/ionic/js/ionic-angular.js - About 1 hr to fix

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

                                                                                                                  self.snapToRest = function(e) {
                                                                                                                    // We want to animate at the end of this
                                                                                                                    self.content.enableAnimation();
                                                                                                                    isDragging = false;
                                                                                                                
                                                                                                                
                                                                                                                Severity: Minor
                                                                                                                Found in examples/ionic/www/lib/ionic/js/ionic-angular.js - About 1 hr to fix

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

                                                                                                                        function prelink($scope, $element, $attr, tabsCtrl) {
                                                                                                                          var deregisterInstance = $ionicTabsDelegate._registerInstance(
                                                                                                                            tabsCtrl, $attr.delegateHandle, tabsCtrl.hasActiveScope
                                                                                                                          );
                                                                                                                  
                                                                                                                  
                                                                                                                  Severity: Minor
                                                                                                                  Found in examples/ionic/www/lib/ionic/js/ionic-angular.js - About 1 hr to fix

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

                                                                                                                            fn: function(i) {
                                                                                                                              return {
                                                                                                                                cx: 32,
                                                                                                                                cy: 32,
                                                                                                                                a: [{
                                                                                                                    Severity: Minor
                                                                                                                    Found in examples/ionic/www/lib/ionic/js/ionic-angular.js - About 1 hr to fix

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

                                                                                                                          function positionItem(ele, itemType) {
                                                                                                                            if (!ele) return;
                                                                                                                      
                                                                                                                            if (itemType === 'title') {
                                                                                                                              // title element
                                                                                                                      Severity: Minor
                                                                                                                      Found in examples/ionic/www/lib/ionic/js/ionic-angular.js - About 1 hr to fix

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

                                                                                                                          function showLoader(options) {
                                                                                                                            options = extend({}, $ionicLoadingConfig || {}, options || {});
                                                                                                                            var delay = options.delay || options.showDelay || 0;
                                                                                                                        
                                                                                                                            deregisterStateListener1();
                                                                                                                        Severity: Minor
                                                                                                                        Found in examples/ionic/www/lib/ionic/js/ionic-angular.js - About 1 hr to fix

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

                                                                                                                                link: function($scope, $element, $attr) {
                                                                                                                                  if ($attr.noTapScroll == 'true') {
                                                                                                                                    return;
                                                                                                                                  }
                                                                                                                                  ionic.on('tap', onTap, $element[0]);
                                                                                                                          Severity: Minor
                                                                                                                          Found in examples/ionic/www/lib/ionic/js/ionic-angular.js - About 1 hr to fix

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

                                                                                                                                    loadViewElements: function(registerData) {
                                                                                                                                      var x, l, viewEle;
                                                                                                                                      var viewElements = navViewCtrl.getViewElements();
                                                                                                                                      var enteringEleIdentifier = getViewElementIdentifier(viewLocals, enteringView);
                                                                                                                                      var navViewActiveEleId = navViewCtrl.activeEleId();
                                                                                                                            Severity: Minor
                                                                                                                            Found in examples/ionic/www/lib/ionic/js/ionic-angular.js - About 1 hr to fix

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

                                                                                                                                  link: function($scope, $element, $attrs, ctrls) {
                                                                                                                                    var tabsCtrl = ctrls[0],
                                                                                                                                      tabCtrl = ctrls[1];
                                                                                                                              
                                                                                                                                    //Remove title attribute so browser-tooltip does not apear
                                                                                                                              Severity: Minor
                                                                                                                              Found in examples/ionic/www/lib/ionic/js/ionic-angular.js - About 1 hr to fix

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

                                                                                                                                    goBack: function(backCount) {
                                                                                                                                      if (isDefined(backCount) && backCount !== -1) {
                                                                                                                                        if (backCount > -1) return;
                                                                                                                                
                                                                                                                                        var currentHistory = viewHistory.histories[this.currentHistoryId()];
                                                                                                                                Severity: Minor
                                                                                                                                Found in examples/ionic/www/lib/ionic/js/ionic-angular.js - About 1 hr to fix

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

                                                                                                                                    provider.transitions.views.ios = function(enteringEle, leavingEle, direction, shouldAnimate) {
                                                                                                                                  
                                                                                                                                      function setStyles(ele, opacity, x, boxShadowOpacity) {
                                                                                                                                        var css = {};
                                                                                                                                        css[ionic.CSS.TRANSITION_DURATION] = d.shouldAnimate ? '' : 0;
                                                                                                                                  Severity: Minor
                                                                                                                                  Found in examples/ionic/www/lib/ionic/js/ionic-angular.js - About 1 hr to fix

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

                                                                                                                                            fn: function(i) {
                                                                                                                                              return {
                                                                                                                                                cx: 16 + (16 * i),
                                                                                                                                                cy: 32,
                                                                                                                                                sw: 0,
                                                                                                                                    Severity: Minor
                                                                                                                                    Found in examples/ionic/www/lib/ionic/js/ionic-angular.js - About 1 hr to fix

                                                                                                                                      Consider simplifying this complex logical expression.
                                                                                                                                      Open

                                                                                                                                                if (nativeScrolling) {
                                                                                                                                                  // use native scrolling
                                                                                                                                                  $element.addClass('overflow-scroll');
                                                                                                                                      
                                                                                                                                                  scrollViewOptions = {
                                                                                                                                      Severity: Major
                                                                                                                                      Found in examples/ionic/www/lib/ionic/js/ionic-angular.js - About 1 hr to fix

                                                                                                                                        Consider simplifying this complex logical expression.
                                                                                                                                        Open

                                                                                                                                              } else if (currentView && currentView.historyId !== historyId &&
                                                                                                                                                        hist.cursor > -1 && hist.stack.length > 0 && hist.cursor < hist.stack.length &&
                                                                                                                                                        hist.stack[hist.cursor].stateId === currentStateId) {
                                                                                                                                                // they just changed to a different history and the history already has views in it
                                                                                                                                                var switchToView = hist.stack[hist.cursor];
                                                                                                                                        Severity: Major
                                                                                                                                        Found in examples/ionic/www/lib/ionic/js/ionic-angular.js - About 1 hr to fix

                                                                                                                                          Function updatePositions has 7 arguments (exceeds 4 allowed). Consider refactoring.
                                                                                                                                          Open

                                                                                                                                            self.updatePositions = function(titleEle, updateTitleLeft, updateTitleRight, buttonsLeft, buttonsRight, updateCss, showPreviousTitle) {
                                                                                                                                          Severity: Major
                                                                                                                                          Found in examples/ionic/www/lib/ionic/js/ionic-angular.js - About 50 mins to fix

                                                                                                                                            Avoid deeply nested control flow statements.
                                                                                                                                            Open

                                                                                                                                                      for (y = 0; y < splitClasses.length; y++) {
                                                                                                                                                        cssClass = splitClasses[y];
                                                                                                                                                        el.setAttribute('class', (
                                                                                                                                                            (" " + (el.getAttribute('class') || '') + " ")
                                                                                                                                                            .replace(/[\n\t]/g, " ")
                                                                                                                                            Severity: Major
                                                                                                                                            Found in examples/ionic/www/lib/ionic/js/ionic-angular.js - About 45 mins to fix

                                                                                                                                              Avoid deeply nested control flow statements.
                                                                                                                                              Open

                                                                                                                                                        if (tmp && tmp.parentHistoryId === currentView.historyId) {
                                                                                                                                                          direction = DIRECTION_ENTER;
                                                                                                                                                        }
                                                                                                                                              Severity: Major
                                                                                                                                              Found in examples/ionic/www/lib/ionic/js/ionic-angular.js - About 45 mins to fix

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

                                                                                                                                                function CollectionRepeatDirective($ionicCollectionManager, $parse, $window, $$rAF, $rootScope, $timeout) {
                                                                                                                                                Severity: Minor
                                                                                                                                                Found in examples/ionic/www/lib/ionic/js/ionic-angular.js - About 45 mins to fix

                                                                                                                                                  Avoid deeply nested control flow statements.
                                                                                                                                                  Open

                                                                                                                                                              if (b.nodeType == 1) {
                                                                                                                                                  
                                                                                                                                                                if (b.classList.contains(BACK_TEXT)) {
                                                                                                                                                                  for (z = 0; z < b.children.length; z++) {
                                                                                                                                                                    d = b.children[z];
                                                                                                                                                  Severity: Major
                                                                                                                                                  Found in examples/ionic/www/lib/ionic/js/ionic-angular.js - About 45 mins to fix

                                                                                                                                                    Avoid deeply nested control flow statements.
                                                                                                                                                    Open

                                                                                                                                                              if (forwardView && currentView.stateId !== forwardView.stateId &&
                                                                                                                                                                 currentView.historyId === forwardView.historyId) {
                                                                                                                                                                // they navigated to a new view but the stack already has a forward view
                                                                                                                                                                // since its a new view remove any forwards that existed
                                                                                                                                                                tmp = getHistoryById(forwardView.historyId);
                                                                                                                                                    Severity: Major
                                                                                                                                                    Found in examples/ionic/www/lib/ionic/js/ionic-angular.js - About 45 mins to fix

                                                                                                                                                      Avoid deeply nested control flow statements.
                                                                                                                                                      Open

                                                                                                                                                                  for (y = 0; y < data[k][x].t; y++) {
                                                                                                                                                                    createSvgElement(k, data[k][x].fn(y, spinnerName), ele, spinnerName);
                                                                                                                                                                  }
                                                                                                                                                      Severity: Major
                                                                                                                                                      Found in examples/ionic/www/lib/ionic/js/ionic-angular.js - About 45 mins to fix

                                                                                                                                                        Avoid deeply nested control flow statements.
                                                                                                                                                        Open

                                                                                                                                                                  if (hist.historyId === currentView.historyId) {
                                                                                                                                                                    direction = DIRECTION_FORWARD;
                                                                                                                                                        
                                                                                                                                                                  } else if (currentView.historyId !== hist.historyId) {
                                                                                                                                                                    direction = DIRECTION_ENTER;
                                                                                                                                                        Severity: Major
                                                                                                                                                        Found in examples/ionic/www/lib/ionic/js/ionic-angular.js - About 45 mins to fix

                                                                                                                                                          Avoid deeply nested control flow statements.
                                                                                                                                                          Open

                                                                                                                                                                        if (climbScope.hasOwnProperty('$historyId')) {
                                                                                                                                                                          return true;
                                                                                                                                                                        }
                                                                                                                                                          Severity: Major
                                                                                                                                                          Found in examples/ionic/www/lib/ionic/js/ionic-angular.js - About 45 mins to fix

                                                                                                                                                            Avoid deeply nested control flow statements.
                                                                                                                                                            Open

                                                                                                                                                                      for (y = 0; y < splitClasses.length; y++) {
                                                                                                                                                                        cssClass = splitClasses[y].trim();
                                                                                                                                                                        if (existingClasses.indexOf(' ' + cssClass + ' ') === -1) {
                                                                                                                                                                          existingClasses += cssClass + ' ';
                                                                                                                                                                        }
                                                                                                                                                            Severity: Major
                                                                                                                                                            Found in examples/ionic/www/lib/ionic/js/ionic-angular.js - About 45 mins to fix

                                                                                                                                                              Avoid deeply nested control flow statements.
                                                                                                                                                              Open

                                                                                                                                                                          if (tmp && tmp.parentHistoryId === hist.parentHistoryId) {
                                                                                                                                                                            direction = DIRECTION_SWAP;
                                                                                                                                                                          }
                                                                                                                                                              Severity: Major
                                                                                                                                                              Found in examples/ionic/www/lib/ionic/js/ionic-angular.js - About 45 mins to fix

                                                                                                                                                                Avoid deeply nested control flow statements.
                                                                                                                                                                Open

                                                                                                                                                                              if (!foundHistoryId) {
                                                                                                                                                                                return true;
                                                                                                                                                                              }
                                                                                                                                                                Severity: Major
                                                                                                                                                                Found in examples/ionic/www/lib/ionic/js/ionic-angular.js - About 45 mins to fix

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

                                                                                                                                                                      create: function(navViewCtrl, viewLocals, enteringView, leavingView, renderStart, renderEnd) {
                                                                                                                                                                  Severity: Minor
                                                                                                                                                                  Found in examples/ionic/www/lib/ionic/js/ionic-angular.js - About 45 mins to fix

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

                                                                                                                                                                      self.render = function(registerData, viewLocals, enteringView, leavingView, renderStart, renderEnd) {
                                                                                                                                                                    Severity: Minor
                                                                                                                                                                    Found in examples/ionic/www/lib/ionic/js/ionic-angular.js - About 45 mins to fix

                                                                                                                                                                      Consider simplifying this complex logical expression.
                                                                                                                                                                      Open

                                                                                                                                                                          if ((isBackShown && isNavBackShown && isBackEnabled) !== isBackElementShown) {
                                                                                                                                                                            isBackElementShown = isBackShown && isNavBackShown && isBackEnabled;
                                                                                                                                                                            ele = getEle(BACK_BUTTON);
                                                                                                                                                                            ele && ele.classList[ isBackElementShown ? 'remove' : 'add' ](HIDE);
                                                                                                                                                                          }
                                                                                                                                                                      Severity: Major
                                                                                                                                                                      Found in examples/ionic/www/lib/ionic/js/ionic-angular.js - About 40 mins to fix

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

                                                                                                                                                                          function postLink(scope, element, attr, scrollCtrl, transclude) {
                                                                                                                                                                        Severity: Minor
                                                                                                                                                                        Found in examples/ionic/www/lib/ionic/js/ionic-angular.js - About 35 mins to fix

                                                                                                                                                                          Avoid too many return statements within this function.
                                                                                                                                                                          Open

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

                                                                                                                                                                            Avoid too many return statements within this function.
                                                                                                                                                                            Open

                                                                                                                                                                                  return currentHistoryId ? currentHistoryId == 'root' : true;
                                                                                                                                                                            Severity: Major
                                                                                                                                                                            Found in examples/ionic/www/lib/ionic/js/ionic-angular.js - About 30 mins to fix

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

                                                                                                                                                                                  function HorizontalViewType() {
                                                                                                                                                                                    this.getItemPrimarySize = widthGetter;
                                                                                                                                                                                    this.getItemSecondarySize = heightGetter;
                                                                                                                                                                              
                                                                                                                                                                                    this.getScrollValue = function() {
                                                                                                                                                                              Severity: Major
                                                                                                                                                                              Found in examples/ionic/www/lib/ionic/js/ionic-angular.js and 1 other location - About 7 hrs to fix
                                                                                                                                                                              examples/ionic/www/lib/ionic/js/ionic-angular.js on lines 9084..9103

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

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

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

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

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

                                                                                                                                                                              Refactorings

                                                                                                                                                                              Further Reading

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

                                                                                                                                                                                  function VerticalViewType() {
                                                                                                                                                                                    this.getItemPrimarySize = heightGetter;
                                                                                                                                                                                    this.getItemSecondarySize = widthGetter;
                                                                                                                                                                              
                                                                                                                                                                                    this.getScrollValue = function() {
                                                                                                                                                                              Severity: Major
                                                                                                                                                                              Found in examples/ionic/www/lib/ionic/js/ionic-angular.js and 1 other location - About 7 hrs to fix
                                                                                                                                                                              examples/ionic/www/lib/ionic/js/ionic-angular.js on lines 9104..9123

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

                                                                                                                                                                              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

                                                                                                                                                                                        $scope.$watch(function() {
                                                                                                                                                                                          return listCtrl.showDelete();
                                                                                                                                                                                        }, function(isShown, wasShown) {
                                                                                                                                                                                          //Only use isShown=false if it was already shown
                                                                                                                                                                                          if (!isShown && !wasShown) { return; }
                                                                                                                                                                              Severity: Major
                                                                                                                                                                              Found in examples/ionic/www/lib/ionic/js/ionic-angular.js and 1 other location - About 5 hrs to fix
                                                                                                                                                                              examples/ionic/www/lib/ionic/js/ionic-angular.js on lines 10749..10763

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

                                                                                                                                                                              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

                                                                                                                                                                                        $scope.$watch(function() {
                                                                                                                                                                                          return listCtrl.showReorder();
                                                                                                                                                                                        }, function(isShown, wasShown) {
                                                                                                                                                                                          //Only use isShown=false if it was already shown
                                                                                                                                                                                          if (!isShown && !wasShown) { return; }
                                                                                                                                                                              Severity: Major
                                                                                                                                                                              Found in examples/ionic/www/lib/ionic/js/ionic-angular.js and 1 other location - About 5 hrs to fix
                                                                                                                                                                              examples/ionic/www/lib/ionic/js/ionic-angular.js on lines 10733..10747

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

                                                                                                                                                                              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

                                                                                                                                                                                    forEach({
                                                                                                                                                                                      'name': attr.name,
                                                                                                                                                                                      'ng-value': attr.ngValue,
                                                                                                                                                                                      'ng-model': attr.ngModel,
                                                                                                                                                                                      'ng-checked': attr.ngChecked,
                                                                                                                                                                              Severity: Major
                                                                                                                                                                              Found in examples/ionic/www/lib/ionic/js/ionic-angular.js and 1 other location - About 4 hrs to fix
                                                                                                                                                                              examples/ionic/www/lib/ionic/js/ionic-angular.js on lines 13162..13177

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

                                                                                                                                                                              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

                                                                                                                                                                                    forEach({
                                                                                                                                                                                      'name': attr.name,
                                                                                                                                                                                      'ng-value': attr.ngValue,
                                                                                                                                                                                      'ng-model': attr.ngModel,
                                                                                                                                                                                      'ng-checked': attr.ngChecked,
                                                                                                                                                                              Severity: Major
                                                                                                                                                                              Found in examples/ionic/www/lib/ionic/js/ionic-angular.js and 1 other location - About 4 hrs to fix
                                                                                                                                                                              examples/ionic/www/lib/ionic/js/ionic-angular.js on lines 8327..8342

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

                                                                                                                                                                              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 (currentView) {
                                                                                                                                                                                        direction = DIRECTION_EXIT;
                                                                                                                                                                              
                                                                                                                                                                                        tmp = getHistoryById(backView.historyId);
                                                                                                                                                                                        if (tmp && tmp.parentHistoryId === currentView.historyId) {
                                                                                                                                                                              Severity: Major
                                                                                                                                                                              Found in examples/ionic/www/lib/ionic/js/ionic-angular.js and 1 other location - About 3 hrs to fix
                                                                                                                                                                              examples/ionic/www/lib/ionic/js/ionic-angular.js on lines 930..943

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

                                                                                                                                                                              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 (currentView.historyId !== hist.historyId) {
                                                                                                                                                                                          direction = DIRECTION_ENTER;
                                                                                                                                                                              
                                                                                                                                                                                          tmp = getHistoryById(currentView.historyId);
                                                                                                                                                                                          if (tmp && tmp.parentHistoryId === hist.parentHistoryId) {
                                                                                                                                                                              Severity: Major
                                                                                                                                                                              Found in examples/ionic/www/lib/ionic/js/ionic-angular.js and 1 other location - About 3 hrs to fix
                                                                                                                                                                              examples/ionic/www/lib/ionic/js/ionic-angular.js on lines 813..826

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

                                                                                                                                                                              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

                                                                                                                                                                                    return {
                                                                                                                                                                                      pre: function($scope, $element, $attrs, navBarCtrl) {
                                                                                                                                                                                        // only register the plain HTML, the navBarCtrl takes care of scope/compile/link
                                                                                                                                                                              
                                                                                                                                                                                        var parentViewCtrl = $element.parent().data('$ionViewController');
                                                                                                                                                                              Severity: Major
                                                                                                                                                                              Found in examples/ionic/www/lib/ionic/js/ionic-angular.js and 1 other location - About 3 hrs to fix
                                                                                                                                                                              examples/ionic/www/lib/ionic/js/ionic-angular.js on lines 11172..11188

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

                                                                                                                                                                              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

                                                                                                                                                                                    return {
                                                                                                                                                                                      pre: function($scope, $element, $attrs, navBarCtrl) {
                                                                                                                                                                                        // only register the plain HTML, the navBarCtrl takes care of scope/compile/link
                                                                                                                                                                              
                                                                                                                                                                                        var parentViewCtrl = $element.parent().data('$ionViewController');
                                                                                                                                                                              Severity: Major
                                                                                                                                                                              Found in examples/ionic/www/lib/ionic/js/ionic-angular.js and 1 other location - About 3 hrs to fix
                                                                                                                                                                              examples/ionic/www/lib/ionic/js/ionic-angular.js on lines 11274..11290

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

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

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

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

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

                                                                                                                                                                              Refactorings

                                                                                                                                                                              Further Reading

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

                                                                                                                                                                                        function widthGetter(scope, locals) {
                                                                                                                                                                                          var result = parsedValue(scope, locals);
                                                                                                                                                                                          if (result.charAt && result.charAt(result.length - 1) === '%') {
                                                                                                                                                                                            return Math.floor(parseInt(result) / 100 * scrollView.__clientWidth);
                                                                                                                                                                                          }
                                                                                                                                                                              Severity: Major
                                                                                                                                                                              Found in examples/ionic/www/lib/ionic/js/ionic-angular.js and 1 other location - About 2 hrs to fix
                                                                                                                                                                              examples/ionic/www/lib/ionic/js/ionic-angular.js on lines 8705..8711

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

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

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

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

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

                                                                                                                                                                              Refactorings

                                                                                                                                                                              Further Reading

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

                                                                                                                                                                                        function heightGetter(scope, locals) {
                                                                                                                                                                                          var result = parsedValue(scope, locals);
                                                                                                                                                                                          if (result.charAt && result.charAt(result.length - 1) === '%') {
                                                                                                                                                                                            return Math.floor(parseInt(result) / 100 * scrollView.__clientHeight);
                                                                                                                                                                                          }
                                                                                                                                                                              Severity: Major
                                                                                                                                                                              Found in examples/ionic/www/lib/ionic/js/ionic-angular.js and 1 other location - About 2 hrs to fix
                                                                                                                                                                              examples/ionic/www/lib/ionic/js/ionic-angular.js on lines 8712..8718

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

                                                                                                                                                                              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

                                                                                                                                                                              IonicModule
                                                                                                                                                                              .directive('navDirection', ['$ionicViewSwitcher', function($ionicViewSwitcher) {
                                                                                                                                                                                return {
                                                                                                                                                                                  restrict: 'A',
                                                                                                                                                                                  priority: 1000,
                                                                                                                                                                              Severity: Major
                                                                                                                                                                              Found in examples/ionic/www/lib/ionic/js/ionic-angular.js and 1 other location - About 2 hrs to fix
                                                                                                                                                                              examples/ionic/www/lib/ionic/js/ionic-angular.js on lines 11311..11322

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

                                                                                                                                                                              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

                                                                                                                                                                              IonicModule
                                                                                                                                                                              .directive('navTransition', ['$ionicViewSwitcher', function($ionicViewSwitcher) {
                                                                                                                                                                                return {
                                                                                                                                                                                  restrict: 'A',
                                                                                                                                                                                  priority: 1000,
                                                                                                                                                                              Severity: Major
                                                                                                                                                                              Found in examples/ionic/www/lib/ionic/js/ionic-angular.js and 1 other location - About 2 hrs to fix
                                                                                                                                                                              examples/ionic/www/lib/ionic/js/ionic-angular.js on lines 11209..11220

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

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

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

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

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

                                                                                                                                                                              Refactorings

                                                                                                                                                                              Further Reading

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

                                                                                                                                                                                function freezeAllScrolls(shouldFreeze) {
                                                                                                                                                                                  if (shouldFreeze && !self.isScrollFreeze) {
                                                                                                                                                                                    $ionicScrollDelegate.freezeAllScrolls(shouldFreeze);
                                                                                                                                                                              
                                                                                                                                                                                  } else if (!shouldFreeze && self.isScrollFreeze) {
                                                                                                                                                                              Severity: Major
                                                                                                                                                                              Found in examples/ionic/www/lib/ionic/js/ionic-angular.js and 1 other location - About 1 hr to fix
                                                                                                                                                                              examples/ionic/www/lib/ionic/js/ionic-angular.js on lines 12401..12409

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

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

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

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

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

                                                                                                                                                                              Refactorings

                                                                                                                                                                              Further Reading

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

                                                                                                                                                                                    function freezeAllScrolls(shouldFreeze) {
                                                                                                                                                                                      if (shouldFreeze && !_this.isScrollFreeze) {
                                                                                                                                                                                        $ionicScrollDelegate.freezeAllScrolls(shouldFreeze);
                                                                                                                                                                              
                                                                                                                                                                                      } else if (!shouldFreeze && _this.isScrollFreeze) {
                                                                                                                                                                              Severity: Major
                                                                                                                                                                              Found in examples/ionic/www/lib/ionic/js/ionic-angular.js and 1 other location - About 1 hr to fix
                                                                                                                                                                              examples/ionic/www/lib/ionic/js/ionic-angular.js on lines 7243..7251

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

                                                                                                                                                                              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

                                                                                                                                                                                  addClass: function() {
                                                                                                                                                                                    for (var x = 0; x < arguments.length; x++) {
                                                                                                                                                                                      $document[0].body.classList.add(arguments[x]);
                                                                                                                                                                                    }
                                                                                                                                                                                    return this;
                                                                                                                                                                              Severity: Major
                                                                                                                                                                              Found in examples/ionic/www/lib/ionic/js/ionic-angular.js and 1 other location - About 1 hr to fix
                                                                                                                                                                              examples/ionic/www/lib/ionic/js/ionic-angular.js on lines 467..472

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

                                                                                                                                                                              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

                                                                                                                                                                                  removeClass: function() {
                                                                                                                                                                                    for (var x = 0; x < arguments.length; x++) {
                                                                                                                                                                                      $document[0].body.classList.remove(arguments[x]);
                                                                                                                                                                                    }
                                                                                                                                                                                    return this;
                                                                                                                                                                              Severity: Major
                                                                                                                                                                              Found in examples/ionic/www/lib/ionic/js/ionic-angular.js and 1 other location - About 1 hr to fix
                                                                                                                                                                              examples/ionic/www/lib/ionic/js/ionic-angular.js on lines 454..459

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

                                                                                                                                                                              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.showBackButton = function(shouldShow) {
                                                                                                                                                                                  var associatedNavBarCtrl = getAssociatedNavBarCtrl();
                                                                                                                                                                                  if (associatedNavBarCtrl) {
                                                                                                                                                                                    if (arguments.length) {
                                                                                                                                                                                      return associatedNavBarCtrl.showActiveBackButton(shouldShow);
                                                                                                                                                                              Severity: Major
                                                                                                                                                                              Found in examples/ionic/www/lib/ionic/js/ionic-angular.js and 1 other location - About 1 hr to fix
                                                                                                                                                                              examples/ionic/www/lib/ionic/js/ionic-angular.js on lines 6391..6400

                                                                                                                                                                              Duplicated Code

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

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

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

                                                                                                                                                                              Tuning

                                                                                                                                                                              This issue has a mass of 68.

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

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

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

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

                                                                                                                                                                              Refactorings

                                                                                                                                                                              Further Reading

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

                                                                                                                                                                                self.showBar = function(val) {
                                                                                                                                                                                  var associatedNavBarCtrl = getAssociatedNavBarCtrl();
                                                                                                                                                                                  if (associatedNavBarCtrl) {
                                                                                                                                                                                    if (arguments.length) {
                                                                                                                                                                                      return associatedNavBarCtrl.showBar(val);
                                                                                                                                                                              Severity: Major
                                                                                                                                                                              Found in examples/ionic/www/lib/ionic/js/ionic-angular.js and 1 other location - About 1 hr to fix
                                                                                                                                                                              examples/ionic/www/lib/ionic/js/ionic-angular.js on lines 6379..6388

                                                                                                                                                                              Duplicated Code

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

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

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

                                                                                                                                                                              Tuning

                                                                                                                                                                              This issue has a mass of 68.

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

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

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

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

                                                                                                                                                                              Refactorings

                                                                                                                                                                              Further Reading

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

                                                                                                                                                                                    left: computedStyle.overflowX === 'scroll' ||
                                                                                                                                                                                    computedStyle.overflowX === 'auto' ||
                                                                                                                                                                                    self.scrollEl.style['overflow-x'] === 'scroll' ?
                                                                                                                                                                                      calculateMaxValue(maxValues.left) : -1,
                                                                                                                                                                              Severity: Major
                                                                                                                                                                              Found in examples/ionic/www/lib/ionic/js/ionic-angular.js and 1 other location - About 1 hr to fix
                                                                                                                                                                              examples/ionic/www/lib/ionic/js/ionic-angular.js on lines 5425..5428

                                                                                                                                                                              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

                                                                                                                                                                                    top: computedStyle.overflowY === 'scroll' ||
                                                                                                                                                                                    computedStyle.overflowY === 'auto' ||
                                                                                                                                                                                    self.scrollEl.style['overflow-y'] === 'scroll' ?
                                                                                                                                                                                      calculateMaxValue(maxValues.top) : -1
                                                                                                                                                                              Severity: Major
                                                                                                                                                                              Found in examples/ionic/www/lib/ionic/js/ionic-angular.js and 1 other location - About 1 hr to fix
                                                                                                                                                                              examples/ionic/www/lib/ionic/js/ionic-angular.js on lines 5421..5424

                                                                                                                                                                              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

                                                                                                                                                                                self.zoomTo = function(zoom, shouldAnimate, originLeft, originTop) {
                                                                                                                                                                                  self.resize().then(function() {
                                                                                                                                                                                    scrollView.zoomTo(zoom, !!shouldAnimate, originLeft, originTop);
                                                                                                                                                                                  });
                                                                                                                                                                                };
                                                                                                                                                                              Severity: Major
                                                                                                                                                                              Found in examples/ionic/www/lib/ionic/js/ionic-angular.js and 1 other location - About 1 hr to fix
                                                                                                                                                                              examples/ionic/www/lib/ionic/js/ionic-angular.js on lines 7034..7038

                                                                                                                                                                              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

                                                                                                                                                                                self.zoomBy = function(zoom, shouldAnimate, originLeft, originTop) {
                                                                                                                                                                                  self.resize().then(function() {
                                                                                                                                                                                    scrollView.zoomBy(zoom, !!shouldAnimate, originLeft, originTop);
                                                                                                                                                                                  });
                                                                                                                                                                                };
                                                                                                                                                                              Severity: Major
                                                                                                                                                                              Found in examples/ionic/www/lib/ionic/js/ionic-angular.js and 1 other location - About 1 hr to fix
                                                                                                                                                                              examples/ionic/www/lib/ionic/js/ionic-angular.js on lines 7028..7032

                                                                                                                                                                              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

                                                                                                                                                                                self.scrollBy = function(left, top, shouldAnimate) {
                                                                                                                                                                                  self.resize().then(function() {
                                                                                                                                                                                    scrollView.scrollBy(left, top, !!shouldAnimate);
                                                                                                                                                                                  });
                                                                                                                                                                                };
                                                                                                                                                                              Severity: Major
                                                                                                                                                                              Found in examples/ionic/www/lib/ionic/js/ionic-angular.js and 1 other location - About 1 hr to fix
                                                                                                                                                                              examples/ionic/www/lib/ionic/js/ionic-angular.js on lines 7022..7026

                                                                                                                                                                              Duplicated Code

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

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

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

                                                                                                                                                                              Tuning

                                                                                                                                                                              This issue has a mass of 59.

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

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

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

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

                                                                                                                                                                              Refactorings

                                                                                                                                                                              Further Reading

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

                                                                                                                                                                                self.scrollTo = function(left, top, shouldAnimate) {
                                                                                                                                                                                  self.resize().then(function() {
                                                                                                                                                                                    scrollView.scrollTo(left, top, !!shouldAnimate);
                                                                                                                                                                                  });
                                                                                                                                                                                };
                                                                                                                                                                              Severity: Major
                                                                                                                                                                              Found in examples/ionic/www/lib/ionic/js/ionic-angular.js and 1 other location - About 1 hr to fix
                                                                                                                                                                              examples/ionic/www/lib/ionic/js/ionic-angular.js on lines 7040..7044

                                                                                                                                                                              Duplicated Code

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

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

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

                                                                                                                                                                              Tuning

                                                                                                                                                                              This issue has a mass of 59.

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

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

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

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

                                                                                                                                                                              Refactorings

                                                                                                                                                                              Further Reading

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

                                                                                                                                                                                self.enableBack = function(shouldEnable, disableReset) {
                                                                                                                                                                                  // whether or not the back button show be visible, according
                                                                                                                                                                                  // to the navigation and history
                                                                                                                                                                                  if (arguments.length) {
                                                                                                                                                                                    isBackEnabled = shouldEnable;
                                                                                                                                                                              Severity: Major
                                                                                                                                                                              Found in examples/ionic/www/lib/ionic/js/ionic-angular.js and 1 other location - About 1 hr to fix
                                                                                                                                                                              examples/ionic/www/lib/ionic/js/ionic-angular.js on lines 5001..5009

                                                                                                                                                                              Duplicated Code

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

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

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

                                                                                                                                                                              Tuning

                                                                                                                                                                              This issue has a mass of 58.

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

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

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

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

                                                                                                                                                                              Refactorings

                                                                                                                                                                              Further Reading

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

                                                                                                                                                                                self.showBack = function(shouldShow, disableReset) {
                                                                                                                                                                                  // different from enableBack() because this will always have the back
                                                                                                                                                                                  // visually hidden if false, even if the history says it should show
                                                                                                                                                                                  if (arguments.length) {
                                                                                                                                                                                    isBackShown = shouldShow;
                                                                                                                                                                              Severity: Major
                                                                                                                                                                              Found in examples/ionic/www/lib/ionic/js/ionic-angular.js and 1 other location - About 1 hr to fix
                                                                                                                                                                              examples/ionic/www/lib/ionic/js/ionic-angular.js on lines 4990..4998

                                                                                                                                                                              Duplicated Code

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

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

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

                                                                                                                                                                              Tuning

                                                                                                                                                                              This issue has a mass of 58.

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

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

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

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

                                                                                                                                                                              Refactorings

                                                                                                                                                                              Further Reading

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

                                                                                                                                                                                  if (isDefined($attrs.hideBackButton)) {
                                                                                                                                                                                    deregisters.push($scope.$watch($attrs.hideBackButton, function(val) {
                                                                                                                                                                                      navViewCtrl.showBackButton(!val);
                                                                                                                                                                                    }));
                                                                                                                                                                                  }
                                                                                                                                                                              Severity: Major
                                                                                                                                                                              Found in examples/ionic/www/lib/ionic/js/ionic-angular.js and 1 other location - About 1 hr to fix
                                                                                                                                                                              examples/ionic/www/lib/ionic/js/ionic-angular.js on lines 8198..8202

                                                                                                                                                                              Duplicated Code

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

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

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

                                                                                                                                                                              Tuning

                                                                                                                                                                              This issue has a mass of 58.

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

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

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

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

                                                                                                                                                                              Refactorings

                                                                                                                                                                              Further Reading

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

                                                                                                                                                                                  if (isDefined($attrs.hideNavBar)) {
                                                                                                                                                                                    deregisters.push($scope.$watch($attrs.hideNavBar, function(val) {
                                                                                                                                                                                      navViewCtrl.showBar(!val);
                                                                                                                                                                                    }));
                                                                                                                                                                                  }
                                                                                                                                                                              Severity: Major
                                                                                                                                                                              Found in examples/ionic/www/lib/ionic/js/ionic-angular.js and 1 other location - About 1 hr to fix
                                                                                                                                                                              examples/ionic/www/lib/ionic/js/ionic-angular.js on lines 8192..8196

                                                                                                                                                                              Duplicated Code

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

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

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

                                                                                                                                                                              Tuning

                                                                                                                                                                              This issue has a mass of 58.

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

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

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

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

                                                                                                                                                                              Refactorings

                                                                                                                                                                              Further Reading

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

                                                                                                                                                                                  template: '<div class="action-sheet-backdrop">' +
                                                                                                                                                                                              '<div class="action-sheet-wrapper">' +
                                                                                                                                                                                                '<div class="action-sheet" ng-class="{\'action-sheet-has-icons\': $actionSheetHasIcon}">' +
                                                                                                                                                                                                  '<div class="action-sheet-group action-sheet-options">' +
                                                                                                                                                                                                    '<div class="action-sheet-title" ng-if="titleText" ng-bind-html="titleText"></div>' +
                                                                                                                                                                              Severity: Major
                                                                                                                                                                              Found in examples/ionic/www/lib/ionic/js/ionic-angular.js and 1 other location - About 1 hr to fix
                                                                                                                                                                              examples/ionic/www/lib/ionic/js/ionic-angular.js on lines 11765..11779

                                                                                                                                                                              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

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

                                                                                                                                                                                  template:
                                                                                                                                                                                  '<div class="scroll-refresher invisible" collection-repeat-ignore>' +
                                                                                                                                                                                    '<div class="ionic-refresher-content" ' +
                                                                                                                                                                                    'ng-class="{\'ionic-refresher-with-text\': pullingText || refreshingText}">' +
                                                                                                                                                                                      '<div class="icon-pulling" ng-class="{\'pulling-rotation-disabled\':disablePullingRotation}">' +
                                                                                                                                                                              Severity: Major
                                                                                                                                                                              Found in examples/ionic/www/lib/ionic/js/ionic-angular.js and 1 other location - About 1 hr to fix
                                                                                                                                                                              examples/ionic/www/lib/ionic/js/ionic-angular.js on lines 8275..8288

                                                                                                                                                                              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

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

                                                                                                                                                                                        if (isDefined($attr.canSwipe)) {
                                                                                                                                                                                          $scope.$watch('!!(' + $attr.canSwipe + ')', function(value) {
                                                                                                                                                                                            listCtrl.canSwipeItems(value);
                                                                                                                                                                                          });
                                                                                                                                                                                        }
                                                                                                                                                                              Severity: Major
                                                                                                                                                                              Found in examples/ionic/www/lib/ionic/js/ionic-angular.js and 2 other locations - About 1 hr to fix
                                                                                                                                                                              examples/ionic/www/lib/ionic/js/ionic-angular.js on lines 10722..10726
                                                                                                                                                                              examples/ionic/www/lib/ionic/js/ionic-angular.js on lines 10727..10731

                                                                                                                                                                              Duplicated Code

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

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

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

                                                                                                                                                                              Tuning

                                                                                                                                                                              This issue has a mass of 56.

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

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

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

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

                                                                                                                                                                              Refactorings

                                                                                                                                                                              Further Reading

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

                                                                                                                                                                                        if (isDefined($attr.showDelete)) {
                                                                                                                                                                                          $scope.$watch('!!(' + $attr.showDelete + ')', function(value) {
                                                                                                                                                                                            listCtrl.showDelete(value);
                                                                                                                                                                                          });
                                                                                                                                                                                        }
                                                                                                                                                                              Severity: Major
                                                                                                                                                                              Found in examples/ionic/www/lib/ionic/js/ionic-angular.js and 2 other locations - About 1 hr to fix
                                                                                                                                                                              examples/ionic/www/lib/ionic/js/ionic-angular.js on lines 10717..10721
                                                                                                                                                                              examples/ionic/www/lib/ionic/js/ionic-angular.js on lines 10727..10731

                                                                                                                                                                              Duplicated Code

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

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

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

                                                                                                                                                                              Tuning

                                                                                                                                                                              This issue has a mass of 56.

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

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

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

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

                                                                                                                                                                              Refactorings

                                                                                                                                                                              Further Reading

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

                                                                                                                                                                                        if (isDefined($attr.showReorder)) {
                                                                                                                                                                                          $scope.$watch('!!(' + $attr.showReorder + ')', function(value) {
                                                                                                                                                                                            listCtrl.showReorder(value);
                                                                                                                                                                                          });
                                                                                                                                                                                        }
                                                                                                                                                                              Severity: Major
                                                                                                                                                                              Found in examples/ionic/www/lib/ionic/js/ionic-angular.js and 2 other locations - About 1 hr to fix
                                                                                                                                                                              examples/ionic/www/lib/ionic/js/ionic-angular.js on lines 10717..10721
                                                                                                                                                                              examples/ionic/www/lib/ionic/js/ionic-angular.js on lines 10722..10726

                                                                                                                                                                              Duplicated Code

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

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

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

                                                                                                                                                                              Tuning

                                                                                                                                                                              This issue has a mass of 56.

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

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

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

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

                                                                                                                                                                              Refactorings

                                                                                                                                                                              Further Reading

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

                                                                                                                                                                                          a: [{
                                                                                                                                                                                            fn: function() {
                                                                                                                                                                                              return {
                                                                                                                                                                                                an: 'r',
                                                                                                                                                                                                dur: DURATION,
                                                                                                                                                                              Severity: Minor
                                                                                                                                                                              Found in examples/ionic/www/lib/ionic/js/ionic-angular.js and 1 other location - About 50 mins to fix
                                                                                                                                                                              examples/ionic/www/lib/ionic/js/ionic-angular.js on lines 7685..7695

                                                                                                                                                                              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

                                                                                                                                                                                          a: [{
                                                                                                                                                                                            fn: function() {
                                                                                                                                                                                              return {
                                                                                                                                                                                                an: 'fill-opacity',
                                                                                                                                                                                                dur: DURATION,
                                                                                                                                                                              Severity: Minor
                                                                                                                                                                              Found in examples/ionic/www/lib/ionic/js/ionic-angular.js and 1 other location - About 50 mins to fix
                                                                                                                                                                              examples/ionic/www/lib/ionic/js/ionic-angular.js on lines 7658..7668

                                                                                                                                                                              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

                                                                                                                                                                                    if (hasData && heightData.computed) {
                                                                                                                                                                                      heightData.value = computedStyleDimensions.height;
                                                                                                                                                                                      if (!heightData.value) {
                                                                                                                                                                                        throw new Error('collection-repeat tried to compute the height of repeated elements "' +
                                                                                                                                                                                          repeatExpr + '", but was unable to. Please provide the "item-height" attribute. ' +
                                                                                                                                                                              Severity: Minor
                                                                                                                                                                              Found in examples/ionic/www/lib/ionic/js/ionic-angular.js and 1 other location - About 50 mins to fix
                                                                                                                                                                              examples/ionic/www/lib/ionic/js/ionic-angular.js on lines 8650..8660

                                                                                                                                                                              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

                                                                                                                                                                                    if (hasData && widthData.computed) {
                                                                                                                                                                                      widthData.value = computedStyleDimensions.width;
                                                                                                                                                                                      if (!widthData.value) {
                                                                                                                                                                                        throw new Error('collection-repeat tried to compute the width of repeated elements "' +
                                                                                                                                                                                          repeatExpr + '", but was unable to. Please provide the "item-width" attribute. ' +
                                                                                                                                                                              Severity: Minor
                                                                                                                                                                              Found in examples/ionic/www/lib/ionic/js/ionic-angular.js and 1 other location - About 50 mins to fix
                                                                                                                                                                              examples/ionic/www/lib/ionic/js/ionic-angular.js on lines 8638..8648

                                                                                                                                                                              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

                                                                                                                                                                                          if (scope) {
                                                                                                                                                                                            scope.$emit('$ionicView.' + step + 'Leave', leavingData);
                                                                                                                                                                                            if (step == 'after') {
                                                                                                                                                                                              scope.$emit('$ionicView.leave', leavingData);
                                                                                                                                                                                            }
                                                                                                                                                                              Severity: Minor
                                                                                                                                                                              Found in examples/ionic/www/lib/ionic/js/ionic-angular.js and 1 other location - About 45 mins to fix
                                                                                                                                                                              examples/ionic/www/lib/ionic/js/ionic-angular.js on lines 4709..4714

                                                                                                                                                                              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 (scope) {
                                                                                                                                                                                          scope.$emit('$ionicView.' + step + 'Enter', enteringData);
                                                                                                                                                                                          if (step == 'after') {
                                                                                                                                                                                            scope.$emit('$ionicView.enter', enteringData);
                                                                                                                                                                                          }
                                                                                                                                                                              Severity: Minor
                                                                                                                                                                              Found in examples/ionic/www/lib/ionic/js/ionic-angular.js and 1 other location - About 45 mins to fix
                                                                                                                                                                              examples/ionic/www/lib/ionic/js/ionic-angular.js on lines 4718..4723

                                                                                                                                                                              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

                                                                                                                                                                                      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-angular.js and 1 other location - About 40 mins to fix
                                                                                                                                                                              examples/ionic/www/lib/ionic/js/ionic.js on lines 7079..7083

                                                                                                                                                                              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

                                                                                                                                                                                  } else if (textAlign == 'right') {
                                                                                                                                                                                    updateCss = 'title-right';
                                                                                                                                                                                    if (buttonsLeft) {
                                                                                                                                                                                      updateTitleLeft = buttonsLeft + 15;
                                                                                                                                                                                    }
                                                                                                                                                                              Severity: Minor
                                                                                                                                                                              Found in examples/ionic/www/lib/ionic/js/ionic-angular.js and 1 other location - About 35 mins to fix
                                                                                                                                                                              examples/ionic/www/lib/ionic/js/ionic-angular.js on lines 5215..5239

                                                                                                                                                                              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 (textAlign == 'left') {
                                                                                                                                                                                    updateCss = 'title-left';
                                                                                                                                                                                    if (buttonsLeft) {
                                                                                                                                                                                      updateTitleLeft = buttonsLeft + 15;
                                                                                                                                                                                    }
                                                                                                                                                                              Severity: Minor
                                                                                                                                                                              Found in examples/ionic/www/lib/ionic/js/ionic-angular.js and 1 other location - About 35 mins to fix
                                                                                                                                                                              examples/ionic/www/lib/ionic/js/ionic-angular.js on lines 5224..5239

                                                                                                                                                                              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

                                                                                                                                                                                        a: [{
                                                                                                                                                                                          fn: function() {
                                                                                                                                                                                            return {
                                                                                                                                                                                              an: STROKE_OPACITY,
                                                                                                                                                                                              dur: DURATION,
                                                                                                                                                                              Severity: Minor
                                                                                                                                                                              Found in examples/ionic/www/lib/ionic/js/ionic-angular.js and 1 other location - About 35 mins to fix
                                                                                                                                                                              examples/ionic/www/lib/ionic/js/ionic-angular.js on lines 7778..7788

                                                                                                                                                                              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

                                                                                                                                                                                          }, {
                                                                                                                                                                                            fn: function() {
                                                                                                                                                                                              return {
                                                                                                                                                                                                an: STROKE_OPACITY,
                                                                                                                                                                                                dur: DURATION,
                                                                                                                                                                              Severity: Minor
                                                                                                                                                                              Found in examples/ionic/www/lib/ionic/js/ionic-angular.js and 1 other location - About 35 mins to fix
                                                                                                                                                                              examples/ionic/www/lib/ionic/js/ionic-angular.js on lines 7615..7625

                                                                                                                                                                              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

                                                                                                                                                                              There are no issues that match your filters.

                                                                                                                                                                              Category
                                                                                                                                                                              Status