CaffGeek/MBACNationals

View on GitHub

Showing 7,504 of 7,504 total issues

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

        for(i=0;i<Language.syntax.length;i++) 
            x = x.replace(Language.syntax[i].input,Language.syntax[i].output);
Web.Admin/2014/wordpress/wp-includes/js/codepress/engines/gecko.js on lines 118..119
Web.Admin/2014/wordpress/wp-includes/js/codepress/engines/msie.js on lines 134..135

Duplicated Code

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

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

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

Tuning

This issue has a mass of 66.

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

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

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

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

Refactorings

Further Reading

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

        for(i=0;i<Language.syntax.length;i++) 
            x = x.replace(Language.syntax[i].input,Language.syntax[i].output);
Web.Admin/2014/wordpress/wp-includes/js/codepress/engines/gecko.js on lines 118..119
Web.Admin/2014/wordpress/wp-includes/js/codepress/engines/opera.js on lines 117..118

Duplicated Code

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

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

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

Tuning

This issue has a mass of 66.

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

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

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

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

Refactorings

Further Reading

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

        if (isNaN(window.screenX)) {
            x=coordinates.x-document.body.scrollLeft+window.screenLeft;
            y=coordinates.y-document.body.scrollTop+window.screenTop;
            }
        else {
Severity: Major
Found in Web.Admin/2014/wordpress/wp-includes/js/colorpicker.dev.js and 1 other location - About 1 hr to fix
Web.Admin/2014/wordpress/wp-includes/js/colorpicker.dev.js on lines 121..128

Duplicated Code

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

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

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

Tuning

This issue has a mass of 66.

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

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

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

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

Refactorings

Further Reading

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

            browser.toolbar.set( 'reverse', {
                text:     l10n.reverseOrder,
                priority: 80,

                click: function() {
Severity: Major
Found in Web.Admin/2014/wordpress/wp-includes/js/media-views.js and 1 other location - About 1 hr to fix
Web.Admin/2014/wordpress/wp-includes/js/media-views.js on lines 1020..1027

Duplicated Code

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

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

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

Tuning

This issue has a mass of 66.

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

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

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

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

Refactorings

Further Reading

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

{var jq=$('<div />').mousedown(createDragger(ord)).css({cursor:ord+'-resize',position:'absolute',zIndex:zi});$hdl_holder.append(jq);return jq;};function insertHandle(ord)
Web.Admin/2014/wordpress/wp-includes/js/jcrop/jquery.Jcrop.dev.js on lines 454..465

Duplicated Code

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

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

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

Tuning

This issue has a mass of 66.

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

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

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

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

Refactorings

Further Reading

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

    else if (document.all) {
        x=coordinates.x-document.body.scrollLeft+window.screenLeft;
        y=coordinates.y-document.body.scrollTop+window.screenTop;
        }
    else if (document.layers) {
Severity: Major
Found in Web.Admin/2014/wordpress/wp-includes/js/colorpicker.dev.js and 1 other location - About 1 hr to fix
Web.Admin/2014/wordpress/wp-includes/js/colorpicker.dev.js on lines 112..119

Duplicated Code

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

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

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

Tuning

This issue has a mass of 66.

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

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

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

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

Refactorings

Further Reading

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

        {
            var jq = $('<div />')
                .mousedown(createDragger(ord))
                .css({
                    cursor: ord+'-resize',
Web.Admin/2014/wordpress/wp-includes/js/jcrop/jquery.Jcrop.js on lines 64..64

Duplicated Code

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

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

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

Tuning

This issue has a mass of 66.

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

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

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

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

Refactorings

Further Reading

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

  enterHover: function(e) {
    if (this.options.hoverClassName)
      this.element.addClassName(this.options.hoverClassName);
    if (this._saving) return;
    this.triggerCallback('onEnterHover');
Web.Admin/2014/wordpress/wp-includes/js/scriptaculous/controls.js on lines 662..667

Duplicated Code

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

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

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

Tuning

This issue has a mass of 66.

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

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

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

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

Refactorings

Further Reading

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

            browser.toolbar.set( 'reverse', {
                text:     l10n.reverseOrder,
                priority: 80,

                click: function() {
Severity: Major
Found in Web.Admin/2014/wordpress/wp-includes/js/media-views.js and 1 other location - About 1 hr to fix
Web.Admin/2014/wordpress/wp-includes/js/media-views.js on lines 856..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 66.

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

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

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

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

Refactorings

Further Reading

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

  leaveHover: function(e) {
    if (this.options.hoverClassName)
      this.element.removeClassName(this.options.hoverClassName);
    if (this._saving) return;
    this.triggerCallback('onLeaveHover');
Web.Admin/2014/wordpress/wp-includes/js/scriptaculous/controls.js on lines 602..607

Duplicated Code

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

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

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

Tuning

This issue has a mass of 66.

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

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

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

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

Refactorings

Further Reading

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

function $StateRefActiveDirective($state, $stateParams, $interpolate) {
  return  {
    restrict: "A",
    controller: ['$scope', '$element', '$attrs', function ($scope, $element, $attrs) {
      var states = [], activeClass;
Severity: Minor
Found in Web.Admin/z-scripts/angular-ui-router.js - About 1 hr to fix

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

                    _ExceptionDetails.prototype.parseStack = function (stack) {
                        var parsedStack = undefined;
                        if (typeof stack === "string") {
                            var frames = stack.split('\n');
                            parsedStack = [];
    Severity: Minor
    Found in Web.Admin/z-scripts/ai.0.15.0-build46802.js - About 1 hr to fix

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

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

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

            _scaleImage : function( image, options ) {
        
                image = image || this._controls.getActive();
        
                // janpub (JH) fix:
        Severity: Minor
        Found in Web.Admin/2015/js/galleria/galleria-1.4.2.js - About 1 hr to fix

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

                          getItemData : function( itemType, id ) {
                              itemType = itemType || 'menu-item';
          
                              var itemData = {}, i,
                              fields = [
          Severity: Minor
          Found in Web.Admin/2014/wordpress/wp-admin/js/nav-menu.js - About 1 hr to fix

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

                    keyboardAccessible: function( event ) {
                        var isEnter = ( event.which === 13 ),
                            isEsc = ( event.which === 27 ),
                            isDown = ( event.which === 40 ),
                            isUp = ( event.which === 38 ),
            Severity: Minor
            Found in Web.Admin/2014/wordpress/wp-admin/js/customize-widgets.js - About 1 hr to fix

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

                fb.widgetCoords = function (event) {
                  var x, y;
                  var el = event.target || event.srcElement;
                  var reference = fb.wheel;
              
              
              Severity: Minor
              Found in Web.Admin/2014/wordpress/wp-admin/js/farbtastic.js - About 1 hr to fix

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

                            attachment: function( props, attachment ) {
                                var caption = attachment.caption,
                                    options, html;
                
                                // If captions are disabled, clear the caption.
                Severity: Minor
                Found in Web.Admin/2014/wordpress/wp-includes/js/media-editor.js - About 1 hr to fix

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

                              edit: function( content ) {
                                  var shortcode = wp.shortcode.next( this.tag, content ),
                                      defaultPostId = this.defaults.id,
                                      attachments, selection, state;
                  
                  
                  Severity: Minor
                  Found in Web.Admin/2014/wordpress/wp-includes/js/media-editor.js - About 1 hr to fix

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

                        function toggleFullscreen() {
                            var body = document.body, documentElement = document.documentElement, editorContainerStyle;
                            var editorContainer, iframe, iframeStyle;
                    
                            function resize() {
                      Severity
                      Category
                      Status
                      Source
                      Language