CaffGeek/MBACNationals

View on GitHub

Showing 7,504 of 7,504 total issues

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

String.prototype.gsub.prepareReplacement = function(replacement) {
  if (Object.isFunction(replacement)) return replacement;
  var template = new Template(replacement);
  return function(match) { return template.evaluate(match) };
};
Web.Admin/2014/wordpress/wp-includes/js/prototype.js on lines 536..540

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

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

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

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

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

Refactorings

Further Reading

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

        {
            return dragDiv(ord,hdep++)
                .css({ top: px(-hhs+1), left: px(-hhs+1), opacity: options.handleOpacity })
                .addClass(cssClass('handle'));
        };
Web.Admin/2014/wordpress/wp-includes/js/jcrop/jquery.Jcrop.js on lines 65..65

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

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

            $.ajax({
                type : 'POST',
                url : ajaxurl,
                data : post,
                success : function(x) { findPosts.show(x); },
Severity: Major
Found in Web.Admin/2014/wordpress/wp-admin/js/media.dev.js and 1 other location - About 1 hr to fix
Web.Admin/2014/wordpress/wp-admin/js/edit-comments.dev.js on lines 390..396

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

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

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

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

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

Refactorings

Further Reading

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

    if ( type = jQuery('#type-of-' + id).val() )
        jQuery('#' + type + '-counter').text( jQuery('#' + type + '-counter').text() - 1 );
Web.Admin/2014/wordpress/wp-includes/js/swfupload/handlers.dev.js on lines 152..153

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

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

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

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

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

Refactorings

Further Reading

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

        for (i=0; i<li.length; i++) {
            it = li[i].split('=');
            q[unescape(it[0])] = unescape(it[1]);
        }
Severity: Major
Found in Web.Admin/2014/wordpress/wp-admin/js/gallery.dev.js and 1 other location - About 1 hr to fix
Web.Admin/2014/wordpress/wp-includes/js/tinymce/plugins/wpeditimage/js/editimage.js on lines 10..13

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

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

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

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

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

Refactorings

Further Reading

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

{return dragDiv(ord,hdep++).css({top:px(-hhs+1),left:px(-hhs+1),opacity:options.handleOpacity}).addClass(cssClass('handle'));};function insertDragbar(ord)
Web.Admin/2014/wordpress/wp-includes/js/jcrop/jquery.Jcrop.dev.js on lines 468..472

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

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

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

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

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

Refactorings

Further Reading

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

        for (i=0; i<li.length; i++) {
            it = li[i].split('=');
            q[unescape(it[0])] = unescape(it[1]);
        }
Web.Admin/2014/wordpress/wp-admin/js/gallery.dev.js on lines 93..96

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

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

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

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

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

Refactorings

Further Reading

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

    if (!this.options.sync)
      Effect.Queues.get(Object.isString(this.options.queue) ? 
        'global' : this.options.queue.scope).add(this);
Web.Admin/2014/wordpress/wp-includes/js/scriptaculous/effects.js on lines 291..293

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

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

        $.ajax({
            type : 'POST',
            url : ajaxurl,
            data : post,
            success : function(x) { commentReply.show(x); },
Severity: Major
Found in Web.Admin/2014/wordpress/wp-admin/js/edit-comments.dev.js and 1 other location - About 1 hr to fix
Web.Admin/2014/wordpress/wp-admin/js/media.dev.js on lines 39..45

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

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

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

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

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

Refactorings

Further Reading

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

    if (!this.options.sync)
      Effect.Queues.get(Object.isString(this.options.queue) ? 
        'global' : this.options.queue.scope).remove(this);
Web.Admin/2014/wordpress/wp-includes/js/scriptaculous/effects.js on lines 268..270

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

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 traverseFileTree has 44 lines of code (exceeds 25 allowed). Consider refactoring.
Open

        function traverseFileTree(files, entry, path) {
            if (entry != null) {
                if (entry.isDirectory) {
                    var filePath = (path || '') + entry.name;
                    addFile({name: entry.name, type: 'directory', path: filePath});
Severity: Minor
Found in Web.Admin/z-scripts/ng-file-upload-all.js - About 1 hr to fix

    Function dnd has 44 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        api.event.dnd = function (el, onHover, onDrop){
            var _id, _type;
    
            if( !onDrop ){
                onDrop = onHover;
    Severity: Minor
    Found in Web.Admin/z-scripts/FileAPI.js - About 1 hr to fix

      Function traverseFileTree has 44 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

              function traverseFileTree(files, entry, path) {
                  if (entry != null) {
                      if (entry.isDirectory) {
                          var filePath = (path || '') + entry.name;
                          addFile({name: entry.name, type: 'directory', path: filePath});
      Severity: Minor
      Found in Web.Admin/z-scripts/ng-file-upload.js - About 1 hr to fix

        Function rebuildController has 44 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            var rebuildController = function ($http, $q) {
                var vm = this;
        
                vm.readmodels = [
                    { Name: 'All' },
        Severity: Minor
        Found in Web.Admin/AdminApp/Controllers/controller.rebuild.js - About 1 hr to fix

          Function stepladderController has 44 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              var stepladderController = function ($http, $location, dataService) {
                  var url = $location.absUrl();
                  var lastSlash = url.lastIndexOf('/');
                  var year = url.slice(lastSlash + 1) || new Date().getFullYear();
          
          
          Severity: Minor
          Found in Web.Admin/AdminApp/Controllers/controller.stepladder.js - About 1 hr to fix

            Function _slide has 44 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                    var _slide = function(params, complete, fade, door) {
            
                        var easing = this.getOptions('easing'),
                            distance = this.getStageWidth(),
                            from = { left: distance * ( params.rewind ? -1 : 1 ) },
            Severity: Minor
            Found in Web.Admin/2015/js/galleria/galleria-1.4.2.js - About 1 hr to fix

              Function updateScoreInfo has 44 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                      function updateScoreInfo(position) {
                          var homeBowler = ($.grep($scope.model.Home.Bowlers, function (o) { return o.Position == position; }) || [])[0];
                          var awayBowler = ($.grep($scope.model.Away.Bowlers, function (o) { return o.Position == position; }) || [])[0];
              
                          if ($scope.model.IsTeam) {
              Severity: Minor
              Found in Web.Admin/AdminApp/Controllers/controller.scoreentry.js - About 1 hr to fix

                Function toggleForm has 44 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                        toggleForm: function( showOrHide ) {
                            var self = this, $widget, $inside, complete;
                
                            $widget = this.container.find( 'div.widget:first' );
                            $inside = $widget.find( '.widget-inside:first' );
                Severity: Minor
                Found in Web.Admin/2014/wordpress/wp-admin/js/customize-widgets.js - About 1 hr to fix

                  Function inspector has 44 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                          var inspector = function(event) {
                              event = jQuery.event.fix(event); // jQuery event normalization.
                              var element = event.target;
                              // @ TextNode -> nodeType == 3
                              element = (element.nodeType==3) ? element.parentNode : element;

                    Function updateStyle has 44 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        updateStyle : function(ty) {
                            var dom = tinyMCEPopup.dom, st, v, f = document.forms[0], img = dom.create('img', {style : f.img_style.value});
                    
                            if (tinyMCEPopup.editor.settings.inline_styles) {
                                // Handle align
                      Severity
                      Category
                      Status
                      Source
                      Language