Semantic-Org/Semantic-UI

View on GitHub
src/definitions/modules/popup.js

Summary

Maintainability
F
3 wks
Test Coverage

Function popup has 1211 lines of code (exceeds 25 allowed). Consider refactoring.
Open

$.fn.popup = function(parameters) {
  var
    $allModules    = $(this),
    $document      = $(document),
    $window        = $(window),
Severity: Major
Found in src/definitions/modules/popup.js - About 6 days to fix

    File popup.js has 1342 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    /*!
     * # Semantic UI - Popup
     * http://github.com/semantic-org/semantic-ui/
     *
     *
    Severity: Major
    Found in src/definitions/modules/popup.js - About 3 days to fix

      Function position has 175 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

                position: function(position, calculations) {
      
                  // exit conditions
                  if($target.length === 0 || $popup.length === 0) {
                    module.error(error.notFound);
      Severity: Major
      Found in src/definitions/modules/popup.js - About 7 hrs to fix

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

                  calculations: function() {
                    var
                      $popupOffsetParent = module.get.offsetParent($popup),
                      targetElement      = $target[0],
                      isWindow           = ($boundary[0] == window),
        Severity: Major
        Found in src/definitions/modules/popup.js - About 3 hrs to fix

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

                  create: function() {
                    var
                      html      = module.get.html(),
                      title     = module.get.title(),
                      content   = module.get.content()
          Severity: Major
          Found in src/definitions/modules/popup.js - About 2 hrs to fix

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

                      nextPosition: function(position) {
                        var
                          positions          = position.split(' '),
                          verticalPosition   = positions[0],
                          horizontalPosition = positions[1],
            Severity: Major
            Found in src/definitions/modules/popup.js - About 2 hrs to fix

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

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

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

                        refresh: function() {
                          if(settings.popup) {
                            $popup = $(settings.popup).eq(0);
                          }
                          else {
                Severity: Minor
                Found in src/definitions/modules/popup.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 src/definitions/modules/popup.js - About 1 hr to fix

                    Avoid too many return statements within this function.
                    Open

                                return true;
                    Severity: Major
                    Found in src/definitions/modules/popup.js - About 30 mins to fix

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

                              invoke: function(query, passedArguments, context) {
                                var
                                  object = instance,
                                  maxDepth,
                                  found,
                      Severity: Major
                      Found in src/definitions/modules/popup.js and 6 other locations - About 2 days to fix
                      src/definitions/behaviors/form.js on lines 1141..1193
                      src/definitions/modules/modal.js on lines 877..929
                      src/definitions/modules/rating.js on lines 376..428
                      src/definitions/modules/search.js on lines 1138..1190
                      src/definitions/modules/shape.js on lines 783..835
                      src/definitions/modules/sticky.js on lines 831..883

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

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

                              performance: {
                                log: function(message) {
                                  var
                                    currentTime,
                                    executionTime,
                      Severity: Major
                      Found in src/definitions/modules/popup.js and 10 other locations - About 2 days to fix
                      src/definitions/behaviors/visibility.js on lines 1081..1131
                      src/definitions/modules/accordion.js on lines 431..481
                      src/definitions/modules/checkbox.js on lines 647..697
                      src/definitions/modules/dropdown.js on lines 3570..3620
                      src/definitions/modules/modal.js on lines 826..876
                      src/definitions/modules/nag.js on lines 314..364
                      src/definitions/modules/progress.js on lines 718..768
                      src/definitions/modules/sidebar.js on lines 822..872
                      src/definitions/modules/sticky.js on lines 780..830
                      src/definitions/modules/tab.js on lines 751..801

                      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

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

                                documentChanged: function(mutations) {
                                  [].forEach.call(mutations, function(mutation) {
                                    if(mutation.removedNodes) {
                                      [].forEach.call(mutation.removedNodes, function(node) {
                                        if(node == element || $(node).find(element).length > 0) {
                      Severity: Major
                      Found in src/definitions/modules/popup.js and 2 other locations - About 4 hrs to fix
                      src/definitions/behaviors/visibility.js on lines 189..200
                      src/definitions/modules/sticky.js on lines 193..204

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

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

                              verbose: function() {
                                if(!settings.silent && settings.verbose && settings.debug) {
                                  if(settings.performance) {
                                    module.performance.log(arguments);
                                  }
                      Severity: Major
                      Found in src/definitions/modules/popup.js and 18 other locations - About 4 hrs to fix
                      src/definitions/behaviors/api.js on lines 882..892
                      src/definitions/behaviors/form.js on lines 1070..1080
                      src/definitions/behaviors/visibility.js on lines 1064..1074
                      src/definitions/modules/accordion.js on lines 414..424
                      src/definitions/modules/checkbox.js on lines 630..640
                      src/definitions/modules/dimmer.js on lines 509..519
                      src/definitions/modules/dropdown.js on lines 3553..3563
                      src/definitions/modules/embed.js on lines 430..440
                      src/definitions/modules/modal.js on lines 809..819
                      src/definitions/modules/nag.js on lines 297..307
                      src/definitions/modules/progress.js on lines 701..711
                      src/definitions/modules/rating.js on lines 305..315
                      src/definitions/modules/search.js on lines 1067..1077
                      src/definitions/modules/shape.js on lines 712..722
                      src/definitions/modules/sidebar.js on lines 805..815
                      src/definitions/modules/sticky.js on lines 763..773
                      src/definitions/modules/tab.js on lines 734..744
                      src/definitions/modules/transition.js on lines 875..885

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

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

                              debug: function() {
                                if(!settings.silent && settings.debug) {
                                  if(settings.performance) {
                                    module.performance.log(arguments);
                                  }
                      Severity: Major
                      Found in src/definitions/modules/popup.js and 18 other locations - About 4 hrs to fix
                      src/definitions/behaviors/api.js on lines 871..881
                      src/definitions/behaviors/form.js on lines 1059..1069
                      src/definitions/behaviors/visibility.js on lines 1053..1063
                      src/definitions/modules/accordion.js on lines 403..413
                      src/definitions/modules/checkbox.js on lines 619..629
                      src/definitions/modules/dimmer.js on lines 498..508
                      src/definitions/modules/dropdown.js on lines 3542..3552
                      src/definitions/modules/embed.js on lines 419..429
                      src/definitions/modules/modal.js on lines 798..808
                      src/definitions/modules/nag.js on lines 286..296
                      src/definitions/modules/progress.js on lines 690..700
                      src/definitions/modules/rating.js on lines 294..304
                      src/definitions/modules/search.js on lines 1056..1066
                      src/definitions/modules/shape.js on lines 701..711
                      src/definitions/modules/sidebar.js on lines 794..804
                      src/definitions/modules/sticky.js on lines 752..762
                      src/definitions/modules/tab.js on lines 723..733
                      src/definitions/modules/transition.js on lines 864..874

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

                      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

                          escape: function(string) {
                            var
                              badChars     = /[&<>"'`]/g,
                              shouldEscape = /[&<>"'`]/,
                              escape       = {
                      Severity: Major
                      Found in src/definitions/modules/popup.js and 1 other location - About 3 hrs to fix
                      src/definitions/modules/search.js on lines 1348..1368

                      Duplicated Code

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

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

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

                      Tuning

                      This issue has a mass of 107.

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

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

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

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

                      Refactorings

                      Further Reading

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

                                    case 'left center':
                                      positioning = {
                                        top    : target.top + (target.height / 2) - (popup.height / 2) + offset,
                                        right  : parent.width - target.left + distanceAway,
                                        left   : 'auto',
                      Severity: Major
                      Found in src/definitions/modules/popup.js and 1 other location - About 2 hrs to fix
                      src/definitions/modules/popup.js on lines 851..858

                      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

                                    case 'bottom center':
                                      positioning = {
                                        top    : target.top + target.height + distanceAway,
                                        left   : target.left + (target.width / 2) - (popup.width / 2) + offset,
                                        bottom : 'auto',
                      Severity: Major
                      Found in src/definitions/modules/popup.js and 1 other location - About 2 hrs to fix
                      src/definitions/modules/popup.js on lines 827..834

                      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

                                    case 'top center':
                                      positioning = {
                                        bottom : parent.height - target.top + distanceAway,
                                        left   : target.left + (target.width / 2) - (popup.width / 2) + offset,
                                        top    : 'auto',
                      Severity: Major
                      Found in src/definitions/modules/popup.js and 1 other location - About 2 hrs to fix
                      src/definitions/modules/popup.js on lines 867..874

                      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

                                    case 'right center':
                                      positioning = {
                                        top    : target.top + (target.height / 2) - (popup.height / 2) + offset,
                                        left   : target.left + target.width + distanceAway,
                                        bottom : 'auto',
                      Severity: Major
                      Found in src/definitions/modules/popup.js and 1 other location - About 2 hrs to fix
                      src/definitions/modules/popup.js on lines 843..850

                      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

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

                              error: function() {
                                if(!settings.silent) {
                                  module.error = Function.prototype.bind.call(console.error, console, settings.name + ':');
                                  module.error.apply(console, arguments);
                                }
                      Severity: Major
                      Found in src/definitions/modules/popup.js and 18 other locations - About 2 hrs to fix
                      src/definitions/behaviors/api.js on lines 893..898
                      src/definitions/behaviors/form.js on lines 1081..1086
                      src/definitions/behaviors/visibility.js on lines 1075..1080
                      src/definitions/modules/accordion.js on lines 425..430
                      src/definitions/modules/checkbox.js on lines 641..646
                      src/definitions/modules/dimmer.js on lines 520..525
                      src/definitions/modules/dropdown.js on lines 3564..3569
                      src/definitions/modules/embed.js on lines 441..446
                      src/definitions/modules/modal.js on lines 820..825
                      src/definitions/modules/nag.js on lines 308..313
                      src/definitions/modules/progress.js on lines 712..717
                      src/definitions/modules/rating.js on lines 316..321
                      src/definitions/modules/search.js on lines 1078..1083
                      src/definitions/modules/shape.js on lines 723..728
                      src/definitions/modules/sidebar.js on lines 816..821
                      src/definitions/modules/sticky.js on lines 774..779
                      src/definitions/modules/tab.js on lines 745..750
                      src/definitions/modules/transition.js on lines 886..891

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

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

                            if(methodInvoked) {
                              if(instance === undefined) {
                                module.initialize();
                              }
                              module.invoke(query);
                      Severity: Major
                      Found in src/definitions/modules/popup.js and 15 other locations - About 2 hrs to fix
                      src/definitions/behaviors/api.js on lines 1006..1017
                      src/definitions/modules/accordion.js on lines 537..548
                      src/definitions/modules/checkbox.js on lines 754..765
                      src/definitions/modules/dimmer.js on lines 638..649
                      src/definitions/modules/dropdown.js on lines 3677..3688
                      src/definitions/modules/embed.js on lines 557..568
                      src/definitions/modules/modal.js on lines 932..943
                      src/definitions/modules/nag.js on lines 421..432
                      src/definitions/modules/progress.js on lines 825..836
                      src/definitions/modules/rating.js on lines 430..441
                      src/definitions/modules/search.js on lines 1192..1203
                      src/definitions/modules/shape.js on lines 838..849
                      src/definitions/modules/sidebar.js on lines 930..941
                      src/definitions/modules/sticky.js on lines 886..897
                      src/definitions/modules/tab.js on lines 857..868

                      Duplicated Code

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

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

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

                      Tuning

                      This issue has a mass of 75.

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

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

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

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

                      Refactorings

                      Further Reading

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

                                clickaway: function() {
                                  module.verbose('Binding popup close event to document');
                                  $document
                                    .on('click' + elementNamespace, function(event) {
                                      module.verbose('Clicked away from popup');
                      Severity: Major
                      Found in src/definitions/modules/popup.js and 1 other location - About 1 hr to fix
                      src/definitions/modules/popup.js on lines 1028..1036

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

                              internal: function(name, value) {
                                if( $.isPlainObject(name) ) {
                                  $.extend(true, module, name);
                                }
                                else if(value !== undefined) {
                      Severity: Major
                      Found in src/definitions/modules/popup.js and 24 other locations - About 1 hr to fix
                      src/definitions/behaviors/api.js on lines 860..870
                      src/definitions/behaviors/form.js on lines 1037..1047
                      src/definitions/behaviors/form.js on lines 1048..1058
                      src/definitions/behaviors/visibility.js on lines 1031..1041
                      src/definitions/behaviors/visibility.js on lines 1042..1052
                      src/definitions/globals/site.js on lines 255..265
                      src/definitions/globals/site.js on lines 266..276
                      src/definitions/modules/checkbox.js on lines 608..618
                      src/definitions/modules/dimmer.js on lines 487..497
                      src/definitions/modules/dropdown.js on lines 3531..3541
                      src/definitions/modules/embed.js on lines 408..418
                      src/definitions/modules/modal.js on lines 787..797
                      src/definitions/modules/nag.js on lines 275..285
                      src/definitions/modules/popup.js on lines 1150..1160
                      src/definitions/modules/progress.js on lines 679..689
                      src/definitions/modules/rating.js on lines 283..293
                      src/definitions/modules/search.js on lines 1034..1044
                      src/definitions/modules/search.js on lines 1045..1055
                      src/definitions/modules/shape.js on lines 690..700
                      src/definitions/modules/sidebar.js on lines 783..793
                      src/definitions/modules/sticky.js on lines 730..740
                      src/definitions/modules/sticky.js on lines 741..751
                      src/definitions/modules/tab.js on lines 712..722
                      src/definitions/modules/transition.js on lines 853..863

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

                              setting: function(name, value) {
                                if( $.isPlainObject(name) ) {
                                  $.extend(true, settings, name);
                                }
                                else if(value !== undefined) {
                      Severity: Major
                      Found in src/definitions/modules/popup.js and 24 other locations - About 1 hr to fix
                      src/definitions/behaviors/api.js on lines 860..870
                      src/definitions/behaviors/form.js on lines 1037..1047
                      src/definitions/behaviors/form.js on lines 1048..1058
                      src/definitions/behaviors/visibility.js on lines 1031..1041
                      src/definitions/behaviors/visibility.js on lines 1042..1052
                      src/definitions/globals/site.js on lines 255..265
                      src/definitions/globals/site.js on lines 266..276
                      src/definitions/modules/checkbox.js on lines 608..618
                      src/definitions/modules/dimmer.js on lines 487..497
                      src/definitions/modules/dropdown.js on lines 3531..3541
                      src/definitions/modules/embed.js on lines 408..418
                      src/definitions/modules/modal.js on lines 787..797
                      src/definitions/modules/nag.js on lines 275..285
                      src/definitions/modules/popup.js on lines 1161..1171
                      src/definitions/modules/progress.js on lines 679..689
                      src/definitions/modules/rating.js on lines 283..293
                      src/definitions/modules/search.js on lines 1034..1044
                      src/definitions/modules/search.js on lines 1045..1055
                      src/definitions/modules/shape.js on lines 690..700
                      src/definitions/modules/sidebar.js on lines 783..793
                      src/definitions/modules/sticky.js on lines 730..740
                      src/definitions/modules/sticky.js on lines 741..751
                      src/definitions/modules/tab.js on lines 712..722
                      src/definitions/modules/transition.js on lines 853..863

                      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

                                touchClose: function() {
                                  module.verbose('Binding popup touchclose event to document');
                                  $document
                                    .on('touchstart' + elementNamespace, function(event) {
                                      module.verbose('Touched away from popup');
                      Severity: Major
                      Found in src/definitions/modules/popup.js and 1 other location - About 1 hr to fix
                      src/definitions/modules/popup.js on lines 1037..1045

                      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

                                    case 'top right':
                                      positioning = {
                                        bottom :  parent.height - target.top + distanceAway,
                                        right  :  parent.width - target.left - target.width - offset,
                                        top    : 'auto',
                      Severity: Major
                      Found in src/definitions/modules/popup.js and 1 other location - About 1 hr to fix
                      src/definitions/modules/popup.js on lines 875..882

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

                      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

                                    case 'bottom right':
                                      positioning = {
                                        top    : target.top + target.height + distanceAway,
                                        right  : parent.width - target.left  - target.width - offset,
                                        left   : 'auto',
                      Severity: Major
                      Found in src/definitions/modules/popup.js and 1 other location - About 1 hr to fix
                      src/definitions/modules/popup.js on lines 835..842

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

                      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

                              createID: function() {
                                id = (Math.random().toString(16) + '000000000').substr(2, 8);
                                elementNamespace = '.' + id;
                                module.verbose('Creating unique id for element', id);
                              },
                      Severity: Major
                      Found in src/definitions/modules/popup.js and 3 other locations - About 1 hr to fix
                      src/definitions/modules/dropdown.js on lines 188..192
                      src/definitions/modules/modal.js on lines 133..137
                      src/definitions/modules/sidebar.js on lines 116..120

                      Duplicated Code

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

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

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

                      Tuning

                      This issue has a mass of 68.

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

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

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

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

                      Refactorings

                      Further Reading

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

                              settings        = ( $.isPlainObject(parameters) )
                                ? $.extend(true, {}, $.fn.popup.settings, parameters)
                                : $.extend({}, $.fn.popup.settings),
                      Severity: Major
                      Found in src/definitions/modules/popup.js and 15 other locations - About 1 hr to fix
                      src/definitions/behaviors/api.js on lines 44..46
                      src/definitions/behaviors/visibility.js on lines 42..44
                      src/definitions/modules/accordion.js on lines 44..46
                      src/definitions/modules/dimmer.js on lines 39..41
                      src/definitions/modules/dropdown.js on lines 42..44
                      src/definitions/modules/embed.js on lines 42..44
                      src/definitions/modules/modal.js on lines 50..52
                      src/definitions/modules/nag.js on lines 38..40
                      src/definitions/modules/progress.js on lines 49..51
                      src/definitions/modules/rating.js on lines 38..40
                      src/definitions/modules/search.js on lines 38..40
                      src/definitions/modules/shape.js on lines 47..49
                      src/definitions/modules/sidebar.js on lines 51..53
                      src/definitions/modules/sticky.js on lines 39..41
                      src/definitions/modules/tab.js on lines 46..48

                      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

                              if(typeof text.title !== undefined && text.title) {
                                text.title = escape(text.title);
                                html += '<div class="header">' + text.title + '</div>';
                              }
                      Severity: Major
                      Found in src/definitions/modules/popup.js and 1 other location - About 1 hr to fix
                      src/definitions/modules/popup.js on lines 1520..1523

                      Duplicated Code

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

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

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

                      Tuning

                      This issue has a mass of 63.

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

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

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

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

                      Refactorings

                      Further Reading

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

                              if(typeof text.content !== undefined && text.content) {
                                text.content = escape(text.content);
                                html += '<div class="content">' + text.content + '</div>';
                              }
                      Severity: Major
                      Found in src/definitions/modules/popup.js and 1 other location - About 1 hr to fix
                      src/definitions/modules/popup.js on lines 1516..1519

                      Duplicated Code

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

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

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

                      Tuning

                      This issue has a mass of 63.

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

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

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

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

                      Refactorings

                      Further Reading

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

                      window = (typeof window != 'undefined' && window.Math == Math)
                        ? window
                        : (typeof self != 'undefined' && self.Math == Math)
                          ? self
                          : Function('return this')()
                      Severity: Major
                      Found in src/definitions/modules/popup.js and 17 other locations - About 1 hr to fix
                      src/definitions/behaviors/form.js on lines 15..20
                      src/definitions/behaviors/visibility.js on lines 15..20
                      src/definitions/modules/accordion.js on lines 15..20
                      src/definitions/modules/checkbox.js on lines 15..20
                      src/definitions/modules/dimmer.js on lines 15..20
                      src/definitions/modules/dropdown.js on lines 15..20
                      src/definitions/modules/embed.js on lines 15..20
                      src/definitions/modules/modal.js on lines 15..20
                      src/definitions/modules/nag.js on lines 15..20
                      src/definitions/modules/progress.js on lines 15..20
                      src/definitions/modules/rating.js on lines 15..20
                      src/definitions/modules/search.js on lines 15..20
                      src/definitions/modules/shape.js on lines 15..20
                      src/definitions/modules/sidebar.js on lines 15..20
                      src/definitions/modules/sticky.js on lines 15..20
                      src/definitions/modules/tab.js on lines 15..20
                      src/definitions/modules/transition.js on lines 15..20

                      Duplicated Code

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

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

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

                      Tuning

                      This issue has a mass of 62.

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

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

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

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

                      Refactorings

                      Further Reading

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

                        className   : {
                          active       : 'active',
                          basic        : 'basic',
                          animating    : 'animating',
                          dropdown     : 'dropdown',
                      Severity: Major
                      Found in src/definitions/modules/popup.js and 1 other location - About 1 hr to fix
                      src/definitions/modules/dimmer.js on lines 707..718

                      Duplicated Code

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

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

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

                      Tuning

                      This issue has a mass of 56.

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

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

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

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

                      Refactorings

                      Further Reading

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

                                closable: function() {
                                  if(settings.closable == 'auto') {
                                    if(settings.on == 'hover') {
                                      return false;
                                    }
                      Severity: Minor
                      Found in src/definitions/modules/popup.js and 1 other location - About 55 mins to fix
                      src/definitions/modules/dimmer.js on lines 364..372

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

                      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

                                startEvent: function() {
                                  if(settings.on == 'hover') {
                                    return 'mouseenter';
                                  }
                                  else if(settings.on == 'focus') {
                      Severity: Minor
                      Found in src/definitions/modules/popup.js and 1 other location - About 45 mins to fix
                      src/definitions/modules/popup.js on lines 608..616

                      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

                                endEvent: function() {
                                  if(settings.on == 'hover') {
                                    return 'mouseleave';
                                  }
                                  else if(settings.on == 'focus') {
                      Severity: Minor
                      Found in src/definitions/modules/popup.js and 1 other location - About 45 mins to fix
                      src/definitions/modules/popup.js on lines 596..604

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

                                  if( $popup && module.has.popup() ) {
                                    $popup
                                      .on('mouseenter' + eventNamespace, module.event.start)
                                      .on('mouseleave' + eventNamespace, module.event.end)
                                    ;
                      Severity: Major
                      Found in src/definitions/modules/popup.js and 2 other locations - About 40 mins to fix
                      src/definitions/modules/dropdown.js on lines 611..621
                      src/definitions/modules/sidebar.js on lines 174..179

                      Duplicated Code

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

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

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

                      Tuning

                      This issue has a mass of 49.

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

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

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

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

                      Refactorings

                      Further Reading

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

                                variation: function() {
                                  $module.removeData(metadata.variation);
                                  return $module.data(metadata.variation) || settings.variation;
                                },
                      Severity: Minor
                      Found in src/definitions/modules/popup.js and 2 other locations - About 40 mins to fix
                      src/definitions/modules/popup.js on lines 481..484
                      src/definitions/modules/popup.js on lines 485..488

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

                                html: function() {
                                  $module.removeData(metadata.html);
                                  return $module.data(metadata.html) || settings.html;
                                },
                      Severity: Minor
                      Found in src/definitions/modules/popup.js and 2 other locations - About 40 mins to fix
                      src/definitions/modules/popup.js on lines 485..488
                      src/definitions/modules/popup.js on lines 493..496

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

                                title: function() {
                                  $module.removeData(metadata.title);
                                  return $module.data(metadata.title) || settings.title;
                                },
                      Severity: Minor
                      Found in src/definitions/modules/popup.js and 2 other locations - About 40 mins to fix
                      src/definitions/modules/popup.js on lines 481..484
                      src/definitions/modules/popup.js on lines 493..496

                      Duplicated Code

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

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

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

                      Tuning

                      This issue has a mass of 48.

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

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

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

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

                      Refactorings

                      Further Reading

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

                                    if(position == 'top left' || position == 'bottom left') {
                                      offset += (target.width / 2)
                                      offset -= settings.arrowPixelsFromEdge;
                                    }
                      Severity: Minor
                      Found in src/definitions/modules/popup.js and 1 other location - About 30 mins to fix
                      src/definitions/modules/popup.js on lines 774..777

                      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(position == 'top right' || position == 'bottom right') {
                                      offset -= (target.width / 2)
                                      offset += settings.arrowPixelsFromEdge;
                                    }
                      Severity: Minor
                      Found in src/definitions/modules/popup.js and 1 other location - About 30 mins to fix
                      src/definitions/modules/popup.js on lines 770..773

                      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(module.is.hidden() && !( module.is.active() && module.is.dropdown()) ) {
                                  if( !module.exists() ) {
                                    module.create();
                                  }
                                  if(settings.onShow.call($popup, element) === false) {
                      Severity: Minor
                      Found in src/definitions/modules/popup.js and 1 other location - About 30 mins to fix
                      src/definitions/modules/dropdown.js on lines 473..475

                      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