nemesiscodex/openfonacide

View on GitHub
static/components/dropdown.js

Summary

Maintainability
F
3 wks
Test Coverage

Function dropdown has 1579 lines of code (exceeds 25 allowed). Consider refactoring.
Open

$.fn.dropdown = function(parameters) {
  var
    $allModules    = $(this),
    $document      = $(document),

Severity: Major
Found in static/components/dropdown.js - About 1 wk to fix

    File dropdown.js has 1686 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    /*!
     * # Semantic UI 1.12.3 - Dropdown
     * http://github.com/semantic-org/semantic-ui/
     *
     *
    Severity: Major
    Found in static/components/dropdown.js - About 4 days to fix

      Function keydown has 124 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

                keydown: function(event) {
                  var
                    $currentlySelected = $item.not(className.filtered).filter('.' + className.selected).eq(0),
                    $activeItem        = $menu.children('.' + className.active).eq(0),
                    $selectedItem      = ($currentlySelected.length > 0)
      Severity: Major
      Found in static/components/dropdown.js - About 4 hrs to fix

        Function hide has 80 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

                  hide: function(callback, $subMenu) {
                    var
                      $currentMenu = $subMenu || $menu,
                      duration = ($subMenu)
                        ? (settings.duration * 0.9)
        Severity: Major
        Found in static/components/dropdown.js - About 3 hrs to fix

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

                    show: function(callback, $subMenu) {
                      var
                        $currentMenu = $subMenu || $menu,
                        start = ($subMenu)
                          ? function() {}
          Severity: Major
          Found in static/components/dropdown.js - About 3 hrs to fix

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

                    invoke: function(query, passedArguments, context) {
                      var
                        object = instance,
                        maxDepth,
                        found,
            Severity: Major
            Found in static/components/dropdown.js - About 2 hrs to fix

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

                        item: function(value, strict) {
                          var
                            $selectedItem = false
                          ;
                          value = (value !== undefined)
              Severity: Major
              Found in static/components/dropdown.js - About 2 hrs to fix

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

                        filter: function(searchTerm) {
                          var
                            $results       = $(),
                            escapedTerm    = module.escape.regExp(searchTerm),
                            exactRegExp    = new RegExp('^' + escapedTerm, 'igm'),
                Severity: Minor
                Found in static/components/dropdown.js - About 1 hr to fix

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

                            selectValues: function() {
                              var
                                select = {}
                              ;
                              select.values = (settings.sortSelect)
                  Severity: Minor
                  Found in static/components/dropdown.js - About 1 hr to fix

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

                              mouseEvents: function() {
                                module.verbose('Mouse detected binding mouse events');
                                if( module.is.searchSelection() ) {
                                  $module
                                    .on('mousedown' + eventNamespace, selector.menu, module.event.menu.activate)
                    Severity: Minor
                    Found in static/components/dropdown.js - About 1 hr to fix

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

                                scrollPosition: function($item, forceScroll) {
                                  var
                                    edgeTolerance = 5,
                                    hasActive,
                                    offset,
                      Severity: Minor
                      Found in static/components/dropdown.js - About 1 hr to fix

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

                                  select: function() {
                                    var
                                      selectValues  = module.get.selectValues()
                                    ;
                                    module.debug('Dropdown initialized on a select', selectValues);
                        Severity: Minor
                        Found in static/components/dropdown.js - About 1 hr to fix

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

                                    display: function() {
                                      var
                                        title = settings.name + ':',
                                        totalTime = 0
                                      ;
                          Severity: Minor
                          Found in static/components/dropdown.js - About 1 hr to fix

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

                              easeOutQuad: function (x, t, b, c, d) {
                            Severity: Minor
                            Found in static/components/dropdown.js - About 35 mins to fix

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

                                      invoke: function(query, passedArguments, context) {
                                        var
                                          object = instance,
                                          maxDepth,
                                          found,
                              Severity: Major
                              Found in static/components/dropdown.js and 12 other locations - About 2 days to fix
                              static/components/accordion.js on lines 456..509
                              static/components/api.js on lines 704..757
                              static/components/checkbox.js on lines 395..448
                              static/components/dimmer.js on lines 521..574
                              static/components/nag.js on lines 344..397
                              static/components/progress.js on lines 632..685
                              static/components/sidebar.js on lines 921..974
                              static/components/site.js on lines 351..404
                              static/components/state.js on lines 506..559
                              static/components/tab.js on lines 660..713
                              static/components/video.js on lines 387..440
                              static/components/visibility.js on lines 944..997

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

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

                                      performance: {
                                        log: function(message) {
                                          var
                                            currentTime,
                                            executionTime,
                              Severity: Major
                              Found in static/components/dropdown.js and 11 other locations - About 2 days to fix
                              static/components/accordion.js on lines 405..455
                              static/components/checkbox.js on lines 344..394
                              static/components/modal.js on lines 676..726
                              static/components/nag.js on lines 293..343
                              static/components/popup.js on lines 960..1010
                              static/components/progress.js on lines 581..631
                              static/components/sidebar.js on lines 870..920
                              static/components/state.js on lines 455..505
                              static/components/sticky.js on lines 642..692
                              static/components/tab.js on lines 609..659
                              static/components/visibility.js on lines 893..943

                              Duplicated Code

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

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

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

                              Tuning

                              This issue has a mass of 445.

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

                                      verbose: function() {
                                        if(settings.verbose && settings.debug) {
                                          if(settings.performance) {
                                            module.performance.log(arguments);
                                          }
                              Severity: Major
                              Found in static/components/dropdown.js and 20 other locations - About 4 hrs to fix
                              static/components/accordion.js on lines 390..400
                              static/components/api.js on lines 638..648
                              static/components/checkbox.js on lines 329..339
                              static/components/dimmer.js on lines 452..462
                              static/components/form.js on lines 743..753
                              static/components/modal.js on lines 661..671
                              static/components/nag.js on lines 278..288
                              static/components/popup.js on lines 945..955
                              static/components/progress.js on lines 566..576
                              static/components/rating.js on lines 253..263
                              static/components/search.js on lines 719..729
                              static/components/shape.js on lines 635..645
                              static/components/sidebar.js on lines 855..865
                              static/components/site.js on lines 288..298
                              static/components/state.js on lines 440..450
                              static/components/sticky.js on lines 627..637
                              static/components/tab.js on lines 594..604
                              static/components/transition.js on lines 823..833
                              static/components/video.js on lines 318..328
                              static/components/visibility.js on lines 878..888

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

                              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
                                  $allModules    = $(this),
                                  $document      = $(document),
                              
                                  moduleSelector = $allModules.selector || '',
                              Severity: Major
                              Found in static/components/dropdown.js and 1 other location - About 3 hrs to fix
                              static/components/popup.js on lines 17..32

                              Duplicated Code

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

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

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

                              Tuning

                              This issue has a mass of 109.

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

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

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

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

                              Refactorings

                              Further Reading

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

                                        eventInMenu: function(event, callback) {
                                          callback = $.isFunction(callback)
                                            ? callback
                                            : function(){}
                                          ;
                              Severity: Major
                              Found in static/components/dropdown.js and 1 other location - About 3 hrs to fix
                              static/components/dropdown.js on lines 770..784

                              Duplicated Code

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

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

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

                              Tuning

                              This issue has a mass of 108.

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

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

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

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

                              Refactorings

                              Further Reading

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

                                        eventInModule: function(event, callback) {
                                          callback = $.isFunction(callback)
                                            ? callback
                                            : function(){}
                                          ;
                              Severity: Major
                              Found in static/components/dropdown.js and 1 other location - About 3 hrs to fix
                              static/components/dropdown.js on lines 785..799

                              Duplicated Code

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

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

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

                              Tuning

                              This issue has a mass of 108.

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

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

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

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

                              Refactorings

                              Further Reading

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

                                      debug: function() {
                                        if(settings.debug) {
                                          if(settings.performance) {
                                            module.performance.log(arguments);
                                          }
                              Severity: Major
                              Found in static/components/dropdown.js and 20 other locations - About 3 hrs to fix
                              static/components/accordion.js on lines 379..389
                              static/components/api.js on lines 627..637
                              static/components/checkbox.js on lines 318..328
                              static/components/dimmer.js on lines 441..451
                              static/components/form.js on lines 732..742
                              static/components/modal.js on lines 650..660
                              static/components/nag.js on lines 267..277
                              static/components/popup.js on lines 934..944
                              static/components/progress.js on lines 555..565
                              static/components/rating.js on lines 242..252
                              static/components/search.js on lines 708..718
                              static/components/shape.js on lines 624..634
                              static/components/sidebar.js on lines 844..854
                              static/components/site.js on lines 277..287
                              static/components/state.js on lines 429..439
                              static/components/sticky.js on lines 616..626
                              static/components/tab.js on lines 583..593
                              static/components/transition.js on lines 812..822
                              static/components/video.js on lines 307..317
                              static/components/visibility.js on lines 867..877

                              Duplicated Code

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

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

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

                              Tuning

                              This issue has a mass of 108.

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

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

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

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

                              Refactorings

                              Further Reading

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

                                            else if($.fn.transition !== undefined && $module.transition('is supported')) {
                                              $currentMenu
                                                .transition({
                                                  animation  : settings.transition + ' in',
                                                  debug      : settings.debug,
                              Severity: Major
                              Found in static/components/dropdown.js and 1 other location - About 2 hrs to fix
                              static/components/dropdown.js on lines 1434..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 87.

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

                                      setting: function(name, value) {
                                        module.debug('Changing setting', name, value);
                                        if( $.isPlainObject(name) ) {
                                          $.extend(true, settings, name);
                                        }
                              Severity: Major
                              Found in static/components/dropdown.js and 14 other locations - About 2 hrs to fix
                              static/components/accordion.js on lines 353..364
                              static/components/api.js on lines 604..615
                              static/components/checkbox.js on lines 295..306
                              static/components/dimmer.js on lines 418..429
                              static/components/modal.js on lines 627..638
                              static/components/nag.js on lines 244..255
                              static/components/progress.js on lines 532..543
                              static/components/rating.js on lines 219..230
                              static/components/shape.js on lines 601..612
                              static/components/sidebar.js on lines 821..832
                              static/components/state.js on lines 406..417
                              static/components/tab.js on lines 560..571
                              static/components/transition.js on lines 789..800
                              static/components/video.js on lines 284..295

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

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

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

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

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

                              Refactorings

                              Further Reading

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

                                            else if($.fn.transition !== undefined && $module.transition('is supported')) {
                                              $currentMenu
                                                .transition({
                                                  animation  : settings.transition + ' out',
                                                  duration   : settings.duration,
                              Severity: Major
                              Found in static/components/dropdown.js and 1 other location - About 2 hrs to fix
                              static/components/dropdown.js on lines 1349..1396

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

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

                                    if(methodInvoked) {
                                      if(instance === undefined) {
                                        module.initialize();
                                      }
                                      module.invoke(query);
                              Severity: Major
                              Found in static/components/dropdown.js and 18 other locations - About 2 hrs to fix
                              static/components/accordion.js on lines 511..522
                              static/components/api.js on lines 760..771
                              static/components/checkbox.js on lines 451..462
                              static/components/dimmer.js on lines 579..590
                              static/components/form.js on lines 866..877
                              static/components/modal.js on lines 782..793
                              static/components/nag.js on lines 400..411
                              static/components/popup.js on lines 1066..1077
                              static/components/progress.js on lines 688..699
                              static/components/rating.js on lines 376..387
                              static/components/search.js on lines 842..853
                              static/components/shape.js on lines 759..770
                              static/components/sidebar.js on lines 978..989
                              static/components/state.js on lines 562..573
                              static/components/sticky.js on lines 748..759
                              static/components/tab.js on lines 715..726
                              static/components/video.js on lines 443..454
                              static/components/visibility.js on lines 1000..1011

                              Duplicated Code

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

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

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

                              Tuning

                              This issue has a mass of 75.

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

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

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

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

                              Refactorings

                              Further Reading

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

                                        combo: function(text, value) {
                                          value = (value !== undefined)
                                            ? value
                                            : text
                                          ;
                              Severity: Major
                              Found in static/components/dropdown.js and 2 other locations - About 1 hr to fix
                              static/components/dropdown.js on lines 806..815
                              static/components/dropdown.js on lines 817..826

                              Duplicated Code

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

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

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

                              Tuning

                              This issue has a mass of 74.

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

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

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

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

                              Refactorings

                              Further Reading

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

                                      internal: function(name, value) {
                                        if( $.isPlainObject(name) ) {
                                          $.extend(true, module, name);
                                        }
                                        else if(value !== undefined) {
                              Severity: Major
                              Found in static/components/dropdown.js and 25 other locations - About 1 hr to fix
                              static/components/api.js on lines 616..626
                              static/components/checkbox.js on lines 307..317
                              static/components/dimmer.js on lines 430..440
                              static/components/form.js on lines 710..720
                              static/components/form.js on lines 721..731
                              static/components/modal.js on lines 639..649
                              static/components/nag.js on lines 256..266
                              static/components/popup.js on lines 912..922
                              static/components/popup.js on lines 923..933
                              static/components/progress.js on lines 544..554
                              static/components/rating.js on lines 231..241
                              static/components/search.js on lines 686..696
                              static/components/search.js on lines 697..707
                              static/components/shape.js on lines 613..623
                              static/components/sidebar.js on lines 833..843
                              static/components/site.js on lines 255..265
                              static/components/site.js on lines 266..276
                              static/components/state.js on lines 418..428
                              static/components/sticky.js on lines 594..604
                              static/components/sticky.js on lines 605..615
                              static/components/tab.js on lines 572..582
                              static/components/transition.js on lines 801..811
                              static/components/video.js on lines 296..306
                              static/components/visibility.js on lines 845..855
                              static/components/visibility.js on lines 856..866

                              Duplicated Code

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

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

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

                              Tuning

                              This issue has a mass of 74.

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

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

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

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

                              Refactorings

                              Further Reading

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

                                        select: function(text, value) {
                                          value = (value !== undefined)
                                            ? value
                                            : text
                                          ;
                              Severity: Major
                              Found in static/components/dropdown.js and 2 other locations - About 1 hr to fix
                              static/components/dropdown.js on lines 806..815
                              static/components/dropdown.js on lines 828..837

                              Duplicated Code

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

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

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

                              Tuning

                              This issue has a mass of 74.

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

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

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

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

                              Refactorings

                              Further Reading

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

                                      create: {
                                        id: function() {
                                          id = (Math.random().toString(16) + '000000000').substr(2,8);
                                          elementNamespace = '.' + id;
                                          module.verbose('Creating unique id for element', id);
                              Severity: Major
                              Found in static/components/dropdown.js and 1 other location - About 1 hr to fix
                              static/components/sidebar.js on lines 115..121

                              Duplicated Code

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

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

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

                              Tuning

                              This issue has a mass of 74.

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

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

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

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

                              Refactorings

                              Further Reading

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

                                        activate: function(text, value) {
                                          value = (value !== undefined)
                                            ? value
                                            : text
                                          ;
                              Severity: Major
                              Found in static/components/dropdown.js and 2 other locations - About 1 hr to fix
                              static/components/dropdown.js on lines 817..826
                              static/components/dropdown.js on lines 828..837

                              Duplicated Code

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

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

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

                              Tuning

                              This issue has a mass of 74.

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

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

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

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

                              Refactorings

                              Further Reading

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

                                      error: function() {
                                        module.error = Function.prototype.bind.call(console.error, console, settings.name + ':');
                                        module.error.apply(console, arguments);
                                      },
                              Severity: Major
                              Found in static/components/dropdown.js and 20 other locations - About 1 hr to fix
                              static/components/accordion.js on lines 401..404
                              static/components/api.js on lines 649..652
                              static/components/checkbox.js on lines 340..343
                              static/components/dimmer.js on lines 463..466
                              static/components/form.js on lines 754..757
                              static/components/modal.js on lines 672..675
                              static/components/nag.js on lines 289..292
                              static/components/popup.js on lines 956..959
                              static/components/progress.js on lines 577..580
                              static/components/rating.js on lines 264..267
                              static/components/search.js on lines 730..733
                              static/components/shape.js on lines 646..649
                              static/components/sidebar.js on lines 866..869
                              static/components/site.js on lines 299..302
                              static/components/state.js on lines 451..454
                              static/components/sticky.js on lines 638..641
                              static/components/tab.js on lines 605..608
                              static/components/transition.js on lines 834..837
                              static/components/video.js on lines 329..332
                              static/components/visibility.js on lines 889..892

                              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

                                          $menu
                                            .on('mouseenter' + eventNamespace, selector.item, module.event.item.mouseenter)
                                            .on('mouseleave' + eventNamespace, selector.item, module.event.item.mouseleave)
                                            .on('click'      + eventNamespace, selector.item, module.event.item.click)
                              Severity: Major
                              Found in static/components/dropdown.js and 1 other location - About 1 hr to fix
                              static/components/dropdown.js on lines 341..344

                              Duplicated Code

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

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

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

                              Tuning

                              This issue has a mass of 66.

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

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

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

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

                              Refactorings

                              Further Reading

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

                                            $module
                                              .on('mousedown' + eventNamespace, selector.menu, module.event.menu.activate)
                                              .on('mouseup'   + eventNamespace, selector.menu, module.event.menu.deactivate)
                                              .on('click'     + eventNamespace, selector.search, module.show)
                              Severity: Major
                              Found in static/components/dropdown.js and 1 other location - About 1 hr to fix
                              static/components/dropdown.js on lines 374..377

                              Duplicated Code

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

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

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

                              Tuning

                              This issue has a mass of 66.

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

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

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

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

                              Refactorings

                              Further Reading

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

                                      settings          = ( $.isPlainObject(parameters) )
                                        ? $.extend(true, {}, $.fn.dropdown.settings, parameters)
                                        : $.extend({}, $.fn.dropdown.settings),
                              Severity: Major
                              Found in static/components/dropdown.js and 14 other locations - About 1 hr to fix
                              static/components/accordion.js on lines 38..40
                              static/components/api.js on lines 37..39
                              static/components/dimmer.js on lines 33..35
                              static/components/modal.js on lines 44..46
                              static/components/nag.js on lines 32..34
                              static/components/popup.js on lines 36..38
                              static/components/progress.js on lines 35..37
                              static/components/rating.js on lines 32..34
                              static/components/sidebar.js on lines 45..47
                              static/components/state.js on lines 35..37
                              static/components/sticky.js on lines 33..35
                              static/components/tab.js on lines 24..26
                              static/components/video.js on lines 42..44
                              static/components/visibility.js on lines 33..35

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

                              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

                                        hide: function() {
                                          module.verbose('Delaying hide event to ensure user intent');
                                          clearTimeout(module.timer);
                                          module.timer = setTimeout(module.hide, settings.delay.hide);
                                        }
                              Severity: Major
                              Found in static/components/dropdown.js and 1 other location - About 1 hr to fix
                              static/components/dropdown.js on lines 1487..1491

                              Duplicated Code

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

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

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

                              Tuning

                              This issue has a mass of 60.

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

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

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

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

                              Refactorings

                              Further Reading

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

                                      $combo = ($module.prev().find(selector.text).length > 0)
                                        ? $module.prev().find(selector.text)
                                        : $module.prev(),
                              Severity: Major
                              Found in static/components/dropdown.js and 1 other location - About 1 hr to fix
                              static/components/dropdown.js on lines 242..244

                              Duplicated Code

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

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

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

                              Tuning

                              This issue has a mass of 60.

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

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

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

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

                              Refactorings

                              Further Reading

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

                                              if($nextItem.length === 0) {
                                                module.verbose('Down key pressed but reached bottom of current menu');
                                                return;
                                              }
                                              else {
                              Severity: Major
                              Found in static/components/dropdown.js and 1 other location - About 1 hr to fix
                              static/components/dropdown.js on lines 612..625

                              Duplicated Code

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

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

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

                              Tuning

                              This issue has a mass of 60.

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

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

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

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

                              Refactorings

                              Further Reading

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

                                              if($visibleItems.index( $nextItem ) < 0) {
                                                module.verbose('Up key pressed but reached top of current menu');
                                                return;
                                              }
                                              else {
                              Severity: Major
                              Found in static/components/dropdown.js and 1 other location - About 1 hr to fix
                              static/components/dropdown.js on lines 634..647

                              Duplicated Code

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

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

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

                              Tuning

                              This issue has a mass of 60.

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

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

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

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

                              Refactorings

                              Further Reading

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

                                        $combo  = ($module.prev().find(selector.text).length > 0)
                                          ? $module.prev().find(selector.text)
                                          : $module.prev()
                              Severity: Major
                              Found in static/components/dropdown.js and 1 other location - About 1 hr to fix
                              static/components/dropdown.js on lines 54..56

                              Duplicated Code

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

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

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

                              Tuning

                              This issue has a mass of 60.

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

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

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

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

                              Refactorings

                              Further Reading

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

                                        show: function() {
                                          module.verbose('Delaying show event to ensure user intent');
                                          clearTimeout(module.timer);
                                          module.timer = setTimeout(module.show, settings.delay.show);
                                        },
                              Severity: Major
                              Found in static/components/dropdown.js and 1 other location - About 1 hr to fix
                              static/components/dropdown.js on lines 1492..1496

                              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

                                  $.each(select.values, function(index, option) {
                                    html += '<div class="item" data-value="' + option.value + '">' + option.name + '</div>';
                                  });
                              Severity: Minor
                              Found in static/components/dropdown.js and 1 other location - About 55 mins to fix
                              static/components/dropdown.js on lines 1772..1774

                              Duplicated Code

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

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

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

                              Tuning

                              This issue has a mass of 54.

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

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

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

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

                              Refactorings

                              Further Reading

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

                                  $.each(select.values, function(index, option) {
                                    html += '<div class="item" data-value="' + option.value + '">' + option.name + '</div>';
                                  });
                              Severity: Minor
                              Found in static/components/dropdown.js and 1 other location - About 55 mins to fix
                              static/components/dropdown.js on lines 1791..1793

                              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

                                            $document
                                              .on('touchstart' + elementNamespace, module.event.test.touch)
                                              .on('touchmove'  + elementNamespace, module.event.test.touch)
                              Severity: Minor
                              Found in static/components/dropdown.js and 1 other location - About 50 mins to fix
                              static/components/search.js on lines 82..84

                              Duplicated Code

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

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

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

                              Tuning

                              This issue has a mass of 51.

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

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

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

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

                              Refactorings

                              Further Reading

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

                                            else if(settings.on == 'hover') {
                                              $module
                                                .on('mouseenter' + eventNamespace, module.delay.show)
                                                .on('mouseleave' + eventNamespace, module.delay.hide)
                                              ;
                              Severity: Major
                              Found in static/components/dropdown.js and 2 other locations - About 40 mins to fix
                              static/components/popup.js on lines 824..829
                              static/components/sidebar.js on lines 172..177

                              Duplicated Code

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

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

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

                              Tuning

                              This issue has a mass of 49.

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

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

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

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

                              Refactorings

                              Further Reading

                              There are no issues that match your filters.

                              Category
                              Status