CaffGeek/MBACNationals

View on GitHub
Web.Admin/2014/wordpress/wp-includes/js/crop/cropper.js

Summary

Maintainability
F
1 wk
Test Coverage

File cropper.js has 499 lines of code (exceeds 250 allowed). Consider refactoring.
Open

/**
 * Copyright (c) 2006, David Spurr (http://www.defusion.org.uk/)
 * All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/js/crop/cropper.js - About 1 day to fix

    Function onDrag has a Cognitive Complexity of 44 (exceeds 5 allowed). Consider refactoring.
    Open

    },onDrag:function(e){
    var _4f=null;
    if(this.dragging||this.resizing){
    var _50=this.getCurPos(e);
    var _51=this.cloneCoords(this.areaCoords);
    Severity: Minor
    Found in Web.Admin/2014/wordpress/wp-includes/js/crop/cropper.js - About 6 hrs to fix

    Cognitive Complexity

    Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

    A method's cognitive complexity is based on a few simple rules:

    • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
    • Code is considered more complex for each "break in the linear flow of the code"
    • Code is considered more complex when "flow breaking structures are nested"

    Further reading

    Function setAreaCoords has a Cognitive Complexity of 44 (exceeds 5 allowed). Consider refactoring.
    Open

    },setAreaCoords:function(_1d,_1e,_1f,_20,_21){
    var _22=typeof _1e!="undefined"?_1e:false;
    var _23=typeof _1f!="undefined"?_1f:false;
    if(_1e){
    var _24=_1d.x2-_1d.x1;
    Severity: Minor
    Found in Web.Admin/2014/wordpress/wp-includes/js/crop/cropper.js - About 6 hrs to fix

    Cognitive Complexity

    Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

    A method's cognitive complexity is based on a few simple rules:

    • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
    • Code is considered more complex for each "break in the linear flow of the code"
    • Code is considered more complex when "flow breaking structures are nested"

    Further reading

    prototype has 25 functions (exceeds 20 allowed). Consider refactoring.
    Open

    Cropper.Img.prototype={initialize:function(_7,_8){
    this.options=Object.extend({ratioDim:{x:0,y:0},minWidth:0,minHeight:0,displayOnInit:false,onEndCrop:Prototype.emptyFunction,captureKeys:true},_8||{});
    if(this.options.minWidth>0&&this.options.minHeight>0){
    this.options.ratioDim.x=this.options.minWidth;
    this.options.ratioDim.y=this.options.minHeight;
    Severity: Minor
    Found in Web.Admin/2014/wordpress/wp-includes/js/crop/cropper.js - About 2 hrs to fix

      Function setAreaCoords has 61 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      },setAreaCoords:function(_1d,_1e,_1f,_20,_21){
      var _22=typeof _1e!="undefined"?_1e:false;
      var _23=typeof _1f!="undefined"?_1f:false;
      if(_1e){
      var _24=_1d.x2-_1d.x1;
      Severity: Major
      Found in Web.Admin/2014/wordpress/wp-includes/js/crop/cropper.js - About 2 hrs to fix

        Function forceReRender has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring.
        Open

        },forceReRender:function(){
        if(this.isIE||this.isWebKit){
        var n=document.createTextNode(" ");
        var d,el,fixEL,i;
        if(this.isIE){
        Severity: Minor
        Found in Web.Admin/2014/wordpress/wp-includes/js/crop/cropper.js - About 2 hrs to fix

        Cognitive Complexity

        Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

        A method's cognitive complexity is based on a few simple rules:

        • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
        • Code is considered more complex for each "break in the linear flow of the code"
        • Code is considered more complex when "flow breaking structures are nested"

        Further reading

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

        },onDrag:function(e){
        var _4f=null;
        if(this.dragging||this.resizing){
        var _50=this.getCurPos(e);
        var _51=this.cloneCoords(this.areaCoords);
        Severity: Major
        Found in Web.Admin/2014/wordpress/wp-includes/js/crop/cropper.js - About 2 hrs to fix

          Function onLoad has 45 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          },onLoad:function(){
          var _f="imgCrop_";
          var _10=this.img.parentNode;
          var _11="";
          if(this.isOpera8){
          Severity: Minor
          Found in Web.Admin/2014/wordpress/wp-includes/js/crop/cropper.js - About 1 hr to fix

            Function drawArea has 37 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            },drawArea:function(){
            if(!this.isIE){
            Element.show($(this.overlay));
            }
            var _3e=this.calcW();
            Severity: Minor
            Found in Web.Admin/2014/wordpress/wp-includes/js/crop/cropper.js - About 1 hr to fix

              Function initialize has 37 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              Cropper.Img.prototype={initialize:function(_7,_8){
              this.options=Object.extend({ratioDim:{x:0,y:0},minWidth:0,minHeight:0,displayOnInit:false,onEndCrop:Prototype.emptyFunction,captureKeys:true},_8||{});
              if(this.options.minWidth>0&&this.options.minHeight>0){
              this.options.ratioDim.x=this.options.minWidth;
              this.options.ratioDim.y=this.options.minHeight;
              Severity: Minor
              Found in Web.Admin/2014/wordpress/wp-includes/js/crop/cropper.js - About 1 hr to fix

                Function applyRatioToAxis has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                },applyRatioToAxis:function(_33,_34,_35,_36){
                var _37=Object.extend(_33,{});
                var _38=_37.a2-_37.a1;
                var _3a=Math.floor(_38*_34.b/_34.a);
                var _3b;
                Severity: Minor
                Found in Web.Admin/2014/wordpress/wp-includes/js/crop/cropper.js - About 1 hr to fix

                  Function setParams has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                  },setParams:function(){
                  this.imgW=this.img.width;
                  this.imgH=this.img.height;
                  if(!this.isIE){
                  Element.setStyle($(this.overlay),{width:this.imgW+"px",height:this.imgH+"px"});
                  Severity: Minor
                  Found in Web.Admin/2014/wordpress/wp-includes/js/crop/cropper.js - About 1 hr to fix

                    Function applyMinDimension has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
                    Open

                    },applyMinDimension:function(_2a,_2b,_2c,_2d){
                    if((_2a.a2-_2a.a1)<_2b){
                    if(_2c==1){
                    _2a.a2=_2a.a1+_2b;
                    }else{
                    Severity: Minor
                    Found in Web.Admin/2014/wordpress/wp-includes/js/crop/cropper.js - About 1 hr to fix

                    Cognitive Complexity

                    Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                    A method's cognitive complexity is based on a few simple rules:

                    • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                    • Code is considered more complex for each "break in the linear flow of the code"
                    • Code is considered more complex when "flow breaking structures are nested"

                    Further reading

                    Function applyRatioToAxis has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
                    Open

                    },applyRatioToAxis:function(_33,_34,_35,_36){
                    var _37=Object.extend(_33,{});
                    var _38=_37.a2-_37.a1;
                    var _3a=Math.floor(_38*_34.b/_34.a);
                    var _3b;
                    Severity: Minor
                    Found in Web.Admin/2014/wordpress/wp-includes/js/crop/cropper.js - About 1 hr to fix

                    Cognitive Complexity

                    Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                    A method's cognitive complexity is based on a few simple rules:

                    • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                    • Code is considered more complex for each "break in the linear flow of the code"
                    • Code is considered more complex when "flow breaking structures are nested"

                    Further reading

                    Function handleKeys has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
                    Open

                    },handleKeys:function(e){
                    var dir={x:0,y:0};
                    if(!this.dragging){
                    switch(e.keyCode){
                    case (37):
                    Severity: Minor
                    Found in Web.Admin/2014/wordpress/wp-includes/js/crop/cropper.js - About 55 mins to fix

                    Cognitive Complexity

                    Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                    A method's cognitive complexity is based on a few simple rules:

                    • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                    • Code is considered more complex for each "break in the linear flow of the code"
                    • Code is considered more complex when "flow breaking structures are nested"

                    Further reading

                    Avoid deeply nested control flow statements.
                    Open

                    if(_29>0){
                    _28=_29;
                    }
                    Severity: Major
                    Found in Web.Admin/2014/wordpress/wp-includes/js/crop/cropper.js - About 45 mins to fix

                      Avoid deeply nested control flow statements.
                      Open

                      if(el.childNodes.length){
                      el.removeChild(el.childNodes[0]);
                      }
                      Severity: Major
                      Found in Web.Admin/2014/wordpress/wp-includes/js/crop/cropper.js - About 45 mins to fix

                        Avoid deeply nested control flow statements.
                        Open

                        if(_50.y<this.startCoords.y1){
                        _52.y=-1;
                        }
                        Severity: Major
                        Found in Web.Admin/2014/wordpress/wp-includes/js/crop/cropper.js - About 45 mins to fix

                          Avoid deeply nested control flow statements.
                          Open

                          if(_50.x<this.startCoords.x2){
                          _52.x=-1;
                          }
                          Severity: Major
                          Found in Web.Admin/2014/wordpress/wp-includes/js/crop/cropper.js - About 45 mins to fix

                            Function setAreaCoords has 5 arguments (exceeds 4 allowed). Consider refactoring.
                            Open

                            },setAreaCoords:function(_1d,_1e,_1f,_20,_21){
                            Severity: Minor
                            Found in Web.Admin/2014/wordpress/wp-includes/js/crop/cropper.js - About 35 mins to fix

                              Function initialize has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                              Open

                              Cropper.Img.prototype={initialize:function(_7,_8){
                              this.options=Object.extend({ratioDim:{x:0,y:0},minWidth:0,minHeight:0,displayOnInit:false,onEndCrop:Prototype.emptyFunction,captureKeys:true},_8||{});
                              if(this.options.minWidth>0&&this.options.minHeight>0){
                              this.options.ratioDim.x=this.options.minWidth;
                              this.options.ratioDim.y=this.options.minHeight;
                              Severity: Minor
                              Found in Web.Admin/2014/wordpress/wp-includes/js/crop/cropper.js - About 35 mins to fix

                              Cognitive Complexity

                              Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                              A method's cognitive complexity is based on a few simple rules:

                              • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                              • Code is considered more complex for each "break in the linear flow of the code"
                              • Code is considered more complex when "flow breaking structures are nested"

                              Further reading

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

                              if(_31=="N"||_31=="S"){
                              _32=this.applyRatioToAxis({a1:_2e.y1,b1:_2e.x1,a2:_2e.y2,b2:_2e.x2},{a:_2f.y,b:_2f.x},{a:_30.y,b:_30.x},{min:0,max:this.imgW});
                              _2e.x1=_32.b1;
                              _2e.y1=_32.a1;
                              _2e.x2=_32.b2;
                              Severity: Major
                              Found in Web.Admin/2014/wordpress/wp-includes/js/crop/cropper.js and 1 other location - About 6 hrs to fix
                              Web.Admin/2014/wordpress/wp-includes/js/crop/cropper.js on lines 302..308

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

                              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

                              }else{
                              _32=this.applyRatioToAxis({a1:_2e.x1,b1:_2e.y1,a2:_2e.x2,b2:_2e.y2},{a:_2f.x,b:_2f.y},{a:_30.x,b:_30.y},{min:0,max:this.imgH});
                              _2e.x1=_32.a1;
                              _2e.y1=_32.b1;
                              _2e.x2=_32.a2;
                              Severity: Major
                              Found in Web.Admin/2014/wordpress/wp-includes/js/crop/cropper.js and 1 other location - About 6 hrs to fix
                              Web.Admin/2014/wordpress/wp-includes/js/crop/cropper.js on lines 296..302

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

                              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(_4f.match(/N/)){
                              this.transformCoords(_50.y,this.startCoords.y2,_51,"y");
                              if(_50.y<this.startCoords.y2){
                              _52.y=-1;
                              }
                              Severity: Major
                              Found in Web.Admin/2014/wordpress/wp-includes/js/crop/cropper.js and 1 other location - About 6 hrs to fix
                              Web.Admin/2014/wordpress/wp-includes/js/crop/cropper.js on lines 435..447

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

                              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(_4f.match(/E/)){
                              this.transformCoords(_50.x,this.startCoords.x1,_51,"x");
                              if(_50.x<this.startCoords.x1){
                              _52.x=-1;
                              }
                              Severity: Major
                              Found in Web.Admin/2014/wordpress/wp-includes/js/crop/cropper.js and 1 other location - About 6 hrs to fix
                              Web.Admin/2014/wordpress/wp-includes/js/crop/cropper.js on lines 448..460

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

                              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

                              }else{
                              _3b=_37.b2-_3a;
                              if(_3b<_36.min){
                              _3b=_36.min;
                              _3d=_3b+_37.b2;
                              Severity: Major
                              Found in Web.Admin/2014/wordpress/wp-includes/js/crop/cropper.js and 1 other location - About 1 hr to fix
                              Web.Admin/2014/wordpress/wp-includes/js/crop/cropper.js on lines 316..323

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

                              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(_35.b==1){
                              _3b=_37.b1+_3a;
                              if(_3b>_36.max){
                              _3b=_36.max;
                              _3d=_3b-_37.b1;
                              Severity: Major
                              Found in Web.Admin/2014/wordpress/wp-includes/js/crop/cropper.js and 1 other location - About 1 hr to fix
                              Web.Admin/2014/wordpress/wp-includes/js/crop/cropper.js on lines 323..330

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

                              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

                              var p=[0,1].map(function(i){
                              return (_2[i]-_3[i]-this.offset[i]);
                              }.bind(this));
                              Severity: Major
                              Found in Web.Admin/2014/wordpress/wp-includes/js/crop/cropper.js and 1 other location - About 1 hr to fix
                              Web.Admin/2014/wordpress/wp-includes/js/scriptaculous/dragdrop.js on lines 473..475

                              Duplicated Code

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

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

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

                              Tuning

                              This issue has a mass of 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 2 locations. Consider refactoring.
                              Open

                              for(var i=0;i<_17.length;i++){
                              Event.stopObserving(_17[i],"mousedown",this.startResize.bindAsEventListener(this));
                              }
                              Severity: Major
                              Found in Web.Admin/2014/wordpress/wp-includes/js/crop/cropper.js and 1 other location - About 1 hr to fix
                              Web.Admin/2014/wordpress/wp-includes/js/crop/cropper.js on lines 122..124

                              Duplicated Code

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

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

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

                              Tuning

                              This issue has a mass of 56.

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

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

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

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

                              Refactorings

                              Further Reading

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

                              for(var i=0;i<_13.length;i++){
                              Event.observe(_13[i],"mousedown",this.startResize.bindAsEventListener(this));
                              }
                              Severity: Major
                              Found in Web.Admin/2014/wordpress/wp-includes/js/crop/cropper.js and 1 other location - About 1 hr to fix
                              Web.Admin/2014/wordpress/wp-includes/js/crop/cropper.js on lines 167..169

                              Duplicated Code

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

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

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

                              Tuning

                              This issue has a mass of 56.

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

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

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

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

                              Refactorings

                              Further Reading

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

                              if(_1d.x2>this.imgW){
                              _1d.x2=this.imgW;
                              _1d.x1=this.imgW-_24;
                              }
                              Severity: Minor
                              Found in Web.Admin/2014/wordpress/wp-includes/js/crop/cropper.js and 1 other location - About 55 mins to fix
                              Web.Admin/2014/wordpress/wp-includes/js/crop/cropper.js on lines 233..236

                              Duplicated Code

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

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

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

                              Tuning

                              This issue has a mass of 53.

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

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

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

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

                              Refactorings

                              Further Reading

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

                              if(_1d.y2>this.imgH){
                              _1d.y2=this.imgH;
                              _1d.y1=this.imgH-_25;
                              }
                              Severity: Minor
                              Found in Web.Admin/2014/wordpress/wp-includes/js/crop/cropper.js and 1 other location - About 55 mins to fix
                              Web.Admin/2014/wordpress/wp-includes/js/crop/cropper.js on lines 229..232

                              Duplicated Code

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

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

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

                              Tuning

                              This issue has a mass of 53.

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

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

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

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

                              Refactorings

                              Further Reading

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

                              this.east=Builder.node("div",{"class":_f+"overlay "+_f+"east"},[Builder.node("span")]);
                              Severity: Major
                              Found in Web.Admin/2014/wordpress/wp-includes/js/crop/cropper.js and 3 other locations - About 40 mins to fix
                              Web.Admin/2014/wordpress/wp-includes/js/crop/cropper.js on lines 93..93
                              Web.Admin/2014/wordpress/wp-includes/js/crop/cropper.js on lines 95..95
                              Web.Admin/2014/wordpress/wp-includes/js/crop/cropper.js on lines 96..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 49.

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

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

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

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

                              Refactorings

                              Further Reading

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

                              this.south=Builder.node("div",{"class":_f+"overlay "+_f+"south"},[Builder.node("span")]);
                              Severity: Major
                              Found in Web.Admin/2014/wordpress/wp-includes/js/crop/cropper.js and 3 other locations - About 40 mins to fix
                              Web.Admin/2014/wordpress/wp-includes/js/crop/cropper.js on lines 93..93
                              Web.Admin/2014/wordpress/wp-includes/js/crop/cropper.js on lines 94..94
                              Web.Admin/2014/wordpress/wp-includes/js/crop/cropper.js on lines 96..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 49.

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

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

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

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

                              Refactorings

                              Further Reading

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

                              this.north=Builder.node("div",{"class":_f+"overlay "+_f+"north"},[Builder.node("span")]);
                              Severity: Major
                              Found in Web.Admin/2014/wordpress/wp-includes/js/crop/cropper.js and 3 other locations - About 40 mins to fix
                              Web.Admin/2014/wordpress/wp-includes/js/crop/cropper.js on lines 94..94
                              Web.Admin/2014/wordpress/wp-includes/js/crop/cropper.js on lines 95..95
                              Web.Admin/2014/wordpress/wp-includes/js/crop/cropper.js on lines 96..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 49.

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

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

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

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

                              Refactorings

                              Further Reading

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

                              this.west=Builder.node("div",{"class":_f+"overlay "+_f+"west"},[Builder.node("span")]);
                              Severity: Major
                              Found in Web.Admin/2014/wordpress/wp-includes/js/crop/cropper.js and 3 other locations - About 40 mins to fix
                              Web.Admin/2014/wordpress/wp-includes/js/crop/cropper.js on lines 93..93
                              Web.Admin/2014/wordpress/wp-includes/js/crop/cropper.js on lines 94..94
                              Web.Admin/2014/wordpress/wp-includes/js/crop/cropper.js on lines 95..95

                              Duplicated Code

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

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

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

                              Tuning

                              This issue has a mass of 49.

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

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

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

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

                              Refactorings

                              Further Reading

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

                              var _17=[this.handleN,this.handleNE,this.handleE,this.handleSE,this.handleS,this.handleSW,this.handleW,this.handleNW];
                              Severity: Minor
                              Found in Web.Admin/2014/wordpress/wp-includes/js/crop/cropper.js and 1 other location - About 40 mins to fix
                              Web.Admin/2014/wordpress/wp-includes/js/crop/cropper.js on lines 121..121

                              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

                              var _13=[this.handleN,this.handleNE,this.handleE,this.handleSE,this.handleS,this.handleSW,this.handleW,this.handleNW];
                              Severity: Minor
                              Found in Web.Admin/2014/wordpress/wp-includes/js/crop/cropper.js and 1 other location - About 40 mins to fix
                              Web.Admin/2014/wordpress/wp-includes/js/crop/cropper.js on lines 166..166

                              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