CaffGeek/MBACNationals

View on GitHub

Showing 7,504 of 7,504 total issues

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

        (function(a){a.fn.hoverIntent=function(m,d,h){var j={interval:100,sensitivity:7,timeout:0};if(typeof m==="object"){j=a.extend(j,m)}else{if(a.isFunction(d)){j=a.extend(j,{over:m,out:d,selector:h})}else{j=a.extend(j,{over:m,out:m,selector:d})}}var l,k,g,f;var e=function(n){l=n.pageX;k=n.pageY};var c=function(o,n){n.hoverIntent_t=clearTimeout(n.hoverIntent_t);if((Math.abs(g-l)+Math.abs(f-k))<j.sensitivity){a(n).off("mousemove.hoverIntent",e);n.hoverIntent_s=1;return j.over.apply(n,[o])}else{g=l;f=k;n.hoverIntent_t=setTimeout(function(){c(o,n)},j.interval)}};var i=function(o,n){n.hoverIntent_t=clearTimeout(n.hoverIntent_t);n.hoverIntent_s=0;return j.out.apply(n,[o])};var b=function(p){var o=jQuery.extend({},p);var n=this;if(n.hoverIntent_t){n.hoverIntent_t=clearTimeout(n.hoverIntent_t)}if(p.type=="mouseenter"){g=o.pageX;f=o.pageY;a(n).on("mousemove.hoverIntent",e);if(n.hoverIntent_s!=1){n.hoverIntent_t=setTimeout(function(){c(o,n)},j.interval)}}else{a(n).off("mousemove.hoverIntent",e);if(n.hoverIntent_s==1){n.hoverIntent_t=setTimeout(function(){i(o,n)},j.timeout)}}};return this.on({"mouseenter.hoverIntent":b,"mouseleave.hoverIntent":b},j.selector)}})(jQuery);
Severity: Major
Found in Web.Admin/2014/wordpress/wp-includes/js/admin-bar.js and 1 other location - About 1 hr to fix
Web.Admin/2014/wordpress/wp-includes/js/hoverIntent.dev.js on lines 70..74

Duplicated Code

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

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

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

Tuning

This issue has a mass of 61.

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

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

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

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

Refactorings

Further Reading

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

          this.men = mens.sort((a, b) => b[this.stat] - a[this.stat]).slice(0, this.limit || 10);
Website/src/app/website/components/highscores/highscores.component.ts on lines 40..40
Website/src/app/website/components/highscores/highscores.component.ts on lines 55..55
Website/src/app/website/components/highscores/highscores.component.ts on lines 56..56

Duplicated Code

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

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

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

Tuning

This issue has a mass of 61.

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

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

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

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

Refactorings

Further Reading

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

          this.women = womens.sort((a, b) => b[this.stat] - a[this.stat]).slice(0, this.limit || 10);
Website/src/app/website/components/highscores/highscores.component.ts on lines 39..39
Website/src/app/website/components/highscores/highscores.component.ts on lines 55..55
Website/src/app/website/components/highscores/highscores.component.ts on lines 56..56

Duplicated Code

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

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

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

Tuning

This issue has a mass of 61.

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

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

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

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

Refactorings

Further Reading

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

          this.women = womensScores.sort((a, b) => b[this.stat] - a[this.stat]).slice(0, this.limit || 10);
Website/src/app/website/components/highscores/highscores.component.ts on lines 39..39
Website/src/app/website/components/highscores/highscores.component.ts on lines 40..40
Website/src/app/website/components/highscores/highscores.component.ts on lines 55..55

Duplicated Code

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

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

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

Tuning

This issue has a mass of 61.

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

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

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

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

Refactorings

Further Reading

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

          this.men = mensScores.sort((a, b) => b[this.stat] - a[this.stat]).slice(0, this.limit || 10);
Website/src/app/website/components/highscores/highscores.component.ts on lines 39..39
Website/src/app/website/components/highscores/highscores.component.ts on lines 40..40
Website/src/app/website/components/highscores/highscores.component.ts on lines 56..56

Duplicated Code

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

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

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

Tuning

This issue has a mass of 61.

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

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

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

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

Refactorings

Further Reading

Function MockHttpExpectation has 32 lines of code (exceeds 25 allowed). Consider refactoring.
Open

