arey/angular-musicbrainz

View on GitHub
app/lib/angular-ui-bootstrap-bower/ui-bootstrap.js

Summary

Maintainability
F
5 mos
Test Coverage

File ui-bootstrap.js has 2455 lines of code (exceeds 250 allowed). Consider refactoring.
Open

/*
 * angular-ui-bootstrap
 * http://angular-ui.github.io/bootstrap/

 * Version: 0.10.0 - 2014-01-13
Severity: Major
Found in app/lib/angular-ui-bootstrap-bower/ui-bootstrap.js - About 6 days to fix

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

      this.$get = [ '$window', '$compile', '$timeout', '$parse', '$document', '$position', '$interpolate', function ( $window, $compile, $timeout, $parse, $document, $position, $interpolate ) {
        return function $tooltip ( type, prefix, defaultTriggerShow ) {
          var options = angular.extend( {}, defaultOptions, globalOptions );
    
          /**
    Severity: Major
    Found in app/lib/angular-ui-bootstrap-bower/ui-bootstrap.js - About 7 hrs to fix

      Function $tooltip has 191 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          return function $tooltip ( type, prefix, defaultTriggerShow ) {
            var options = angular.extend( {}, defaultOptions, globalOptions );
      
            /**
             * Returns an object of show and hide triggers.
      Severity: Major
      Found in app/lib/angular-ui-bootstrap-bower/ui-bootstrap.js - About 7 hrs to fix

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

            link: function(scope, element, attrs, ngModel) {
              if ( !ngModel ) {
                return; // do nothing if no ng-model
              }
        
        
        Severity: Major
        Found in app/lib/angular-ui-bootstrap-bower/ui-bootstrap.js - About 6 hrs to fix

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

                  compile: function (tElem, tAttrs) {
                    var tooltipLinker = $compile( template );
          
                    return function link ( scope, element, attrs ) {
                      var tooltip;
          Severity: Major
          Found in app/lib/angular-ui-bootstrap-bower/ui-bootstrap.js - About 6 hrs to fix

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

                link: function(originalScope, element, attrs, ngModel) {
                  var scope = originalScope.$new(), // create a child scope so we are not polluting original one
                      dateFormat,
                      closeOnDateSelection = angular.isDefined(attrs.closeOnDateSelection) ? originalScope.$eval(attrs.closeOnDateSelection) : datepickerPopupConfig.closeOnDateSelection,
                      appendToBody = angular.isDefined(attrs.datepickerAppendToBody) ? originalScope.$eval(attrs.datepickerAppendToBody) : datepickerPopupConfig.appendToBody;
            Severity: Major
            Found in app/lib/angular-ui-bootstrap-bower/ui-bootstrap.js - About 6 hrs to fix

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

                        return function link ( scope, element, attrs ) {
                          var tooltip;
                          var transitionTimeout;
                          var popupTimeout;
                          var appendToBody = angular.isDefined( options.appendToBody ) ? options.appendToBody : false;
              Severity: Major
              Found in app/lib/angular-ui-bootstrap-bower/ui-bootstrap.js - About 6 hrs to fix

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

                    link:function (originalScope, element, attrs, modelCtrl) {
                
                      //SUPPORTED ATTRIBUTES (OPTIONS)
                
                      //minimal no of characters that needs to be entered before typeahead kicks-in
                Severity: Major
                Found in app/lib/angular-ui-bootstrap-bower/ui-bootstrap.js - About 6 hrs to fix

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

                      link: function(scope, element, attrs, ctrls) {
                        var datepickerCtrl = ctrls[0], ngModel = ctrls[1];
                  
                        if (!ngModel) {
                          return; // do nothing if no ng-model
                  Severity: Major
                  Found in app/lib/angular-ui-bootstrap-bower/ui-bootstrap.js - About 3 hrs to fix

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

                            function ($injector, $rootScope, $q, $http, $templateCache, $controller, $modalStack) {
                    
                              var $modal = {};
                    
                              function getTemplatePromise(options) {
                    Severity: Major
                    Found in app/lib/angular-ui-bootstrap-bower/ui-bootstrap.js - About 2 hrs to fix

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

                          link: function(scope, element, attrs, paginationCtrl) {
                      
                            // Setup configuration parameters
                            var maxSize,
                            boundaryLinks  = paginationCtrl.getAttributeValue(attrs.boundaryLinks,  config.boundaryLinks      ),
                      Severity: Major
                      Found in app/lib/angular-ui-bootstrap-bower/ui-bootstrap.js - About 2 hrs to fix

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

                              link: function (scope, element, attrs) {
                        
                                var initialAnimSkip = true;
                                var currentTransition;
                        
                        
                        Severity: Major
                        Found in app/lib/angular-ui-bootstrap-bower/ui-bootstrap.js - About 2 hrs to fix

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

                                    $modal.open = function (modalOptions) {
                          
                                      var modalResultDeferred = $q.defer();
                                      var modalOpenedDeferred = $q.defer();
                          
                          
                          Severity: Minor
                          Found in app/lib/angular-ui-bootstrap-bower/ui-bootstrap.js - About 2 hrs to fix

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

                                  paginationCtrl.getPages = function(currentPage, totalPages) {
                                    var pages = [];
                            
                                    // Default page limits
                                    var startPage = 1, endPage = totalPages;
                            Severity: Minor
                            Found in app/lib/angular-ui-bootstrap-bower/ui-bootstrap.js - About 1 hr to fix

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

                                    createNew: function () {
                                      var stack = [];
                              
                                      return {
                                        add: function (key, value) {
                              Severity: Minor
                              Found in app/lib/angular-ui-bootstrap-bower/ui-bootstrap.js - About 1 hr to fix

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

                                  self.select = function(nextSlide, direction) {
                                    var nextIndex = slides.indexOf(nextSlide);
                                    //Decide direction if it's not given
                                    if (direction === undefined) {
                                      direction = nextIndex > currentIndex ? "next" : "prev";
                                Severity: Minor
                                Found in app/lib/angular-ui-bootstrap-bower/ui-bootstrap.js - About 1 hr to fix

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

                                      compile: function(elm, attrs, transclude) {
                                        return function postLink(scope, elm, attrs, tabsetCtrl) {
                                          var getActive, setActive;
                                          if (attrs.active) {
                                            getActive = $parse(attrs.active);
                                  Severity: Minor
                                  Found in app/lib/angular-ui-bootstrap-bower/ui-bootstrap.js - About 1 hr to fix

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

                                          return function postLink(scope, elm, attrs, tabsetCtrl) {
                                            var getActive, setActive;
                                            if (attrs.active) {
                                              getActive = $parse(attrs.active);
                                              setActive = getActive.assign;
                                    Severity: Minor
                                    Found in app/lib/angular-ui-bootstrap-bower/ui-bootstrap.js - About 1 hr to fix

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

                                                  var positionTooltip = function (){
                                                    var position,
                                                      ttWidth,
                                                      ttHeight,
                                                      ttPosition;
                                      Severity: Minor
                                      Found in app/lib/angular-ui-bootstrap-bower/ui-bootstrap.js - About 1 hr to fix

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

                                          var $transition = function(element, trigger, options) {
                                            options = options || {};
                                            var deferred = $q.defer();
                                            var endEventName = $transition[options.animation ? "animationEndEventName" : "transitionEndEventName"];
                                        
                                        
                                        Severity: Minor
                                        Found in app/lib/angular-ui-bootstrap-bower/ui-bootstrap.js - About 1 hr to fix

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

                                                var getMatchesAsync = function(inputValue) {
                                          
                                                  var locals = {$viewValue: inputValue};
                                                  isLoadingSetter(originalScope, true);
                                                  $q.when(parserResult.source(originalScope, locals)).then(function(matches) {
                                          Severity: Minor
                                          Found in app/lib/angular-ui-bootstrap-bower/ui-bootstrap.js - About 1 hr to fix

                                            Function TabsetCtrl has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
                                            Open

                                            .controller('TabsetController', ['$scope', function TabsetCtrl($scope) {
                                              var ctrl = this,
                                                  tabs = ctrl.tabs = $scope.tabs = [];
                                            
                                              ctrl.select = function(tab) {
                                            Severity: Minor
                                            Found in app/lib/angular-ui-bootstrap-bower/ui-bootstrap.js - About 55 mins to fix

                                            Cognitive Complexity

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

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

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

                                            Further reading

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

                                                    function ($injector, $rootScope, $q, $http, $templateCache, $controller, $modalStack) {
                                            Severity: Major
                                            Found in app/lib/angular-ui-bootstrap-bower/ui-bootstrap.js - About 50 mins to fix

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

                                                this.$get = [ '$window', '$compile', '$timeout', '$parse', '$document', '$position', '$interpolate', function ( $window, $compile, $timeout, $parse, $document, $position, $interpolate ) {
                                              Severity: Major
                                              Found in app/lib/angular-ui-bootstrap-bower/ui-bootstrap.js - About 50 mins to fix

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

                                                      function makePage(number, text, isDisabled, isPrevious, isNext) {
                                                Severity: Minor
                                                Found in app/lib/angular-ui-bootstrap-bower/ui-bootstrap.js - About 35 mins to fix

                                                  Avoid too many return statements within this function.
                                                  Open

                                                            return undefined;
                                                  Severity: Major
                                                  Found in app/lib/angular-ui-bootstrap-bower/ui-bootstrap.js - About 30 mins to fix

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

                                                    angular.module('ui.bootstrap.datepicker', ['ui.bootstrap.position'])
                                                    
                                                    .constant('datepickerConfig', {
                                                      dayFormat: 'dd',
                                                      monthFormat: 'MMMM',
                                                    Severity: Major
                                                    Found in app/lib/angular-ui-bootstrap-bower/ui-bootstrap.js and 1 other location - About 1 mo to fix
                                                    app/lib/angular-ui-bootstrap-bower/ui-bootstrap-tpls.js on lines 838..1312

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

                                                    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

                                                    angular.module('ui.bootstrap.modal', ['ui.bootstrap.transition'])
                                                    
                                                    /**
                                                     * A helper, internal data structure that acts as a map but also allows getting / removing
                                                     * elements in the LIFO order
                                                    Severity: Major
                                                    Found in app/lib/angular-ui-bootstrap-bower/ui-bootstrap.js and 1 other location - About 2 wks to fix
                                                    app/lib/angular-ui-bootstrap-bower/ui-bootstrap-tpls.js on lines 1367..1740

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

                                                    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

                                                    angular.module('ui.bootstrap.typeahead', ['ui.bootstrap.position', 'ui.bootstrap.bindHtml'])
                                                    
                                                    /**
                                                     * A helper service that can parse typeahead's syntax (string provided by users)
                                                     * Extracted to a separate service for ease of unit testing
                                                    Severity: Major
                                                    Found in app/lib/angular-ui-bootstrap-bower/ui-bootstrap.js and 1 other location - About 2 wks to fix
                                                    app/lib/angular-ui-bootstrap-bower/ui-bootstrap-tpls.js on lines 3080..3428

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

                                                    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

                                                    angular.module( 'ui.bootstrap.tooltip', [ 'ui.bootstrap.position', 'ui.bootstrap.bindHtml' ] )
                                                    
                                                    /**
                                                     * The $tooltip service creates tooltip- and popover-like directives as well as
                                                     * houses global options for them.
                                                    Severity: Major
                                                    Found in app/lib/angular-ui-bootstrap-bower/ui-bootstrap.js and 1 other location - About 2 wks to fix
                                                    app/lib/angular-ui-bootstrap-bower/ui-bootstrap-tpls.js on lines 1989..2363

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

                                                    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

                                                    angular.module('ui.bootstrap.timepicker', [])
                                                    
                                                    .constant('timepickerConfig', {
                                                      hourStep: 1,
                                                      minuteStep: 1,
                                                    Severity: Major
                                                    Found in app/lib/angular-ui-bootstrap-bower/ui-bootstrap.js and 1 other location - About 1 wk to fix
                                                    app/lib/angular-ui-bootstrap-bower/ui-bootstrap-tpls.js on lines 2846..3078

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

                                                    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

                                                    angular.module('ui.bootstrap.pagination', [])
                                                    
                                                    .controller('PaginationController', ['$scope', '$attrs', '$parse', '$interpolate', function ($scope, $attrs, $parse, $interpolate) {
                                                      var self = this,
                                                          setNumPages = $attrs.numPages ? $parse($attrs.numPages).assign : angular.noop;
                                                    Severity: Major
                                                    Found in app/lib/angular-ui-bootstrap-bower/ui-bootstrap.js and 1 other location - About 1 wk to fix
                                                    app/lib/angular-ui-bootstrap-bower/ui-bootstrap-tpls.js on lines 1742..1982

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

                                                    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

                                                    angular.module('ui.bootstrap.carousel', ['ui.bootstrap.transition'])
                                                    .controller('CarouselController', ['$scope', '$timeout', '$transition', '$q', function ($scope, $timeout, $transition, $q) {
                                                      var self = this,
                                                        slides = self.slides = [],
                                                        currentIndex = -1,
                                                    Severity: Major
                                                    Found in app/lib/angular-ui-bootstrap-bower/ui-bootstrap.js and 1 other location - About 1 wk to fix
                                                    app/lib/angular-ui-bootstrap-bower/ui-bootstrap-tpls.js on lines 419..755

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

                                                    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

                                                    angular.module('ui.bootstrap.tabs', [])
                                                    
                                                    .controller('TabsetController', ['$scope', function TabsetCtrl($scope) {
                                                      var ctrl = this,
                                                          tabs = ctrl.tabs = $scope.tabs = [];
                                                    Severity: Major
                                                    Found in app/lib/angular-ui-bootstrap-bower/ui-bootstrap.js and 1 other location - About 1 wk to fix
                                                    app/lib/angular-ui-bootstrap-bower/ui-bootstrap-tpls.js on lines 2566..2844

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

                                                    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

                                                    angular.module('ui.bootstrap.accordion', ['ui.bootstrap.collapse'])
                                                    
                                                    .constant('accordionConfig', {
                                                      closeOthers: true
                                                    })
                                                    Severity: Major
                                                    Found in app/lib/angular-ui-bootstrap-bower/ui-bootstrap.js and 1 other location - About 5 days to fix
                                                    app/lib/angular-ui-bootstrap-bower/ui-bootstrap-tpls.js on lines 169..306

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

                                                    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

                                                    angular.module('ui.bootstrap.progressbar', ['ui.bootstrap.transition'])
                                                    
                                                    .constant('progressConfig', {
                                                      animate: true,
                                                      max: 100
                                                    Severity: Major
                                                    Found in app/lib/angular-ui-bootstrap-bower/ui-bootstrap.js and 1 other location - About 4 days to fix
                                                    app/lib/angular-ui-bootstrap-bower/ui-bootstrap-tpls.js on lines 2385..2484

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

                                                    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

                                                    angular.module('ui.bootstrap.rating', [])
                                                    
                                                    .constant('ratingConfig', {
                                                      max: 5,
                                                      stateOn: null,
                                                    Severity: Major
                                                    Found in app/lib/angular-ui-bootstrap-bower/ui-bootstrap.js and 1 other location - About 4 days to fix
                                                    app/lib/angular-ui-bootstrap-bower/ui-bootstrap-tpls.js on lines 2485..2556

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

                                                    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

                                                    angular.module('ui.bootstrap.position', [])
                                                    
                                                    /**
                                                     * A set of utility methods that can be use to retrieve position of DOM elements.
                                                     * It is meant to be used where we need to absolute-position DOM elements in
                                                    Severity: Major
                                                    Found in app/lib/angular-ui-bootstrap-bower/ui-bootstrap.js and 1 other location - About 3 days to fix
                                                    app/lib/angular-ui-bootstrap-bower/ui-bootstrap-tpls.js on lines 757..836

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

                                                    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

                                                    angular.module('ui.bootstrap.buttons', [])
                                                    
                                                    .constant('buttonConfig', {
                                                      activeClass: 'active',
                                                      toggleEvent: 'click'
                                                    Severity: Major
                                                    Found in app/lib/angular-ui-bootstrap-bower/ui-bootstrap.js and 1 other location - About 3 days to fix
                                                    app/lib/angular-ui-bootstrap-bower/ui-bootstrap-tpls.js on lines 338..409

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

                                                    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

                                                    angular.module('ui.bootstrap.transition', [])
                                                    
                                                    /**
                                                     * $transition service provides a consistent interface to trigger CSS 3 transitions and to be informed when they complete.
                                                     * @param  {DOMElement} element  The DOMElement that will be animated.
                                                    Severity: Major
                                                    Found in app/lib/angular-ui-bootstrap-bower/ui-bootstrap.js and 1 other location - About 2 days to fix
                                                    app/lib/angular-ui-bootstrap-bower/ui-bootstrap-tpls.js on lines 10..91

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

                                                    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

                                                    angular.module('ui.bootstrap.collapse', ['ui.bootstrap.transition'])
                                                    
                                                      .directive('collapse', ['$transition', function ($transition, $timeout) {
                                                    
                                                        return {
                                                    Severity: Major
                                                    Found in app/lib/angular-ui-bootstrap-bower/ui-bootstrap.js and 1 other location - About 2 days to fix
                                                    app/lib/angular-ui-bootstrap-bower/ui-bootstrap-tpls.js on lines 93..167

                                                    Duplicated Code

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

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

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

                                                    Tuning

                                                    This issue has a mass of 495.

                                                    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

                                                    angular.module('ui.bootstrap.dropdownToggle', []).directive('dropdownToggle', ['$document', '$location', function ($document, $location) {
                                                      var openElement = null,
                                                          closeMenu   = angular.noop;
                                                      return {
                                                        restrict: 'CA',
                                                    Severity: Major
                                                    Found in app/lib/angular-ui-bootstrap-bower/ui-bootstrap.js and 1 other location - About 1 day to fix
                                                    app/lib/angular-ui-bootstrap-bower/ui-bootstrap-tpls.js on lines 1328..1365

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

                                                    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

                                                    angular.module( 'ui.bootstrap.popover', [ 'ui.bootstrap.tooltip' ] )
                                                    
                                                    .directive( 'popoverPopup', function () {
                                                      return {
                                                        restrict: 'EA',
                                                    Severity: Major
                                                    Found in app/lib/angular-ui-bootstrap-bower/ui-bootstrap.js and 1 other location - About 3 hrs to fix
                                                    app/lib/angular-ui-bootstrap-bower/ui-bootstrap-tpls.js on lines 2370..2383

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

                                                    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

                                                    angular.module("ui.bootstrap.alert", [])
                                                    
                                                    .controller('AlertController', ['$scope', '$attrs', function ($scope, $attrs) {
                                                      $scope.closeable = 'close' in $attrs;
                                                    }])
                                                    Severity: Major
                                                    Found in app/lib/angular-ui-bootstrap-bower/ui-bootstrap.js and 1 other location - About 3 hrs to fix
                                                    app/lib/angular-ui-bootstrap-bower/ui-bootstrap-tpls.js on lines 308..326

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

                                                    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

                                                    angular.module('ui.bootstrap.bindHtml', [])
                                                    
                                                      .directive('bindHtmlUnsafe', function () {
                                                        return function (scope, element, attr) {
                                                          element.addClass('ng-binding').data('$binding', attr.bindHtmlUnsafe);
                                                    Severity: Major
                                                    Found in app/lib/angular-ui-bootstrap-bower/ui-bootstrap.js and 1 other location - About 3 hrs to fix
                                                    app/lib/angular-ui-bootstrap-bower/ui-bootstrap-tpls.js on lines 328..337

                                                    Duplicated Code

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

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

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

                                                    Tuning

                                                    This issue has a mass of 101.

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

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

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

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

                                                    Refactorings

                                                    Further Reading

                                                    There are no issues that match your filters.

                                                    Category
                                                    Status