opsforgeio/cabot

View on GitHub
cabot/static/bootstrap/js/bootstrap.js

Summary

Maintainability
F
2 wks
Test Coverage

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

/* ========================================================================
 * Bootstrap: alert.js v3.0.3
 * http://getbootstrap.com/javascript/#alerts
 * ========================================================================
 * Copyright 2013 Twitter, Inc.
Severity: Major
Found in cabot/static/bootstrap/js/bootstrap.js - About 3 days to fix

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

      Carousel.prototype.slide = function (type, next) {
        var $active   = this.$element.find('.item.active')
        var $next     = next || $active[type]()
        var isCycling = this.interval
        var direction = type == 'next' ? 'left' : 'right'
    Severity: Minor
    Found in cabot/static/bootstrap/js/bootstrap.js - About 1 hr to fix

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

        Tooltip.prototype.show = function () {
          var e = $.Event('show.bs.'+ this.type)
      
          if (this.hasContent() && this.enabled) {
            this.$element.trigger(e)
      Severity: Minor
      Found in cabot/static/bootstrap/js/bootstrap.js - About 1 hr to fix

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

          Tooltip.prototype.applyPlacement = function(offset, placement) {
            var replace
            var $tip   = this.tip()
            var width  = $tip[0].offsetWidth
            var height = $tip[0].offsetHeight
        Severity: Minor
        Found in cabot/static/bootstrap/js/bootstrap.js - About 1 hr to fix

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

            Collapse.prototype.show = function () {
              if (this.transitioning || this.$element.hasClass('in')) return
          
              var startEvent = $.Event('show.bs.collapse')
              this.$element.trigger(startEvent)
          Severity: Minor
          Found in cabot/static/bootstrap/js/bootstrap.js - About 1 hr to fix

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

              Modal.prototype.backdrop = function (callback) {
                var that    = this
                var animate = this.$element.hasClass('fade') ? 'fade' : ''
            
                if (this.isShown && this.options.backdrop) {
            Severity: Minor
            Found in cabot/static/bootstrap/js/bootstrap.js - About 1 hr to fix

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

                Modal.prototype.show = function (_relatedTarget) {
                  var that = this
                  var e    = $.Event('show.bs.modal', { relatedTarget: _relatedTarget })
              
                  this.$element.trigger(e)
              Severity: Minor
              Found in cabot/static/bootstrap/js/bootstrap.js - About 1 hr to fix

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

                  Tab.prototype.activate = function (element, container, callback) {
                    var $active    = container.find('> .active')
                    var transition = callback
                      && $.support.transition
                      && $active.hasClass('fade')
                Severity: Minor
                Found in cabot/static/bootstrap/js/bootstrap.js - About 1 hr to fix

                  Consider simplifying this complex logical expression.
                  Open

                        if (autoPlace) {
                          var $parent = this.$element.parent()
                  
                          var orgPlacement = placement
                          var docScroll    = document.documentElement.scrollTop || document.body.scrollTop
                  Severity: Major
                  Found in cabot/static/bootstrap/js/bootstrap.js - About 40 mins to fix

                    Avoid too many return statements within this function.
                    Open

                        return this
                    Severity: Major
                    Found in cabot/static/bootstrap/js/bootstrap.js - About 30 mins to fix

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

                        Tooltip.prototype.enter = function (obj) {
                          var self = obj instanceof this.constructor ?
                            obj : $(obj.currentTarget)[this.type](this.getDelegateOptions()).data('bs.' + this.type)
                      
                          clearTimeout(self.timeout)
                      Severity: Major
                      Found in cabot/static/bootstrap/js/bootstrap.js and 1 other location - About 1 day to fix
                      cabot/static/bootstrap/js/bootstrap.js on lines 955..968

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

                      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

                        Tooltip.prototype.leave = function (obj) {
                          var self = obj instanceof this.constructor ?
                            obj : $(obj.currentTarget)[this.type](this.getDelegateOptions()).data('bs.' + this.type)
                      
                          clearTimeout(self.timeout)
                      Severity: Major
                      Found in cabot/static/bootstrap/js/bootstrap.js and 1 other location - About 1 day to fix
                      cabot/static/bootstrap/js/bootstrap.js on lines 940..953

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

                      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

                          function next() {
                            $active
                              .removeClass('active')
                              .find('> .dropdown-menu > .active')
                              .removeClass('active')
                      Severity: Major
                      Found in cabot/static/bootstrap/js/bootstrap.js and 1 other location - About 5 hrs to fix
                      cabot/static/theme/js/bootstrap.js on lines 1561..1581

                      Duplicated Code

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

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

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

                      Tuning

                      This issue has a mass of 138.

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

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

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

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

                      Refactorings

                      Further Reading

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

                        $.fn.tooltip = function (option) {
                          return this.each(function () {
                            var $this   = $(this)
                            var data    = $this.data('bs.tooltip')
                            var options = typeof option == 'object' && option
                      Severity: Major
                      Found in cabot/static/bootstrap/js/bootstrap.js and 3 other locations - About 4 hrs to fix
                      cabot/static/bootstrap/js/bootstrap.js on lines 1317..1326
                      cabot/static/bootstrap/js/bootstrap.js on lines 1562..1571
                      cabot/static/bootstrap/js/bootstrap.js on lines 1908..1917

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

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

                        $.fn.scrollspy = function (option) {
                          return this.each(function () {
                            var $this   = $(this)
                            var data    = $this.data('bs.scrollspy')
                            var options = typeof option == 'object' && option
                      Severity: Major
                      Found in cabot/static/bootstrap/js/bootstrap.js and 3 other locations - About 4 hrs to fix
                      cabot/static/bootstrap/js/bootstrap.js on lines 1199..1208
                      cabot/static/bootstrap/js/bootstrap.js on lines 1317..1326
                      cabot/static/bootstrap/js/bootstrap.js on lines 1562..1571

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

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

                        $.fn.affix = function (option) {
                          return this.each(function () {
                            var $this   = $(this)
                            var data    = $this.data('bs.affix')
                            var options = typeof option == 'object' && option
                      Severity: Major
                      Found in cabot/static/bootstrap/js/bootstrap.js and 3 other locations - About 4 hrs to fix
                      cabot/static/bootstrap/js/bootstrap.js on lines 1199..1208
                      cabot/static/bootstrap/js/bootstrap.js on lines 1317..1326
                      cabot/static/bootstrap/js/bootstrap.js on lines 1908..1917

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

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

                        $.fn.popover = function (option) {
                          return this.each(function () {
                            var $this   = $(this)
                            var data    = $this.data('bs.popover')
                            var options = typeof option == 'object' && option
                      Severity: Major
                      Found in cabot/static/bootstrap/js/bootstrap.js and 3 other locations - About 4 hrs to fix
                      cabot/static/bootstrap/js/bootstrap.js on lines 1199..1208
                      cabot/static/bootstrap/js/bootstrap.js on lines 1562..1571
                      cabot/static/bootstrap/js/bootstrap.js on lines 1908..1917

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

                      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.dropdown = function (option) {
                          return this.each(function () {
                            var $this = $(this)
                            var data  = $this.data('bs.dropdown')
                      
                      
                      Severity: Major
                      Found in cabot/static/bootstrap/js/bootstrap.js and 1 other location - About 3 hrs to fix
                      cabot/static/bootstrap/js/bootstrap.js on lines 71..79

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

                      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.alert = function (option) {
                          return this.each(function () {
                            var $this = $(this)
                            var data  = $this.data('bs.alert')
                      
                      
                      Severity: Major
                      Found in cabot/static/bootstrap/js/bootstrap.js and 1 other location - About 3 hrs to fix
                      cabot/static/bootstrap/js/bootstrap.js on lines 556..564

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

                      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

                            $active
                              .one($.support.transition.end, function () {
                                $next.removeClass([type, direction].join(' ')).addClass('active')
                                $active.removeClass(['active', direction].join(' '))
                                that.sliding = false
                      Severity: Major
                      Found in cabot/static/bootstrap/js/bootstrap.js and 1 other location - About 3 hrs to fix
                      cabot/static/theme/js/bootstrap.js on lines 362..367

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

                      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 affix = this.unpin   != null && (scrollTop + this.unpin <= position.top) ? false :
                                      offsetBottom != null && (position.top + this.$element.height() >= scrollHeight - offsetBottom) ? 'bottom' :
                                      offsetTop    != null && (scrollTop <= offsetTop) ? 'top' : false
                      Severity: Major
                      Found in cabot/static/bootstrap/js/bootstrap.js and 1 other location - About 2 hrs to fix
                      cabot/static/theme/js/bootstrap.js on lines 1978..1981

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

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

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

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

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

                      Refactorings

                      Further Reading

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

                          for (i = offsets.length; i--;) {
                            activeTarget != targets[i]
                              && scrollTop >= offsets[i]
                              && (!offsets[i + 1] || scrollTop <= offsets[i + 1])
                              && this.activate( targets[i] )
                      Severity: Major
                      Found in cabot/static/bootstrap/js/bootstrap.js and 1 other location - About 2 hrs to fix
                      cabot/static/theme/js/bootstrap.js on lines 1417..1422

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

                      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

                        $(document)
                          .on('click.bs.dropdown.data-api', clearMenus)
                          .on('click.bs.dropdown.data-api', '.dropdown form', function (e) { e.stopPropagation() })
                          .on('click.bs.dropdown.data-api'  , toggle, Dropdown.prototype.toggle)
                          .on('keydown.bs.dropdown.data-api', toggle + ', [role=menu]' , Dropdown.prototype.keydown)
                      Severity: Major
                      Found in cabot/static/bootstrap/js/bootstrap.js and 1 other location - About 2 hrs to fix
                      cabot/static/theme/js/bootstrap.js on lines 716..720

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

                      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 ($.support.transition && this.$element.hasClass('slide')) {
                            this.$element.trigger(e)
                            if (e.isDefaultPrevented()) return
                            $next.addClass(type)
                            $next[0].offsetWidth // force reflow
                      Severity: Major
                      Found in cabot/static/bootstrap/js/bootstrap.js and 1 other location - About 2 hrs to fix
                      cabot/static/theme/js/bootstrap.js on lines 355..375

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

                      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

                        $(window).on('load', function () {
                          $('[data-ride="carousel"]').each(function () {
                            var $carousel = $(this)
                            $carousel.carousel($carousel.data())
                          })
                      Severity: Major
                      Found in cabot/static/bootstrap/js/bootstrap.js and 1 other location - About 1 hr to fix
                      cabot/static/theme/js/bootstrap.js on lines 1476..1481

                      Duplicated Code

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

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

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

                      Tuning

                      This issue has a mass of 70.

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

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

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

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

                      Refactorings

                      Further Reading

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

                          this.options.pause == 'hover' && this.$element
                            .on('mouseenter', $.proxy(this.pause, this))
                            .on('mouseleave', $.proxy(this.cycle, this))
                      Severity: Major
                      Found in cabot/static/bootstrap/js/bootstrap.js and 1 other location - About 1 hr to fix
                      cabot/static/theme/js/bootstrap.js on lines 277..279

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

                      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

                          this.selector       = (this.options.target
                            || ((href = $(element).attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '')) //strip for ie7
                            || '') + ' .nav li > a'
                      Severity: Major
                      Found in cabot/static/bootstrap/js/bootstrap.js and 1 other location - About 1 hr to fix
                      cabot/static/theme/js/bootstrap.js on lines 1367..1369

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

                      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

                          setTimeout(function () {
                            state == 'loadingText' ?
                              $el.addClass(d).attr(d, d) :
                              $el.removeClass(d).removeAttr(d);
                          }, 0)
                      Severity: Major
                      Found in cabot/static/bootstrap/js/bootstrap.js and 1 other location - About 1 hr to fix
                      cabot/static/theme/js/bootstrap.js on lines 197..201

                      Duplicated Code

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

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

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

                      Tuning

                      This issue has a mass of 61.

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

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

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

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

                      Refactorings

                      Further Reading

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

                          var option  = $target.data('modal') ? 'toggle' : $.extend({ remote: !/#/.test(href) && href }, $target.data(), $this.data())
                      Severity: Major
                      Found in cabot/static/bootstrap/js/bootstrap.js and 1 other location - About 1 hr to fix
                      cabot/static/theme/js/bootstrap.js on lines 944..944

                      Duplicated Code

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

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

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

                      Tuning

                      This issue has a mass of 60.

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

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

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

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

                      Refactorings

                      Further Reading

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

                        Tooltip.prototype.validate = function () {
                          if (!this.$element[0].parentNode) {
                            this.hide()
                            this.$element = null
                            this.options  = null
                      Severity: Major
                      Found in cabot/static/bootstrap/js/bootstrap.js and 1 other location - About 1 hr to fix
                      cabot/static/theme/js/bootstrap.js on lines 1173..1179

                      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

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

                            var placement = typeof this.options.placement == 'function' ?
                              this.options.placement.call(this, $tip[0], this.$element[0]) :
                              this.options.placement
                      Severity: Major
                      Found in cabot/static/bootstrap/js/bootstrap.js and 1 other location - About 1 hr to fix
                      cabot/static/theme/js/bootstrap.js on lines 1070..1072

                      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

                          this.options.interval
                            && !this.paused
                            && (this.interval = setInterval($.proxy(this.next, this), this.options.interval))
                      Severity: Major
                      Found in cabot/static/bootstrap/js/bootstrap.js and 1 other location - About 1 hr to fix
                      cabot/static/theme/js/bootstrap.js on lines 286..288

                      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

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

                          if (!selector) {
                            selector = $this.attr('href')
                            selector = selector && /#/.test(selector) && selector.replace(/.*(?=#[^\s]*$)/, '') //strip for ie7
                          }
                      Severity: Major
                      Found in cabot/static/bootstrap/js/bootstrap.js and 1 other location - About 1 hr to fix
                      cabot/static/theme/js/bootstrap.js on lines 686..689

                      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

                          this.options.selector ?
                            (this._options = $.extend({}, this.options, { trigger: 'manual', selector: '' })) :
                            this.fixTitle()
                      Severity: Major
                      Found in cabot/static/bootstrap/js/bootstrap.js and 1 other location - About 1 hr to fix
                      cabot/static/theme/js/bootstrap.js on lines 1011..1013

                      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

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

                          if (options.delay && typeof options.delay == 'number') {
                            options.delay = {
                              show: options.delay
                            , hide: options.delay
                            }
                      Severity: Major
                      Found in cabot/static/bootstrap/js/bootstrap.js and 1 other location - About 1 hr to fix
                      cabot/static/theme/js/bootstrap.js on lines 1019..1024

                      Duplicated Code

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

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

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

                      Tuning

                      This issue has a mass of 55.

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

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

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

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

                      Refactorings

                      Further Reading

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

                        Popover.prototype.arrow = function () {
                          return this.$arrow = this.$arrow || this.tip().find('.arrow')
                        }
                      Severity: Minor
                      Found in cabot/static/bootstrap/js/bootstrap.js and 1 other location - About 55 mins to fix
                      cabot/static/bootstrap/js/bootstrap.js on lines 1160..1162

                      Duplicated Code

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

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

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

                      Tuning

                      This issue has a mass of 54.

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

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

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

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

                      Refactorings

                      Further Reading

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

                        Tooltip.prototype.arrow = function () {
                          return this.$arrow = this.$arrow || this.tip().find('.tooltip-arrow')
                        }
                      Severity: Minor
                      Found in cabot/static/bootstrap/js/bootstrap.js and 1 other location - About 55 mins to fix
                      cabot/static/bootstrap/js/bootstrap.js on lines 1302..1304

                      Duplicated Code

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

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

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

                      Tuning

                      This issue has a mass of 54.

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

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

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

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

                      Refactorings

                      Further Reading

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

                              this.$element.on(eventIn  + '.' + this.type, this.options.selector, $.proxy(this.enter, this))
                      Severity: Major
                      Found in cabot/static/bootstrap/js/bootstrap.js and 3 other locations - About 45 mins to fix
                      cabot/static/bootstrap/js/bootstrap.js on lines 903..903
                      cabot/static/theme/js/bootstrap.js on lines 1007..1007
                      cabot/static/theme/js/bootstrap.js on lines 1008..1008

                      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

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

                            if (trigger == 'click') {
                              this.$element.on('click.' + this.type, this.options.selector, $.proxy(this.toggle, this))
                            } else if (trigger != 'manual') {
                              var eventIn  = trigger == 'hover' ? 'mouseenter' : 'focus'
                              var eventOut = trigger == 'hover' ? 'mouseleave' : 'blur'
                      Severity: Minor
                      Found in cabot/static/bootstrap/js/bootstrap.js and 1 other location - About 45 mins to fix
                      cabot/static/theme/js/bootstrap.js on lines 1002..1009

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

                              this.$element.on(eventOut + '.' + this.type, this.options.selector, $.proxy(this.leave, this))
                      Severity: Major
                      Found in cabot/static/bootstrap/js/bootstrap.js and 3 other locations - About 45 mins to fix
                      cabot/static/bootstrap/js/bootstrap.js on lines 902..902
                      cabot/static/theme/js/bootstrap.js on lines 1007..1007
                      cabot/static/theme/js/bootstrap.js on lines 1008..1008

                      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 target  = $this.attr('data-target')
                              || e.preventDefault()
                              || (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '') //strip for ie7
                      Severity: Minor
                      Found in cabot/static/bootstrap/js/bootstrap.js and 1 other location - About 45 mins to fix
                      cabot/static/theme/js/bootstrap.js on lines 567..569

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

                        $.fn.tab.noConflict = function () {
                          $.fn.tab = old
                          return this
                        }
                      Severity: Major
                      Found in cabot/static/bootstrap/js/bootstrap.js and 8 other locations - About 40 mins to fix
                      cabot/static/bootstrap/js/bootstrap.js on lines 87..90
                      cabot/static/bootstrap/js/bootstrap.js on lines 198..201
                      cabot/static/bootstrap/js/bootstrap.js on lines 400..403
                      cabot/static/bootstrap/js/bootstrap.js on lines 572..575
                      cabot/static/bootstrap/js/bootstrap.js on lines 806..809
                      cabot/static/bootstrap/js/bootstrap.js on lines 1579..1582
                      cabot/static/bootstrap/js/bootstrap.js on lines 1754..1757
                      cabot/static/bootstrap/js/bootstrap.js on lines 1925..1928

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

                        $.fn.affix.noConflict = function () {
                          $.fn.affix = old
                          return this
                        }
                      Severity: Major
                      Found in cabot/static/bootstrap/js/bootstrap.js and 8 other locations - About 40 mins to fix
                      cabot/static/bootstrap/js/bootstrap.js on lines 87..90
                      cabot/static/bootstrap/js/bootstrap.js on lines 198..201
                      cabot/static/bootstrap/js/bootstrap.js on lines 400..403
                      cabot/static/bootstrap/js/bootstrap.js on lines 572..575
                      cabot/static/bootstrap/js/bootstrap.js on lines 806..809
                      cabot/static/bootstrap/js/bootstrap.js on lines 1461..1464
                      cabot/static/bootstrap/js/bootstrap.js on lines 1754..1757
                      cabot/static/bootstrap/js/bootstrap.js on lines 1925..1928

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

                        $.fn.alert.noConflict = function () {
                          $.fn.alert = old
                          return this
                        }
                      Severity: Major
                      Found in cabot/static/bootstrap/js/bootstrap.js and 8 other locations - About 40 mins to fix
                      cabot/static/bootstrap/js/bootstrap.js on lines 198..201
                      cabot/static/bootstrap/js/bootstrap.js on lines 400..403
                      cabot/static/bootstrap/js/bootstrap.js on lines 572..575
                      cabot/static/bootstrap/js/bootstrap.js on lines 806..809
                      cabot/static/bootstrap/js/bootstrap.js on lines 1461..1464
                      cabot/static/bootstrap/js/bootstrap.js on lines 1579..1582
                      cabot/static/bootstrap/js/bootstrap.js on lines 1754..1757
                      cabot/static/bootstrap/js/bootstrap.js on lines 1925..1928

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

                        $.fn.button.noConflict = function () {
                          $.fn.button = old
                          return this
                        }
                      Severity: Major
                      Found in cabot/static/bootstrap/js/bootstrap.js and 8 other locations - About 40 mins to fix
                      cabot/static/bootstrap/js/bootstrap.js on lines 87..90
                      cabot/static/bootstrap/js/bootstrap.js on lines 400..403
                      cabot/static/bootstrap/js/bootstrap.js on lines 572..575
                      cabot/static/bootstrap/js/bootstrap.js on lines 806..809
                      cabot/static/bootstrap/js/bootstrap.js on lines 1461..1464
                      cabot/static/bootstrap/js/bootstrap.js on lines 1579..1582
                      cabot/static/bootstrap/js/bootstrap.js on lines 1754..1757
                      cabot/static/bootstrap/js/bootstrap.js on lines 1925..1928

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

                        $.fn.modal.noConflict = function () {
                          $.fn.modal = old
                          return this
                        }
                      Severity: Major
                      Found in cabot/static/bootstrap/js/bootstrap.js and 8 other locations - About 40 mins to fix
                      cabot/static/bootstrap/js/bootstrap.js on lines 87..90
                      cabot/static/bootstrap/js/bootstrap.js on lines 198..201
                      cabot/static/bootstrap/js/bootstrap.js on lines 400..403
                      cabot/static/bootstrap/js/bootstrap.js on lines 572..575
                      cabot/static/bootstrap/js/bootstrap.js on lines 1461..1464
                      cabot/static/bootstrap/js/bootstrap.js on lines 1579..1582
                      cabot/static/bootstrap/js/bootstrap.js on lines 1754..1757
                      cabot/static/bootstrap/js/bootstrap.js on lines 1925..1928

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

                        $.fn.collapse.noConflict = function () {
                          $.fn.collapse = old
                          return this
                        }
                      Severity: Major
                      Found in cabot/static/bootstrap/js/bootstrap.js and 8 other locations - About 40 mins to fix
                      cabot/static/bootstrap/js/bootstrap.js on lines 87..90
                      cabot/static/bootstrap/js/bootstrap.js on lines 198..201
                      cabot/static/bootstrap/js/bootstrap.js on lines 400..403
                      cabot/static/bootstrap/js/bootstrap.js on lines 572..575
                      cabot/static/bootstrap/js/bootstrap.js on lines 806..809
                      cabot/static/bootstrap/js/bootstrap.js on lines 1461..1464
                      cabot/static/bootstrap/js/bootstrap.js on lines 1579..1582
                      cabot/static/bootstrap/js/bootstrap.js on lines 1925..1928

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

                        $.fn.dropdown.noConflict = function () {
                          $.fn.dropdown = old
                          return this
                        }
                      Severity: Major
                      Found in cabot/static/bootstrap/js/bootstrap.js and 8 other locations - About 40 mins to fix
                      cabot/static/bootstrap/js/bootstrap.js on lines 87..90
                      cabot/static/bootstrap/js/bootstrap.js on lines 198..201
                      cabot/static/bootstrap/js/bootstrap.js on lines 400..403
                      cabot/static/bootstrap/js/bootstrap.js on lines 806..809
                      cabot/static/bootstrap/js/bootstrap.js on lines 1461..1464
                      cabot/static/bootstrap/js/bootstrap.js on lines 1579..1582
                      cabot/static/bootstrap/js/bootstrap.js on lines 1754..1757
                      cabot/static/bootstrap/js/bootstrap.js on lines 1925..1928

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

                        $.fn.carousel.noConflict = function () {
                          $.fn.carousel = old
                          return this
                        }
                      Severity: Major
                      Found in cabot/static/bootstrap/js/bootstrap.js and 8 other locations - About 40 mins to fix
                      cabot/static/bootstrap/js/bootstrap.js on lines 87..90
                      cabot/static/bootstrap/js/bootstrap.js on lines 198..201
                      cabot/static/bootstrap/js/bootstrap.js on lines 572..575
                      cabot/static/bootstrap/js/bootstrap.js on lines 806..809
                      cabot/static/bootstrap/js/bootstrap.js on lines 1461..1464
                      cabot/static/bootstrap/js/bootstrap.js on lines 1579..1582
                      cabot/static/bootstrap/js/bootstrap.js on lines 1754..1757
                      cabot/static/bootstrap/js/bootstrap.js on lines 1925..1928

                      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

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

                          return placement == 'bottom' ? { top: pos.top + pos.height,   left: pos.left + pos.width / 2 - actualWidth / 2  } :
                      Severity: Minor
                      Found in cabot/static/bootstrap/js/bootstrap.js and 1 other location - About 40 mins to fix
                      cabot/static/theme/js/bootstrap.js on lines 1088..1088

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

                        $.fn.scrollspy.noConflict = function () {
                          $.fn.scrollspy = old
                          return this
                        }
                      Severity: Major
                      Found in cabot/static/bootstrap/js/bootstrap.js and 8 other locations - About 40 mins to fix
                      cabot/static/bootstrap/js/bootstrap.js on lines 87..90
                      cabot/static/bootstrap/js/bootstrap.js on lines 198..201
                      cabot/static/bootstrap/js/bootstrap.js on lines 400..403
                      cabot/static/bootstrap/js/bootstrap.js on lines 572..575
                      cabot/static/bootstrap/js/bootstrap.js on lines 806..809
                      cabot/static/bootstrap/js/bootstrap.js on lines 1461..1464
                      cabot/static/bootstrap/js/bootstrap.js on lines 1579..1582
                      cabot/static/bootstrap/js/bootstrap.js on lines 1754..1757

                      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

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

                              /* placement == 'right' */ { top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left + pos.width   }
                      Severity: Minor
                      Found in cabot/static/bootstrap/js/bootstrap.js and 1 other location - About 35 mins to fix
                      cabot/static/theme/js/bootstrap.js on lines 1097..1097

                      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

                          this.activate($target, $target.parent(), function () {
                            $this.trigger({
                              type: 'shown.bs.tab'
                            , relatedTarget: previous
                            })
                      Severity: Minor
                      Found in cabot/static/bootstrap/js/bootstrap.js and 1 other location - About 35 mins to fix
                      cabot/static/theme/js/bootstrap.js on lines 1547..1552

                      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

                        $(document).on('click.bs.tab.data-api', '[data-toggle="tab"], [data-toggle="pill"]', function (e) {
                          e.preventDefault()
                          $(this).tab('show')
                        })
                      Severity: Minor
                      Found in cabot/static/bootstrap/js/bootstrap.js and 1 other location - About 35 mins to fix
                      cabot/static/theme/js/bootstrap.js on lines 1610..1613

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

                          if (!selector) {
                            selector = $this.attr('href')
                            selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') //strip for ie7
                          }
                      Severity: Major
                      Found in cabot/static/bootstrap/js/bootstrap.js and 3 other locations - About 35 mins to fix
                      cabot/static/bootstrap/js/bootstrap.js on lines 35..38
                      cabot/static/theme/js/bootstrap.js on lines 98..101
                      cabot/static/theme/js/bootstrap.js on lines 1527..1530

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

                          if (!selector) {
                            selector = $this.attr('href')
                            selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') // strip for ie7
                          }
                      Severity: Major
                      Found in cabot/static/bootstrap/js/bootstrap.js and 3 other locations - About 35 mins to fix
                      cabot/static/bootstrap/js/bootstrap.js on lines 1375..1378
                      cabot/static/theme/js/bootstrap.js on lines 98..101
                      cabot/static/theme/js/bootstrap.js on lines 1527..1530

                      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

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

                          var $targets = this.$body
                            .find(this.selector)
                            .map(function () {
                              var $el   = $(this)
                              var href  = $el.data('target') || $el.attr('href')
                      Severity: Minor
                      Found in cabot/static/bootstrap/js/bootstrap.js and 1 other location - About 30 mins to fix
                      cabot/static/theme/js/bootstrap.js on lines 1386..1400

                      Duplicated Code

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

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

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

                      Tuning

                      This issue has a mass of 45.

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

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

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

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

                      Refactorings

                      Further Reading

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

                        $.fn.tooltip.noConflict = function () {
                          $.fn.tooltip = old
                          return this
                        }
                      Severity: Minor
                      Found in cabot/static/bootstrap/js/bootstrap.js and 1 other location - About 30 mins to fix
                      cabot/static/bootstrap/js/bootstrap.js on lines 1334..1337

                      Duplicated Code

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

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

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

                      Tuning

                      This issue has a mass of 45.

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

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

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

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

                      Refactorings

                      Further Reading

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

                        $.fn.popover.noConflict = function () {
                          $.fn.popover = old
                          return this
                        }
                      Severity: Minor
                      Found in cabot/static/bootstrap/js/bootstrap.js and 1 other location - About 30 mins to fix
                      cabot/static/bootstrap/js/bootstrap.js on lines 1216..1219

                      Duplicated Code

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

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

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

                      Tuning

                      This issue has a mass of 45.

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

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

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

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

                      Refactorings

                      Further Reading

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

                          if (scrollTop >= maxScroll) {
                            return activeTarget != (i = targets.last()[0]) && this.activate(i)
                          }
                      Severity: Minor
                      Found in cabot/static/bootstrap/js/bootstrap.js and 1 other location - About 30 mins to fix
                      cabot/static/theme/js/bootstrap.js on lines 1412..1415

                      Duplicated Code

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

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

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

                      Tuning

                      This issue has a mass of 45.

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

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

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

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

                      Refactorings

                      Further Reading

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

                            if (!that.$element.parent().length) {
                              that.$element.appendTo(document.body) // don't move modals dom position
                            }
                      Severity: Minor
                      Found in cabot/static/bootstrap/js/bootstrap.js and 1 other location - About 30 mins to fix
                      cabot/static/theme/js/bootstrap.js on lines 780..782

                      Duplicated Code

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

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

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

                      Tuning

                      This issue has a mass of 45.

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

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

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

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

                      Refactorings

                      Further Reading

                      There are no issues that match your filters.

                      Category
                      Status