Semantic-Org/Semantic-UI

View on GitHub
src/definitions/behaviors/visibility.js

Summary

Maintainability
F
3 wks
Test Coverage

Function visibility has 1096 lines of code (exceeds 25 allowed). Consider refactoring.
Open

$.fn.visibility = function(parameters) {
  var
    $allModules    = $(this),
    moduleSelector = $allModules.selector || '',

Severity: Major
Found in src/definitions/behaviors/visibility.js - About 5 days to fix

    File visibility.js has 1160 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    /*!
     * # Semantic UI - Visibility
     * http://github.com/semantic-org/semantic-ui/
     *
     *
    Severity: Major
    Found in src/definitions/behaviors/visibility.js - About 2 days 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 src/definitions/behaviors/visibility.js - About 2 hrs to fix

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

                  elementCalculations: function() {
                    var
                      screen     = module.get.screenCalculations(),
                      element    = module.get.elementPosition()
                    ;
        Severity: Minor
        Found in src/definitions/behaviors/visibility.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/behaviors/visibility.js - About 1 hr to fix

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

                    invoke: function(query, passedArguments, context) {
                      var
                        object = instance,
                        maxDepth,
                        found,
            Severity: Major
            Found in src/definitions/behaviors/visibility.js and 11 other locations - About 2 days to fix
            src/definitions/behaviors/api.js on lines 950..1003
            src/definitions/globals/site.js on lines 351..404
            src/definitions/modules/accordion.js on lines 482..535
            src/definitions/modules/checkbox.js on lines 698..751
            src/definitions/modules/dimmer.js on lines 580..633
            src/definitions/modules/dropdown.js on lines 3621..3674
            src/definitions/modules/embed.js on lines 501..554
            src/definitions/modules/nag.js on lines 365..418
            src/definitions/modules/progress.js on lines 769..822
            src/definitions/modules/sidebar.js on lines 873..926
            src/definitions/modules/tab.js on lines 802..855

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

                    performance: {
                      log: function(message) {
                        var
                          currentTime,
                          executionTime,
            Severity: Major
            Found in src/definitions/behaviors/visibility.js and 10 other locations - About 2 days to fix
            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/popup.js on lines 1200..1250
            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 5 locations. Consider refactoring.
            Open

                    bottomVisibleReverse: function(newCallback) {
                      var
                        calculations = module.get.elementCalculations(),
                        callback     = newCallback || settings.onBottomVisibleReverse,
                        callbackName = 'bottomVisibleReverse'
            Severity: Major
            Found in src/definitions/behaviors/visibility.js and 4 other locations - About 6 hrs to fix
            src/definitions/behaviors/visibility.js on lines 679..700
            src/definitions/behaviors/visibility.js on lines 703..724
            src/definitions/behaviors/visibility.js on lines 749..770
            src/definitions/behaviors/visibility.js on lines 772..793

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

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

                    passingReverse: function(newCallback) {
                      var
                        calculations = module.get.elementCalculations(),
                        callback     = newCallback || settings.onPassingReverse,
                        callbackName = 'passingReverse'
            Severity: Major
            Found in src/definitions/behaviors/visibility.js and 4 other locations - About 6 hrs to fix
            src/definitions/behaviors/visibility.js on lines 703..724
            src/definitions/behaviors/visibility.js on lines 726..747
            src/definitions/behaviors/visibility.js on lines 749..770
            src/definitions/behaviors/visibility.js on lines 772..793

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

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

                    topVisibleReverse: function(newCallback) {
                      var
                        calculations = module.get.elementCalculations(),
                        callback     = newCallback || settings.onTopVisibleReverse,
                        callbackName = 'topVisibleReverse'
            Severity: Major
            Found in src/definitions/behaviors/visibility.js and 4 other locations - About 6 hrs to fix
            src/definitions/behaviors/visibility.js on lines 679..700
            src/definitions/behaviors/visibility.js on lines 726..747
            src/definitions/behaviors/visibility.js on lines 749..770
            src/definitions/behaviors/visibility.js on lines 772..793

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

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

                    bottomPassedReverse: function(newCallback) {
                      var
                        calculations = module.get.elementCalculations(),
                        callback     = newCallback || settings.onBottomPassedReverse,
                        callbackName = 'bottomPassedReverse'
            Severity: Major
            Found in src/definitions/behaviors/visibility.js and 4 other locations - About 6 hrs to fix
            src/definitions/behaviors/visibility.js on lines 679..700
            src/definitions/behaviors/visibility.js on lines 703..724
            src/definitions/behaviors/visibility.js on lines 726..747
            src/definitions/behaviors/visibility.js on lines 749..770

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

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

                    topPassedReverse: function(newCallback) {
                      var
                        calculations = module.get.elementCalculations(),
                        callback     = newCallback || settings.onTopPassedReverse,
                        callbackName = 'topPassedReverse'
            Severity: Major
            Found in src/definitions/behaviors/visibility.js and 4 other locations - About 6 hrs to fix
            src/definitions/behaviors/visibility.js on lines 679..700
            src/definitions/behaviors/visibility.js on lines 703..724
            src/definitions/behaviors/visibility.js on lines 726..747
            src/definitions/behaviors/visibility.js on lines 772..793

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

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

                    offScreen: function(newCallback) {
                      var
                        calculations = module.get.elementCalculations(),
                        callback     = newCallback || settings.onOffScreen,
                        callbackName = 'offScreen'
            Severity: Major
            Found in src/definitions/behaviors/visibility.js and 6 other locations - About 5 hrs to fix
            src/definitions/behaviors/visibility.js on lines 531..550
            src/definitions/behaviors/visibility.js on lines 573..592
            src/definitions/behaviors/visibility.js on lines 595..614
            src/definitions/behaviors/visibility.js on lines 616..635
            src/definitions/behaviors/visibility.js on lines 637..656
            src/definitions/behaviors/visibility.js on lines 658..677

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

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

                    bottomVisible: function(newCallback) {
                      var
                        calculations = module.get.elementCalculations(),
                        callback     = newCallback || settings.onBottomVisible,
                        callbackName = 'bottomVisible'
            Severity: Major
            Found in src/definitions/behaviors/visibility.js and 6 other locations - About 5 hrs to fix
            src/definitions/behaviors/visibility.js on lines 531..550
            src/definitions/behaviors/visibility.js on lines 552..571
            src/definitions/behaviors/visibility.js on lines 573..592
            src/definitions/behaviors/visibility.js on lines 595..614
            src/definitions/behaviors/visibility.js on lines 637..656
            src/definitions/behaviors/visibility.js on lines 658..677

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

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

                    topPassed: function(newCallback) {
                      var
                        calculations = module.get.elementCalculations(),
                        callback     = newCallback || settings.onTopPassed,
                        callbackName = 'topPassed'
            Severity: Major
            Found in src/definitions/behaviors/visibility.js and 6 other locations - About 5 hrs to fix
            src/definitions/behaviors/visibility.js on lines 531..550
            src/definitions/behaviors/visibility.js on lines 552..571
            src/definitions/behaviors/visibility.js on lines 573..592
            src/definitions/behaviors/visibility.js on lines 595..614
            src/definitions/behaviors/visibility.js on lines 616..635
            src/definitions/behaviors/visibility.js on lines 658..677

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

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

                    topVisible: function(newCallback) {
                      var
                        calculations = module.get.elementCalculations(),
                        callback     = newCallback || settings.onTopVisible,
                        callbackName = 'topVisible'
            Severity: Major
            Found in src/definitions/behaviors/visibility.js and 6 other locations - About 5 hrs to fix
            src/definitions/behaviors/visibility.js on lines 531..550
            src/definitions/behaviors/visibility.js on lines 552..571
            src/definitions/behaviors/visibility.js on lines 573..592
            src/definitions/behaviors/visibility.js on lines 616..635
            src/definitions/behaviors/visibility.js on lines 637..656
            src/definitions/behaviors/visibility.js on lines 658..677

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

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

                    bottomPassed: function(newCallback) {
                      var
                        calculations = module.get.elementCalculations(),
                        callback     = newCallback || settings.onBottomPassed,
                        callbackName = 'bottomPassed'
            Severity: Major
            Found in src/definitions/behaviors/visibility.js and 6 other locations - About 5 hrs to fix
            src/definitions/behaviors/visibility.js on lines 531..550
            src/definitions/behaviors/visibility.js on lines 552..571
            src/definitions/behaviors/visibility.js on lines 573..592
            src/definitions/behaviors/visibility.js on lines 595..614
            src/definitions/behaviors/visibility.js on lines 616..635
            src/definitions/behaviors/visibility.js on lines 637..656

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

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

                    onScreen: function(newCallback) {
                      var
                        calculations = module.get.elementCalculations(),
                        callback     = newCallback || settings.onOnScreen,
                        callbackName = 'onScreen'
            Severity: Major
            Found in src/definitions/behaviors/visibility.js and 6 other locations - About 5 hrs to fix
            src/definitions/behaviors/visibility.js on lines 552..571
            src/definitions/behaviors/visibility.js on lines 573..592
            src/definitions/behaviors/visibility.js on lines 595..614
            src/definitions/behaviors/visibility.js on lines 616..635
            src/definitions/behaviors/visibility.js on lines 637..656
            src/definitions/behaviors/visibility.js on lines 658..677

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

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

                    passing: function(newCallback) {
                      var
                        calculations = module.get.elementCalculations(),
                        callback     = newCallback || settings.onPassing,
                        callbackName = 'passing'
            Severity: Major
            Found in src/definitions/behaviors/visibility.js and 6 other locations - About 5 hrs to fix
            src/definitions/behaviors/visibility.js on lines 531..550
            src/definitions/behaviors/visibility.js on lines 552..571
            src/definitions/behaviors/visibility.js on lines 595..614
            src/definitions/behaviors/visibility.js on lines 616..635
            src/definitions/behaviors/visibility.js on lines 637..656
            src/definitions/behaviors/visibility.js on lines 658..677

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

            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

                      contextChanged: 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/behaviors/visibility.js and 2 other locations - About 4 hrs to fix
            src/definitions/modules/popup.js on lines 210..221
            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/behaviors/visibility.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/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/popup.js on lines 1183..1193
            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/behaviors/visibility.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/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/popup.js on lines 1172..1182
            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 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/behaviors/visibility.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/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/popup.js on lines 1194..1199
            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 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/behaviors/visibility.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 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/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 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/behaviors/visibility.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/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/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 16 locations. Consider refactoring.
            Open

                    settings        = ( $.isPlainObject(parameters) )
                      ? $.extend(true, {}, $.fn.visibility.settings, parameters)
                      : $.extend({}, $.fn.visibility.settings),
            Severity: Major
            Found in src/definitions/behaviors/visibility.js and 15 other locations - About 1 hr to fix
            src/definitions/behaviors/api.js on lines 44..46
            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/popup.js on lines 44..46
            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

                      calculations: function() {
                        module.verbose('Saving all calculations necessary to determine positioning');
                        module.save.direction();
                        module.save.screenCalculations();
                        module.save.elementCalculations();
            Severity: Major
            Found in src/definitions/behaviors/visibility.js and 1 other location - About 1 hr to fix
            src/definitions/modules/transition.js on lines 202..207

            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/behaviors/visibility.js and 17 other locations - About 1 hr to fix
            src/definitions/behaviors/form.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/popup.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

                        $context
                          .off('scroll'      + eventNamespace)
                          .on('scroll'       + eventNamespace, module.event.scroll)
                          .on('scrollchange' + eventNamespace, module.event.scrollchange)
                        ;
            Severity: Major
            Found in src/definitions/behaviors/visibility.js and 1 other location - About 1 hr to fix
            src/definitions/modules/sticky.js on lines 177..181

            Duplicated Code

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

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

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

            Tuning

            This issue has a mass of 59.

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

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

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

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

            Refactorings

            Further Reading

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

                      verticallyScrollableContext: function() {
                        var
                          overflowY = ($context.get(0) !== window)
                            ? $context.css('overflow-y')
                            : false
            Severity: Major
            Found in src/definitions/behaviors/visibility.js and 3 other locations - About 1 hr to fix
            src/definitions/behaviors/visibility.js on lines 434..441
            src/definitions/modules/dropdown.js on lines 3236..3243
            src/definitions/modules/dropdown.js on lines 3244..3251

            Duplicated Code

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

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

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

            Tuning

            This issue has a mass of 58.

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

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

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

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

            Refactorings

            Further Reading

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

                      horizontallyScrollableContext: function() {
                        var
                          overflowX = ($context.get(0) !== window)
                            ? $context.css('overflow-x')
                            : false
            Severity: Major
            Found in src/definitions/behaviors/visibility.js and 3 other locations - About 1 hr to fix
            src/definitions/behaviors/visibility.js on lines 426..433
            src/definitions/modules/dropdown.js on lines 3236..3243
            src/definitions/modules/dropdown.js on lines 3244..3251

            Duplicated Code

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

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

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

            Tuning

            This issue has a mass of 58.

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

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

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

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

            Refactorings

            Further Reading

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

                      screenCalculations: function() {
                        if(module.cache.screen === undefined) {
                          module.save.screenCalculations();
                        }
                        return module.cache.screen;
            Severity: Major
            Found in src/definitions/behaviors/visibility.js and 5 other locations - About 55 mins to fix
            src/definitions/behaviors/visibility.js on lines 986..991
            src/definitions/behaviors/visibility.js on lines 992..997
            src/definitions/behaviors/visibility.js on lines 998..1003
            src/definitions/behaviors/visibility.js on lines 1010..1015
            src/definitions/behaviors/visibility.js on lines 1016..1021

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

                      scroll: function() {
                        if(module.cache.scroll === undefined) {
                          module.save.scroll();
                        }
                        return module.cache.scroll;
            Severity: Major
            Found in src/definitions/behaviors/visibility.js and 5 other locations - About 55 mins to fix
            src/definitions/behaviors/visibility.js on lines 986..991
            src/definitions/behaviors/visibility.js on lines 992..997
            src/definitions/behaviors/visibility.js on lines 998..1003
            src/definitions/behaviors/visibility.js on lines 1004..1009
            src/definitions/behaviors/visibility.js on lines 1010..1015

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

                      elementPosition: function() {
                        if(module.cache.element === undefined) {
                          module.save.elementPosition();
                        }
                        return module.cache.element;
            Severity: Major
            Found in src/definitions/behaviors/visibility.js and 5 other locations - About 55 mins to fix
            src/definitions/behaviors/visibility.js on lines 986..991
            src/definitions/behaviors/visibility.js on lines 998..1003
            src/definitions/behaviors/visibility.js on lines 1004..1009
            src/definitions/behaviors/visibility.js on lines 1010..1015
            src/definitions/behaviors/visibility.js on lines 1016..1021

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

                      elementCalculations: function() {
                        if(module.cache.element === undefined) {
                          module.save.elementCalculations();
                        }
                        return module.cache.element;
            Severity: Major
            Found in src/definitions/behaviors/visibility.js and 5 other locations - About 55 mins to fix
            src/definitions/behaviors/visibility.js on lines 986..991
            src/definitions/behaviors/visibility.js on lines 992..997
            src/definitions/behaviors/visibility.js on lines 1004..1009
            src/definitions/behaviors/visibility.js on lines 1010..1015
            src/definitions/behaviors/visibility.js on lines 1016..1021

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

                      screenSize: function() {
                        if(module.cache.screen === undefined) {
                          module.save.screenSize();
                        }
                        return module.cache.screen;
            Severity: Major
            Found in src/definitions/behaviors/visibility.js and 5 other locations - About 55 mins to fix
            src/definitions/behaviors/visibility.js on lines 986..991
            src/definitions/behaviors/visibility.js on lines 992..997
            src/definitions/behaviors/visibility.js on lines 998..1003
            src/definitions/behaviors/visibility.js on lines 1004..1009
            src/definitions/behaviors/visibility.js on lines 1016..1021

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

                      direction: function() {
                        if(module.cache.direction === undefined) {
                          module.save.direction();
                        }
                        return module.cache.direction;
            Severity: Major
            Found in src/definitions/behaviors/visibility.js and 5 other locations - About 55 mins to fix
            src/definitions/behaviors/visibility.js on lines 992..997
            src/definitions/behaviors/visibility.js on lines 998..1003
            src/definitions/behaviors/visibility.js on lines 1004..1009
            src/definitions/behaviors/visibility.js on lines 1010..1015
            src/definitions/behaviors/visibility.js on lines 1016..1021

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

                    requestAnimationFrame = window.requestAnimationFrame
                      || window.mozRequestAnimationFrame
                      || window.webkitRequestAnimationFrame
                      || window.msRequestAnimationFrame
                      || function(callback) { setTimeout(callback, 0); },
            Severity: Major
            Found in src/definitions/behaviors/visibility.js and 7 other locations - About 50 mins to fix
            src/definitions/modules/accordion.js on lines 33..37
            src/definitions/modules/modal.js on lines 38..42
            src/definitions/modules/nag.js on lines 73..77
            src/definitions/modules/shape.js on lines 34..38
            src/definitions/modules/sidebar.js on lines 39..43
            src/definitions/modules/sticky.js on lines 59..63
            src/definitions/modules/transition.js on lines 35..39

            Duplicated Code

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

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

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

            Tuning

            This issue has a mass of 51.

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

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

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

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

            Refactorings

            Further Reading

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

                    hide: {
                      placeholder: function() {
                        module.verbose('Hiding placeholder');
                        $placeholder
                          .css('display', 'none')
            Severity: Minor
            Found in src/definitions/behaviors/visibility.js and 1 other location - About 40 mins to fix
            src/definitions/behaviors/visibility.js on lines 352..360

            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

                    show: {
                      placeholder: function() {
                        module.verbose('Showing placeholder');
                        $placeholder
                          .css('display', 'block')
            Severity: Minor
            Found in src/definitions/behaviors/visibility.js and 1 other location - About 40 mins to fix
            src/definitions/behaviors/visibility.js on lines 361..369

            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

            There are no issues that match your filters.

            Category
            Status