function MockHttpExpectation(method, url, data, headers) {

  this.data = data;
  this.headers = headers;

Severity: Minor
Found in Web.Admin/z-scripts/angular-mocks.js - About 1 hr to fix

    Function getDropFiles has 32 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

                getDropFiles: function (evt, callback){
                    var
                          files = []
                        , dataTransfer = _getDataTransfer(evt)
                        , entrySupport = _isArray(dataTransfer.items) && dataTransfer.items[0] && _getAsEntry(dataTransfer.items[0])
    Severity: Minor
    Found in Web.Admin/z-scripts/FileAPI.js - About 1 hr to fix

      Function $RootScopeDecorator has 32 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      angular.mock.$RootScopeDecorator = ['$delegate', function($delegate) {
      
        var $rootScopePrototype = Object.getPrototypeOf($delegate);
      
        $rootScopePrototype.$countChildScopes = countChildScopes;
      Severity: Minor
      Found in Web.Admin/z-scripts/angular-mocks.js - About 1 hr to fix

        Function ResponsiveNav has 32 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            var ResponsiveNav = function (el, options) {
                var i;
        
                // Default options
                this.options = {
        Severity: Minor
        Found in Web.Admin/2015/js/responsive-nav.js - About 1 hr to fix

          Function setupPaging has 32 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

                          setupPaging: function() {
                              var type = 'control-paging',
                                  j = 1,
                                  item,
                                  slide,

            Function ensure has 32 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                    ensure: function( id, context ) {
                        var diff     = this.get( id ),
                            request  = this.requests[ id ],
                            deferred = $.Deferred(),
                            ids      = {},
            Severity: Minor
            Found in Web.Admin/2014/wordpress/wp-admin/js/revisions.js - About 1 hr to fix

              Function ready has 32 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                      ready: function() {
                          var control = this;
              
                          this.params.removed = this.params.removed || '';
              
              
              Severity: Minor
              Found in Web.Admin/2014/wordpress/wp-admin/js/customize-controls.js - About 1 hr to fix

                Function _setupSortable has 32 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                        _setupSortable: function() {
                            var self = this;
                
                            this.isReordering = false;
                
                
                Severity: Minor
                Found in Web.Admin/2014/wordpress/wp-admin/js/customize-widgets.js - About 1 hr to fix

                  Function setup has 32 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      setup : function() {
                          var t = this, a, ed = t.editor, g, columns, link, order, orderby;
                          if ( ! t.mcemode ) return;
                  
                          t.restoreSelection();
                  Severity: Minor
                  Found in Web.Admin/2014/wordpress/wp-admin/js/gallery.dev.js - About 1 hr to fix

                    Function _create has 32 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                            _create: function() {
                                // bail early for unsupported Iris.
                                if ( ! $.support.iris )
                                    return;
                                var self = this,
                    Severity: Minor
                    Found in Web.Admin/2014/wordpress/wp-admin/js/color-picker.js - About 1 hr to fix

                      Function ResponsiveNav has 32 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          var ResponsiveNav = function (el, options) {
                              var i;
                      
                              // Default options
                              this.options = {
                      Severity: Minor
                      Found in Web.Admin/2014/js/responsive-nav.js - About 1 hr to fix

                        Function refreshKeyboardAccessibility has 32 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                                refreshKeyboardAccessibility : function() {
                                    $( '.item-edit' ).off( 'focus' ).on( 'focus', function(){
                                        $(this).off( 'keydown' ).on( 'keydown', function(e){
                        
                                            var arrows,
                        Severity: Minor
                        Found in Web.Admin/2014/wordpress/wp-admin/js/nav-menu.js - About 1 hr to fix

                          Function formToArray has 32 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                          $.fn.formToArray = function(semantic) {
                              var a = [];
                              if (this.length == 0) return a;
                          
                              var form = this[0];
                          Severity: Minor
                          Found in Web.Admin/2014/wordpress/wp-includes/js/jquery/jquery.form.dev.js - About 1 hr to fix

                            Function find has 32 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                    function find(direction) {
                                        el = DOM.select(':input:enabled,*[tabindex]:not(iframe)');
                            
                                        function canSelectRecursive(e) {
                                            return e.nodeName === "BODY" || (e.type != 'hidden' &&

                              Function autosave_parse_response has 32 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                              function autosave_parse_response(response) {
                                  var res = wpAjax.parseAjaxResponse(response, 'autosave'), message = '', postID, sup, url;
                              
                                  if ( res && res.responses && res.responses.length ) {
                                      message = res.responses[0].data; // The saved message or error.
                              Severity: Minor
                              Found in Web.Admin/2014/wordpress/wp-includes/js/autosave.dev.js - About 1 hr to fix
                                Severity
                                Category
                                Status
                                Source
                                Language