Undev/redmine-stuff-to-do-plugin

View on GitHub
assets/javascripts/jquery-ui.js

Summary

Maintainability
F
4 mos
Test Coverage

File jquery-ui.js has 2006 lines of code (exceeds 250 allowed). Consider refactoring.
Open

/*
 * jQuery UI 1.6rc2
 *
 * Includes:
 * * UI Core
Severity: Major
Found in assets/javascripts/jquery-ui.js - About 5 days to fix

    Consider simplifying this complex logical expression.
    Open

                if(!((l-d < x1 && x1 < r+d && t-d < y1 && y1 < b+d) || (l-d < x1 && x1 < r+d && t-d < y2 && y2 < b+d) || (l-d < x2 && x2 < r+d && t-d < y1 && y1 < b+d) || (l-d < x2 && x2 < r+d && t-d < y2 && y2 < b+d))) {
                    if(inst.snapElements[i].snapping) (inst.options.snap.release && inst.options.snap.release.call(inst.element, null, $.extend(inst.uiHash(), { snapItem: inst.snapElements[i].item })));
                    inst.snapElements[i].snapping = false;
                    continue;
                }
    Severity: Critical
    Found in assets/javascripts/jquery-ui.js - About 4 hrs to fix

      Function _mouseStart has 78 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          _mouseStart: function(e, overrideHandle, noActivation) {
      
              var o = this.options;
              this.currentContainer = this;
      
      
      Severity: Major
      Found in assets/javascripts/jquery-ui.js - About 3 hrs to fix

        Consider simplifying this complex logical expression.
        Open

                        if( typeof newStyle[n] != "function" && newStyle[n] /* No functions and null properties */
                        && n.indexOf("Moz") == -1 && n.indexOf("length") == -1 /* No mozilla spezific render properties. */
                        && newStyle[n] != oldStyle[n] /* Only values that have changed are used for the animation */
                        && (n.match(/color/i) || (!n.match(/color/i) && !isNaN(parseInt(newStyle[n],10)))) /* Only things that can be parsed to integers or colors */
                        && (oldStyle.position != "static" || (oldStyle.position == "static" && !n.match(/left|top|bottom|right/))) /* No need for positions when dealing with static positions */
        Severity: Critical
        Found in assets/javascripts/jquery-ui.js - About 2 hrs to fix

          Function _mouseStart has 53 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              _mouseStart: function(e) {
                  
                  var o = this.options;
                  
                  //Create and append the visible helper
          Severity: Major
          Found in assets/javascripts/jquery-ui.js - About 2 hrs to fix

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

            $.widget = function(name, prototype) {
                var namespace = name.split(".")[0];
                name = name.split(".")[1];
                
                // create plugin method
            Severity: Minor
            Found in assets/javascripts/jquery-ui.js - About 1 hr to fix

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

                  drag: function(e, ui) {
                  
                      var inst = $(this).data("draggable");
                      var d = ui.options.snapTolerance || 20;
              
              
              Severity: Minor
              Found in assets/javascripts/jquery-ui.js - About 1 hr to fix

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

                    drag: function(e,ui) {
                
                        var inst = $(this).data("draggable"), self = this;
                        
                        var checkPos = function(o) {
                Severity: Minor
                Found in assets/javascripts/jquery-ui.js - About 1 hr to fix

                  Function intersect has 35 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                  $.ui.intersect = function(draggable, droppable, toleranceMode) {
                      
                      if (!droppable.offset) return false;
                      
                      var x1 = (draggable.positionAbs || draggable.position.absolute).left, x2 = x1 + draggable.helperProportions.width,
                  Severity: Minor
                  Found in assets/javascripts/jquery-ui.js - About 1 hr to fix

                    Function _clear has 34 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        _clear: function(e, noPropagation) {
                    
                            //We first have to update the dom position of the actual currentItem
                            if(!this._noFinalSort) this.placeholder.before(this.currentItem);
                            this._noFinalSort = null;
                    Severity: Minor
                    Found in assets/javascripts/jquery-ui.js - About 1 hr to fix

                      Consider simplifying this complex logical expression.
                      Open

                              if((this.options.revert == "invalid" && !dropped) || (this.options.revert == "valid" && dropped) || this.options.revert === true || ($.isFunction(this.options.revert) && this.options.revert.call(this.element, dropped))) {
                                  var self = this;
                                  $(this.helper).animate(this.originalPosition, parseInt(this.options.revertDuration, 10) || 500, function() {
                                      self._propagate("stop", e);
                                      self._clear();
                      Severity: Critical
                      Found in assets/javascripts/jquery-ui.js - About 1 hr to fix

                        Function _generatePosition has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            _generatePosition: function(e) {
                        
                                var o = this.options;
                                var position = {
                                    top: (
                        Severity: Minor
                        Found in assets/javascripts/jquery-ui.js - About 1 hr to fix

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

                              _mouseDown: function(e) {
                                  // we may have missed mouseup (out of window)
                                  (this._mouseStarted && this._mouseUp(e));
                                  
                                  this._mouseDownEvent = e;
                          Severity: Minor
                          Found in assets/javascripts/jquery-ui.js - About 1 hr to fix

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

                                _intersectsWithEdge: function(item) {    
                                    var x1 = this.positionAbs.left, x2 = x1 + this.helperProportions.width,
                                        y1 = this.positionAbs.top, y2 = y1 + this.helperProportions.height;
                                    
                                    var l = item.left, r = l + item.width, 
                            Severity: Minor
                            Found in assets/javascripts/jquery-ui.js - About 1 hr to fix

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

                                  _contactContainers: function(e) {
                                      for (var i = this.containers.length - 1; i >= 0; i--){
                              
                                          if(this._intersectsWith(this.containers[i].containerCache)) {
                                              if(!this.containers[i].containerCache.over) {
                              Severity: Minor
                              Found in assets/javascripts/jquery-ui.js - About 1 hr to fix

                                Function _generatePosition has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                    _generatePosition: function(e) {
                                        
                                        var o = this.options;
                                        var position = {
                                            top: (
                                Severity: Minor
                                Found in assets/javascripts/jquery-ui.js - About 1 hr to fix

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

                                      _refreshItems: function() {
                                          
                                          this.items = [];
                                          this.containers = [this];
                                          var items = this.items;
                                  Severity: Minor
                                  Found in assets/javascripts/jquery-ui.js - About 1 hr to fix

                                    Function drag has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                        drag: function(draggable, e) {
                                            
                                            //If you have a highly dynamic page, you might try this option. It renders positions every time you move the mouse.
                                            if(draggable.options.refreshPositions) $.ui.ddmanager.prepareOffsets(draggable, e);
                                            
                                    Severity: Minor
                                    Found in assets/javascripts/jquery-ui.js - About 1 hr to fix

                                      Function refreshPositions has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                          refreshPositions: function(fast) {
                                      
                                              //This has to be redone because due to the item being moved out/into the offsetParent, the offsetParent's position will change
                                              if(this.offsetParent) {
                                                  var po = this.offsetParent.offset();
                                      Severity: Minor
                                      Found in assets/javascripts/jquery-ui.js - About 1 hr to fix

                                        Function drag has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                            drag: function(e, ui) {
                                                
                                                var o = ui.options, scrolled = false;
                                                var i = $(this).data("draggable");
                                                
                                        Severity: Minor
                                        Found in assets/javascripts/jquery-ui.js - About 1 hr to fix

                                          Consider simplifying this complex logical expression.
                                          Open

                                                  if(!(/^(document|window|parent)$/).test(o.containment)) {
                                                      var ce = $(o.containment)[0];
                                                      var co = $(o.containment).offset();
                                                      var over = ($(ce).css("overflow") != 'hidden');
                                                      
                                          Severity: Major
                                          Found in assets/javascripts/jquery-ui.js - About 1 hr to fix

                                            Consider simplifying this complex logical expression.
                                            Open

                                                        if(!inst.snapElements[i].snapping && (ts || bs || ls || rs || first))
                                                            (inst.options.snap.snap && inst.options.snap.snap.call(inst.element, null, $.extend(inst.uiHash(), { snapItem: inst.snapElements[i].item })));
                                            Severity: Major
                                            Found in assets/javascripts/jquery-ui.js - About 1 hr to fix

                                              Consider simplifying this complex logical expression.
                                              Open

                                                          if(!(/^(document|window|parent)$/).test(o.containment)) {
                                                              var ce = $(o.containment)[0];
                                                              var co = $(o.containment).offset();
                                                              var over = ($(ce).css("overflow") != 'hidden');
                                                              
                                              Severity: Major
                                              Found in assets/javascripts/jquery-ui.js - About 1 hr to fix

                                                Consider simplifying this complex logical expression.
                                                Open

                                                        if(!arguments[0] || (arguments[0].constructor == Number || /(slow|normal|fast)/.test(arguments[0])) || (arguments[0].constructor == Function))
                                                            return this.__toggle.apply(this, arguments);
                                                        else {
                                                            var o = arguments[1] || {}; o['mode'] = 'toggle';
                                                            return this.effect.apply(this, [arguments[0], o, arguments[2] || o.duration, arguments[3] || o.callback]);
                                                Severity: Major
                                                Found in assets/javascripts/jquery-ui.js - About 1 hr to fix

                                                  Consider simplifying this complex logical expression.
                                                  Open

                                                          if(this.options.tolerance == "pointer" || this.options.forcePointerForContainers || (this.options.tolerance == "guess" && this.helperProportions[this.floating ? 'width' : 'height'] > item[this.floating ? 'width' : 'height'])) {
                                                              return isOverElement;
                                                          } else {
                                                          
                                                              return (l < x1 + (this.helperProportions.width / 2) // Right Half
                                                  Severity: Major
                                                  Found in assets/javascripts/jquery-ui.js - About 1 hr to fix

                                                    Function easeOutBack has 6 arguments (exceeds 4 allowed). Consider refactoring.
                                                    Open

                                                        easeOutBack: function (x, t, b, c, d, s) {
                                                    Severity: Minor
                                                    Found in assets/javascripts/jquery-ui.js - About 45 mins to fix

                                                      Function easeInOutBack has 6 arguments (exceeds 4 allowed). Consider refactoring.
                                                      Open

                                                          easeInOutBack: function (x, t, b, c, d, s) {
                                                      Severity: Minor
                                                      Found in assets/javascripts/jquery-ui.js - About 45 mins to fix

                                                        Function easeInBack has 6 arguments (exceeds 4 allowed). Consider refactoring.
                                                        Open

                                                            easeInBack: function (x, t, b, c, d, s) {
                                                        Severity: Minor
                                                        Found in assets/javascripts/jquery-ui.js - About 45 mins to fix

                                                          Avoid deeply nested control flow statements.
                                                          Open

                                                                                  if(!itemWithLeastDistance && !this.options.dropOnEmpty) //Check if dropOnEmpty is enabled
                                                                                      continue;
                                                          Severity: Major
                                                          Found in assets/javascripts/jquery-ui.js - About 45 mins to fix

                                                            Avoid deeply nested control flow statements.
                                                            Open

                                                                                    for (var j = this.items.length - 1; j >= 0; j--) {
                                                                                        if(!contains(this.containers[i].element[0], this.items[j].item[0])) continue;
                                                                                        var cur = this.items[j][this.containers[i].floating ? 'left' : 'top'];
                                                                                        if(Math.abs(cur - base) < dist) {
                                                                                            dist = Math.abs(cur - base); itemWithLeastDistance = this.items[j];
                                                            Severity: Major
                                                            Found in assets/javascripts/jquery-ui.js - About 45 mins to fix

                                                              Consider simplifying this complex logical expression.
                                                              Open

                                                                      if(!arguments[0] || (arguments[0].constructor == Number || /(slow|normal|fast)/.test(arguments[0])))
                                                                          return this._hide.apply(this, arguments);
                                                                      else {
                                                                          var o = arguments[1] || {}; o['mode'] = 'hide';
                                                                          return this.effect.apply(this, [arguments[0], o, arguments[2] || o.duration, arguments[3] || o.callback]);
                                                              Severity: Major
                                                              Found in assets/javascripts/jquery-ui.js - About 40 mins to fix

                                                                Consider simplifying this complex logical expression.
                                                                Open

                                                                        if(!arguments[0] || (arguments[0].constructor == Number || /(slow|normal|fast)/.test(arguments[0])))
                                                                            return this._show.apply(this, arguments);
                                                                        else {
                                                                            var o = arguments[1] || {}; o['mode'] = 'show';
                                                                            return this.effect.apply(this, [arguments[0], o, arguments[2] || o.duration, arguments[3] || o.callback]);
                                                                Severity: Major
                                                                Found in assets/javascripts/jquery-ui.js - About 40 mins to fix

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

                                                                      easeInExpo: function (x, t, b, c, d) {
                                                                  Severity: Minor
                                                                  Found in assets/javascripts/jquery-ui.js - About 35 mins to fix

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

                                                                        easeInQuad: function (x, t, b, c, d) {
                                                                    Severity: Minor
                                                                    Found in assets/javascripts/jquery-ui.js - About 35 mins to fix

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

                                                                          easeInQuart: function (x, t, b, c, d) {
                                                                      Severity: Minor
                                                                      Found in assets/javascripts/jquery-ui.js - About 35 mins to fix

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

                                                                            easeInElastic: function (x, t, b, c, d) {
                                                                        Severity: Minor
                                                                        Found in assets/javascripts/jquery-ui.js - About 35 mins to fix

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

                                                                              easeInBounce: function (x, t, b, c, d) {
                                                                          Severity: Minor
                                                                          Found in assets/javascripts/jquery-ui.js - About 35 mins to fix

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

                                                                                easeInCubic: function (x, t, b, c, d) {
                                                                            Severity: Minor
                                                                            Found in assets/javascripts/jquery-ui.js - About 35 mins to fix

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

                                                                                  easeOutQuart: function (x, t, b, c, d) {
                                                                              Severity: Minor
                                                                              Found in assets/javascripts/jquery-ui.js - About 35 mins to fix

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

                                                                                    easeInOutBounce: function (x, t, b, c, d) {
                                                                                Severity: Minor
                                                                                Found in assets/javascripts/jquery-ui.js - About 35 mins to fix

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

                                                                                      swing: function (x, t, b, c, d) {
                                                                                  Severity: Minor
                                                                                  Found in assets/javascripts/jquery-ui.js - About 35 mins to fix

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

                                                                                        easeInOutQuint: function (x, t, b, c, d) {
                                                                                    Severity: Minor
                                                                                    Found in assets/javascripts/jquery-ui.js - About 35 mins to fix

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

                                                                                          easeInSine: function (x, t, b, c, d) {
                                                                                      Severity: Minor
                                                                                      Found in assets/javascripts/jquery-ui.js - About 35 mins to fix

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

                                                                                            morph: function(remove,add,speed,easing,callback) {
                                                                                        Severity: Minor
                                                                                        Found in assets/javascripts/jquery-ui.js - About 35 mins to fix

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

                                                                                              easeInOutExpo: function (x, t, b, c, d) {
                                                                                          Severity: Minor
                                                                                          Found in assets/javascripts/jquery-ui.js - About 35 mins to fix

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

                                                                                                easeOutQuint: function (x, t, b, c, d) {
                                                                                            Severity: Minor
                                                                                            Found in assets/javascripts/jquery-ui.js - About 35 mins to fix

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

                                                                                                  easeOutExpo: function (x, t, b, c, d) {
                                                                                              Severity: Minor
                                                                                              Found in assets/javascripts/jquery-ui.js - About 35 mins to fix

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

                                                                                                    easeOutCubic: function (x, t, b, c, d) {
                                                                                                Severity: Minor
                                                                                                Found in assets/javascripts/jquery-ui.js - About 35 mins to fix

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

                                                                                                      easeInCirc: function (x, t, b, c, d) {
                                                                                                  Severity: Minor
                                                                                                  Found in assets/javascripts/jquery-ui.js - About 35 mins to fix

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

                                                                                                        easeOutElastic: function (x, t, b, c, d) {
                                                                                                    Severity: Minor
                                                                                                    Found in assets/javascripts/jquery-ui.js - About 35 mins to fix

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

                                                                                                          easeInOutElastic: function (x, t, b, c, d) {
                                                                                                      Severity: Minor
                                                                                                      Found in assets/javascripts/jquery-ui.js - About 35 mins to fix

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

                                                                                                            easeOutQuad: function (x, t, b, c, d) {
                                                                                                        Severity: Minor
                                                                                                        Found in assets/javascripts/jquery-ui.js - About 35 mins to fix

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

                                                                                                              easeInOutQuart: function (x, t, b, c, d) {
                                                                                                          Severity: Minor
                                                                                                          Found in assets/javascripts/jquery-ui.js - About 35 mins to fix

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

                                                                                                                easeInQuint: function (x, t, b, c, d) {
                                                                                                            Severity: Minor
                                                                                                            Found in assets/javascripts/jquery-ui.js - About 35 mins to fix

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

                                                                                                                  easeOutBounce: function (x, t, b, c, d) {
                                                                                                              Severity: Minor
                                                                                                              Found in assets/javascripts/jquery-ui.js - About 35 mins to fix

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

                                                                                                                    easeInOutCirc: function (x, t, b, c, d) {
                                                                                                                Severity: Minor
                                                                                                                Found in assets/javascripts/jquery-ui.js - About 35 mins to fix

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

                                                                                                                      easeInOutCubic: function (x, t, b, c, d) {
                                                                                                                  Severity: Minor
                                                                                                                  Found in assets/javascripts/jquery-ui.js - About 35 mins to fix

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

                                                                                                                        easeOutSine: function (x, t, b, c, d) {
                                                                                                                    Severity: Minor
                                                                                                                    Found in assets/javascripts/jquery-ui.js - About 35 mins to fix

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

                                                                                                                          easeInOutSine: function (x, t, b, c, d) {
                                                                                                                      Severity: Minor
                                                                                                                      Found in assets/javascripts/jquery-ui.js - About 35 mins to fix

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

                                                                                                                            easeInOutQuad: function (x, t, b, c, d) {
                                                                                                                        Severity: Minor
                                                                                                                        Found in assets/javascripts/jquery-ui.js - About 35 mins to fix

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

                                                                                                                              easeOutCirc: function (x, t, b, c, d) {
                                                                                                                          Severity: Minor
                                                                                                                          Found in assets/javascripts/jquery-ui.js - About 35 mins to fix

                                                                                                                            Avoid too many return statements within this function.
                                                                                                                            Open

                                                                                                                                            && y2 - (this.helperProportions.height / 2) < b )) return false; // Top Half
                                                                                                                            Severity: Major
                                                                                                                            Found in assets/javascripts/jquery-ui.js - About 30 mins to fix

                                                                                                                              Avoid too many return statements within this function.
                                                                                                                              Open

                                                                                                                                              if(y2 > t && y1 < t) return 1; //Crosses top edge
                                                                                                                              Severity: Major
                                                                                                                              Found in assets/javascripts/jquery-ui.js - About 30 mins to fix

                                                                                                                                Avoid too many return statements within this function.
                                                                                                                                Open

                                                                                                                                        return false;
                                                                                                                                Severity: Major
                                                                                                                                Found in assets/javascripts/jquery-ui.js - About 30 mins to fix

                                                                                                                                  Avoid too many return statements within this function.
                                                                                                                                  Open

                                                                                                                                                  return colors['transparent']
                                                                                                                                  Severity: Major
                                                                                                                                  Found in assets/javascripts/jquery-ui.js - About 30 mins to fix

                                                                                                                                    Avoid too many return statements within this function.
                                                                                                                                    Open

                                                                                                                                                    if(x1 < r && x2 > r) return 1; //Crosses right edge
                                                                                                                                    Severity: Major
                                                                                                                                    Found in assets/javascripts/jquery-ui.js - About 30 mins to fix

                                                                                                                                      Avoid too many return statements within this function.
                                                                                                                                      Open

                                                                                                                                                      if(x2 > l && x1 < l) return 2; //Crosses left edge
                                                                                                                                      Severity: Major
                                                                                                                                      Found in assets/javascripts/jquery-ui.js - About 30 mins to fix

                                                                                                                                        Avoid too many return statements within this function.
                                                                                                                                        Open

                                                                                                                                                        return [parseInt(result[1]+result[1],16), parseInt(result[2]+result[2],16), parseInt(result[3]+result[3],16)];
                                                                                                                                        Severity: Major
                                                                                                                                        Found in assets/javascripts/jquery-ui.js - About 30 mins to fix

                                                                                                                                          Avoid too many return statements within this function.
                                                                                                                                          Open

                                                                                                                                                  return colors[jQuery.trim(color).toLowerCase()];
                                                                                                                                          Severity: Major
                                                                                                                                          Found in assets/javascripts/jquery-ui.js - About 30 mins to fix

                                                                                                                                            Avoid too many return statements within this function.
                                                                                                                                            Open

                                                                                                                                                            else if (direction == 2 && (y1 + dyClick) > t + height/2) { return 1; } // down
                                                                                                                                            Severity: Major
                                                                                                                                            Found in assets/javascripts/jquery-ui.js - About 30 mins to fix

                                                                                                                                              Avoid too many return statements within this function.
                                                                                                                                              Open

                                                                                                                                                              if(y1 < b && y2 > b) return 2; //Crosses bottom edge
                                                                                                                                              Severity: Major
                                                                                                                                              Found in assets/javascripts/jquery-ui.js - About 30 mins to fix

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

                                                                                                                                                $.ui.ddmanager = {
                                                                                                                                                    current: null,
                                                                                                                                                    droppables: { 'default': [] },
                                                                                                                                                    prepareOffsets: function(t, e) {
                                                                                                                                                        
                                                                                                                                                Severity: Major
                                                                                                                                                Found in assets/javascripts/jquery-ui.js and 1 other location - About 1 wk to fix
                                                                                                                                                assets/javascripts/ui/ui.droppable.js on lines 200..284

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

                                                                                                                                                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

                                                                                                                                                    setContainment: function() {
                                                                                                                                                
                                                                                                                                                        var o = this.options;
                                                                                                                                                        if(o.containment == 'parent') o.containment = this.helper[0].parentNode;
                                                                                                                                                        if(o.containment == 'document' || o.containment == 'window') this.containment = [
                                                                                                                                                Severity: Major
                                                                                                                                                Found in assets/javascripts/jquery-ui.js and 1 other location - About 5 days to fix
                                                                                                                                                assets/javascripts/ui/ui.draggable.js on lines 235..259

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

                                                                                                                                                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

                                                                                                                                                        $.each(inst.sortables, function(i) {
                                                                                                                                                
                                                                                                                                                            if(checkPos.call(inst, this.instance.containerCache)) {
                                                                                                                                                
                                                                                                                                                                //If it intersects, we use a little isOver variable and set it once, so our move-in stuff gets fired only once
                                                                                                                                                Severity: Major
                                                                                                                                                Found in assets/javascripts/jquery-ui.js and 1 other location - About 4 days to fix
                                                                                                                                                assets/javascripts/ui/ui.draggable.js on lines 452..503

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

                                                                                                                                                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

                                                                                                                                                    _getItemsAsjQuery: function(connected) {
                                                                                                                                                        
                                                                                                                                                        var self = this;
                                                                                                                                                        var items = [];
                                                                                                                                                        var queries = [];
                                                                                                                                                Severity: Major
                                                                                                                                                Found in assets/javascripts/jquery-ui.js and 1 other location - About 2 days to fix
                                                                                                                                                assets/javascripts/ui/ui.sortable.js on lines 413..441

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

                                                                                                                                                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

                                                                                                                                                    _intersectsWith: function(item) {
                                                                                                                                                        var x1 = this.positionAbs.left, x2 = x1 + this.helperProportions.width,
                                                                                                                                                        y1 = this.positionAbs.top, y2 = y1 + this.helperProportions.height;
                                                                                                                                                        var l = item.left, r = l + item.width, 
                                                                                                                                                        t = item.top, b = t + item.height;
                                                                                                                                                Severity: Major
                                                                                                                                                Found in assets/javascripts/jquery-ui.js and 1 other location - About 2 days to fix
                                                                                                                                                assets/javascripts/ui/ui.sortable.js on lines 334..364

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

                                                                                                                                                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

                                                                                                                                                ;(function($) {
                                                                                                                                                
                                                                                                                                                $.effects.highlight = function(o) {
                                                                                                                                                
                                                                                                                                                    return this.queue(function() {
                                                                                                                                                Severity: Major
                                                                                                                                                Found in assets/javascripts/jquery-ui.js and 1 other location - About 2 days to fix
                                                                                                                                                assets/javascripts/ui/effects.highlight.js on lines 13..48

                                                                                                                                                Duplicated Code

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

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

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

                                                                                                                                                Tuning

                                                                                                                                                This issue has a mass of 400.

                                                                                                                                                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(i.overflowY[0] != document && i.overflowY[0].tagName != 'HTML') {
                                                                                                                                                            if((i.overflowYOffset.top + i.overflowY[0].offsetHeight) - e.pageY < o.scrollSensitivity)
                                                                                                                                                                i.overflowY[0].scrollTop = scrolled = i.overflowY[0].scrollTop + o.scrollSpeed;
                                                                                                                                                            if(e.pageY - i.overflowYOffset.top < o.scrollSensitivity)
                                                                                                                                                                i.overflowY[0].scrollTop = scrolled = i.overflowY[0].scrollTop - o.scrollSpeed;
                                                                                                                                                Severity: Major
                                                                                                                                                Found in assets/javascripts/jquery-ui.js and 1 other location - About 1 day to fix
                                                                                                                                                assets/javascripts/jquery-ui.js on lines 904..914

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

                                                                                                                                                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(i.overflowX[0] != document && i.overflowX[0].tagName != 'HTML') {
                                                                                                                                                            if((i.overflowXOffset.left + i.overflowX[0].offsetWidth) - e.pageX < o.scrollSensitivity)
                                                                                                                                                                i.overflowX[0].scrollLeft = scrolled = i.overflowX[0].scrollLeft + o.scrollSpeed;
                                                                                                                                                            if(e.pageX - i.overflowXOffset.left < o.scrollSensitivity)
                                                                                                                                                                i.overflowX[0].scrollLeft = scrolled = i.overflowX[0].scrollLeft - o.scrollSpeed;
                                                                                                                                                Severity: Major
                                                                                                                                                Found in assets/javascripts/jquery-ui.js and 1 other location - About 1 day to fix
                                                                                                                                                assets/javascripts/jquery-ui.js on lines 891..902

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

                                                                                                                                                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

                                                                                                                                                        if(o.grid) {
                                                                                                                                                            var top = this.originalPosition.top + Math.round((position.top - this.originalPosition.top) / o.grid[1]) * o.grid[1];
                                                                                                                                                            position.top = this.containment ? (!(top < this.containment[1] || top > this.containment[3]) ? top : (!(top < this.containment[1]) ? top - o.grid[1] : top + o.grid[1])) : top;
                                                                                                                                                            
                                                                                                                                                            var left = this.originalPosition.left + Math.round((position.left - this.originalPosition.left) / o.grid[0]) * o.grid[0];
                                                                                                                                                Severity: Major
                                                                                                                                                Found in assets/javascripts/jquery-ui.js and 3 other locations - About 1 day to fix
                                                                                                                                                assets/javascripts/jquery-ui.js on lines 726..732
                                                                                                                                                assets/javascripts/ui/ui.draggable.js on lines 319..325
                                                                                                                                                assets/javascripts/ui/ui.sortable.js on lines 785..791

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

                                                                                                                                                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

                                                                                                                                                        if(o.grid) {
                                                                                                                                                            var top = this.originalPosition.top + Math.round((position.top - this.originalPosition.top) / o.grid[1]) * o.grid[1];
                                                                                                                                                            position.top = this.containment ? (!(top < this.containment[1] || top > this.containment[3]) ? top : (!(top < this.containment[1]) ? top - o.grid[1] : top + o.grid[1])) : top;
                                                                                                                                                            
                                                                                                                                                            var left = this.originalPosition.left + Math.round((position.left - this.originalPosition.left) / o.grid[0]) * o.grid[0];
                                                                                                                                                Severity: Major
                                                                                                                                                Found in assets/javascripts/jquery-ui.js and 3 other locations - About 1 day to fix
                                                                                                                                                assets/javascripts/jquery-ui.js on lines 2010..2016
                                                                                                                                                assets/javascripts/ui/ui.draggable.js on lines 319..325
                                                                                                                                                assets/javascripts/ui/ui.sortable.js on lines 785..791

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

                                                                                                                                                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

                                                                                                                                                    _drop: function(e,custom) {
                                                                                                                                                        
                                                                                                                                                        var draggable = custom || $.ui.ddmanager.current;
                                                                                                                                                        if (!draggable || (draggable.currentItem || draggable.element)[0] == this.element[0]) return false; // Bail if draggable and droppable are same element
                                                                                                                                                        
                                                                                                                                                Severity: Major
                                                                                                                                                Found in assets/javascripts/jquery-ui.js and 1 other location - About 1 day to fix
                                                                                                                                                assets/javascripts/ui/ui.droppable.js on lines 102..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 341.

                                                                                                                                                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(i.overflowY[0] != document && i.overflowY[0].tagName != 'HTML') {
                                                                                                                                                            if((i.overflowYOffset.top + i.overflowY[0].offsetHeight) - e.pageY < o.scrollSensitivity)
                                                                                                                                                                i.overflowY[0].scrollTop = i.overflowY[0].scrollTop + o.scrollSpeed;
                                                                                                                                                            if(e.pageY - i.overflowYOffset.top < o.scrollSensitivity)
                                                                                                                                                                i.overflowY[0].scrollTop = i.overflowY[0].scrollTop - o.scrollSpeed;
                                                                                                                                                Severity: Major
                                                                                                                                                Found in assets/javascripts/jquery-ui.js and 1 other location - About 1 day to fix
                                                                                                                                                assets/javascripts/jquery-ui.js on lines 2254..2264

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

                                                                                                                                                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(i.overflowX[0] != document && i.overflowX[0].tagName != 'HTML') {
                                                                                                                                                            if((i.overflowXOffset.left + i.overflowX[0].offsetWidth) - e.pageX < o.scrollSensitivity)
                                                                                                                                                                i.overflowX[0].scrollLeft = i.overflowX[0].scrollLeft + o.scrollSpeed;
                                                                                                                                                            if(e.pageX - i.overflowXOffset.left < o.scrollSensitivity)
                                                                                                                                                                i.overflowX[0].scrollLeft = i.overflowX[0].scrollLeft - o.scrollSpeed;
                                                                                                                                                Severity: Major
                                                                                                                                                Found in assets/javascripts/jquery-ui.js and 1 other location - About 1 day to fix
                                                                                                                                                assets/javascripts/jquery-ui.js on lines 2242..2252

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

                                                                                                                                                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

                                                                                                                                                    _init: function() {
                                                                                                                                                        
                                                                                                                                                        var o = this.options, accept = o.accept;
                                                                                                                                                        this.isover = 0; this.isout = 1;
                                                                                                                                                
                                                                                                                                                
                                                                                                                                                Severity: Major
                                                                                                                                                Found in assets/javascripts/jquery-ui.js and 1 other location - About 1 day to fix
                                                                                                                                                assets/javascripts/ui/ui.droppable.js on lines 18..36

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

                                                                                                                                                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(ui.options.snapMode != 'outer') {
                                                                                                                                                                var ts = Math.abs(t - y1) <= d;
                                                                                                                                                                var bs = Math.abs(b - y2) <= d;
                                                                                                                                                                var ls = Math.abs(l - x1) <= d;
                                                                                                                                                                var rs = Math.abs(r - x2) <= d;
                                                                                                                                                Severity: Major
                                                                                                                                                Found in assets/javascripts/jquery-ui.js and 1 other location - About 1 day to fix
                                                                                                                                                assets/javascripts/ui/ui.draggable.js on lines 651..660

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

                                                                                                                                                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(ui.options.snapMode != 'inner') {
                                                                                                                                                                var ts = Math.abs(t - y2) <= d;
                                                                                                                                                                var bs = Math.abs(b - y1) <= d;
                                                                                                                                                                var ls = Math.abs(l - x2) <= d;
                                                                                                                                                                var rs = Math.abs(r - x1) <= d;
                                                                                                                                                Severity: Major
                                                                                                                                                Found in assets/javascripts/jquery-ui.js and 1 other location - About 1 day to fix
                                                                                                                                                assets/javascripts/ui/ui.draggable.js on lines 638..647

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

                                                                                                                                                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

                                                                                                                                                    css: function(name) {
                                                                                                                                                        if ($.ui.cssCache[name]) { return $.ui.cssCache[name]; }
                                                                                                                                                        var tmp = $('<div class="ui-gen">').addClass(name).css({position:'absolute', top:'-5000px', left:'-5000px', display:'block'}).appendTo('body');
                                                                                                                                                        
                                                                                                                                                        //if (!$.browser.safari)
                                                                                                                                                Severity: Major
                                                                                                                                                Found in assets/javascripts/jquery-ui.js and 1 other location - About 1 day to fix
                                                                                                                                                assets/javascripts/ui/ui.core.js on lines 54..69

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

                                                                                                                                                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

                                                                                                                                                    $.fn[name] = function(options) {
                                                                                                                                                        var isMethodCall = (typeof options == 'string'),
                                                                                                                                                            args = Array.prototype.slice.call(arguments, 1);
                                                                                                                                                        
                                                                                                                                                        // prevent calls to internal methods
                                                                                                                                                Severity: Major
                                                                                                                                                Found in assets/javascripts/jquery-ui.js and 1 other location - About 1 day to fix
                                                                                                                                                assets/javascripts/ui/ui.core.js on lines 267..295

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

                                                                                                                                                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(this.options.custom && this.options.custom.refreshContainers) {
                                                                                                                                                            this.options.custom.refreshContainers.call(this);
                                                                                                                                                        } else {
                                                                                                                                                            for (var i = this.containers.length - 1; i >= 0; i--){
                                                                                                                                                                var p =this.containers[i].element.offset();
                                                                                                                                                Severity: Major
                                                                                                                                                Found in assets/javascripts/jquery-ui.js and 1 other location - About 1 day to fix
                                                                                                                                                assets/javascripts/ui/ui.sortable.js on lines 531..541

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

                                                                                                                                                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

                                                                                                                                                $.ui.plugin.add("draggable", "stack", {
                                                                                                                                                    start: function(e,ui) {
                                                                                                                                                        var group = $.makeArray($(ui.options.stack.group)).sort(function(a,b) {
                                                                                                                                                            return (parseInt($(a).css("zIndex"),10) || ui.options.stack.min) - (parseInt($(b).css("zIndex"),10) || ui.options.stack.min);
                                                                                                                                                        });
                                                                                                                                                Severity: Major
                                                                                                                                                Found in assets/javascripts/jquery-ui.js and 1 other location - About 1 day to fix
                                                                                                                                                assets/javascripts/ui/ui.draggable.js on lines 671..683

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

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

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

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

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

                                                                                                                                                Refactorings

                                                                                                                                                Further Reading

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

                                                                                                                                                    adjustOffsetFromHelper: function(obj) {
                                                                                                                                                        if(obj.left != undefined) this.offset.click.left = obj.left + this.margins.left;
                                                                                                                                                        if(obj.right != undefined) this.offset.click.left = this.helperProportions.width - obj.right + this.margins.left;
                                                                                                                                                        if(obj.top != undefined) this.offset.click.top = obj.top + this.margins.top;
                                                                                                                                                        if(obj.bottom != undefined) this.offset.click.top = this.helperProportions.height - obj.bottom + this.margins.top;
                                                                                                                                                Severity: Major
                                                                                                                                                Found in assets/javascripts/jquery-ui.js and 2 other locations - About 1 day to fix
                                                                                                                                                assets/javascripts/ui/ui.draggable.js on lines 185..190
                                                                                                                                                assets/javascripts/ui/ui.sortable.js on lines 650..655

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

                                                                                                                                                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

                                                                                                                                                    plugin: {
                                                                                                                                                        add: function(module, option, set) {
                                                                                                                                                            var proto = $.ui[module].prototype;
                                                                                                                                                            for(var i in set) {
                                                                                                                                                                proto.plugins[i] = proto.plugins[i] || [];
                                                                                                                                                Severity: Major
                                                                                                                                                Found in assets/javascripts/jquery-ui.js and 1 other location - About 1 day to fix
                                                                                                                                                assets/javascripts/ui/ui.core.js on lines 21..39

                                                                                                                                                Duplicated Code

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

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

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

                                                                                                                                                Tuning

                                                                                                                                                This issue has a mass of 214.

                                                                                                                                                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

                                                                                                                                                    start: function(e, ui) {
                                                                                                                                                        
                                                                                                                                                        var inst = $(this).data("draggable");
                                                                                                                                                        inst.snapElements = [];
                                                                                                                                                
                                                                                                                                                
                                                                                                                                                Severity: Major
                                                                                                                                                Found in assets/javascripts/jquery-ui.js and 1 other location - About 1 day to fix
                                                                                                                                                assets/javascripts/ui/ui.draggable.js on lines 603..617

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

                                                                                                                                                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

                                                                                                                                                $.ui.plugin.add("draggable", "iframeFix", {
                                                                                                                                                    start: function(e, ui) {
                                                                                                                                                        $(ui.options.iframeFix === true ? "iframe" : ui.options.iframeFix).each(function() {                    
                                                                                                                                                            $('<div class="ui-draggable-iframeFix" style="background: #fff;"></div>')
                                                                                                                                                            .css({
                                                                                                                                                Severity: Major
                                                                                                                                                Found in assets/javascripts/jquery-ui.js and 1 other location - About 1 day to fix
                                                                                                                                                assets/javascripts/ui/ui.draggable.js on lines 519..534

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

                                                                                                                                                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

                                                                                                                                                    createHelper: function() {
                                                                                                                                                
                                                                                                                                                        var o = this.options;
                                                                                                                                                        var helper = $.isFunction(o.helper) ? $(o.helper.apply(this.element[0], [e])) : (o.helper == 'clone' ? this.element.clone() : this.element);
                                                                                                                                                        
                                                                                                                                                Severity: Major
                                                                                                                                                Found in assets/javascripts/jquery-ui.js and 1 other location - About 1 day to fix
                                                                                                                                                assets/javascripts/ui/ui.draggable.js on lines 170..183

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

                                                                                                                                                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

                                                                                                                                                    _rearrange: function(e, i, a, hardRefresh) {
                                                                                                                                                
                                                                                                                                                        a ? a[0].appendChild(this.placeholder[0]) : i.item[0].parentNode.insertBefore(this.placeholder[0], (this.direction == 'down' ? i.item[0] : i.item[0].nextSibling));
                                                                                                                                                        
                                                                                                                                                        //Various things done here to improve the performance:
                                                                                                                                                Severity: Major
                                                                                                                                                Found in assets/javascripts/jquery-ui.js and 1 other location - About 1 day to fix
                                                                                                                                                assets/javascripts/ui/ui.sortable.js on lines 796..812

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

                                                                                                                                                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

                                                                                                                                                            $(this.helper).animate({
                                                                                                                                                                left: cur.left - this.offset.parent.left - self.margins.left + (this.offsetParent[0] == document.body ? 0 : this.offsetParent[0].scrollLeft),
                                                                                                                                                                top: cur.top - this.offset.parent.top - self.margins.top + (this.offsetParent[0] == document.body ? 0 : this.offsetParent[0].scrollTop)
                                                                                                                                                            }, parseInt(this.options.revert, 10) || 500, function() {
                                                                                                                                                                self._clear(e);
                                                                                                                                                Severity: Major
                                                                                                                                                Found in assets/javascripts/jquery-ui.js and 1 other location - About 1 day to fix
                                                                                                                                                assets/javascripts/ui/ui.sortable.js on lines 252..257

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

                                                                                                                                                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

                                                                                                                                                                update: function(container, p) {
                                                                                                                                                                    if(className && !o.forcePlaceholderSize) return;
                                                                                                                                                                    if(!p.height()) { p.height(self.currentItem.innerHeight() - parseInt(self.currentItem.css('paddingTop')||0, 10) - parseInt(self.currentItem.css('paddingBottom')||0, 10)); };
                                                                                                                                                                    if(!p.width()) { p.width(self.currentItem.innerWidth() - parseInt(self.currentItem.css('paddingLeft')||0, 10) - parseInt(self.currentItem.css('paddingRight')||0, 10)); };
                                                                                                                                                                }
                                                                                                                                                Severity: Major
                                                                                                                                                Found in assets/javascripts/jquery-ui.js and 1 other location - About 1 day to fix
                                                                                                                                                assets/javascripts/ui/ui.sortable.js on lines 569..573

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

                                                                                                                                                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.instance.isOver) {
                                                                                                                                                                this.instance.isOver = 0;
                                                                                                                                                                inst.cancelHelperRemoval = true; //Don't remove the helper in the draggable instance
                                                                                                                                                                this.instance.cancelHelperRemoval = false; //Remove it in the sortable instance (so sortable plugins like revert still work)
                                                                                                                                                                if(this.shouldRevert) this.instance.options.revert = true; //revert here
                                                                                                                                                Severity: Major
                                                                                                                                                Found in assets/javascripts/jquery-ui.js and 1 other location - About 1 day to fix
                                                                                                                                                assets/javascripts/ui/ui.draggable.js on lines 420..434

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

                                                                                                                                                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(!((l-d < x1 && x1 < r+d && t-d < y1 && y1 < b+d) || (l-d < x1 && x1 < r+d && t-d < y2 && y2 < b+d) || (l-d < x2 && x2 < r+d && t-d < y1 && y1 < b+d) || (l-d < x2 && x2 < r+d && t-d < y2 && y2 < b+d))) {
                                                                                                                                                                if(inst.snapElements[i].snapping) (inst.options.snap.release && inst.options.snap.release.call(inst.element, null, $.extend(inst.uiHash(), { snapItem: inst.snapElements[i].item })));
                                                                                                                                                                inst.snapElements[i].snapping = false;
                                                                                                                                                                continue;
                                                                                                                                                            }
                                                                                                                                                Severity: Major
                                                                                                                                                Found in assets/javascripts/jquery-ui.js and 1 other location - About 7 hrs to fix
                                                                                                                                                assets/javascripts/ui/ui.draggable.js on lines 632..636

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

                                                                                                                                                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

                                                                                                                                                    _out: function(e) {
                                                                                                                                                        
                                                                                                                                                        var draggable = $.ui.ddmanager.current;
                                                                                                                                                        if (!draggable || (draggable.currentItem || draggable.element)[0] == this.element[0]) return; // Bail if draggable and droppable are same element
                                                                                                                                                        
                                                                                                                                                Severity: Major
                                                                                                                                                Found in assets/javascripts/jquery-ui.js and 3 other locations - About 7 hrs to fix
                                                                                                                                                assets/javascripts/jquery-ui.js on lines 1190..1200
                                                                                                                                                assets/javascripts/ui/ui.droppable.js on lines 78..88
                                                                                                                                                assets/javascripts/ui/ui.droppable.js on lines 90..100

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

                                                                                                                                                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

                                                                                                                                                    _over: function(e) {
                                                                                                                                                        
                                                                                                                                                        var draggable = $.ui.ddmanager.current;
                                                                                                                                                        if (!draggable || (draggable.currentItem || draggable.element)[0] == this.element[0]) return; // Bail if draggable and droppable are same element
                                                                                                                                                        
                                                                                                                                                Severity: Major
                                                                                                                                                Found in assets/javascripts/jquery-ui.js and 3 other locations - About 7 hrs to fix
                                                                                                                                                assets/javascripts/jquery-ui.js on lines 1201..1211
                                                                                                                                                assets/javascripts/ui/ui.droppable.js on lines 78..88
                                                                                                                                                assets/javascripts/ui/ui.droppable.js on lines 90..100

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

                                                                                                                                                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

                                                                                                                                                        if(this.containment) {
                                                                                                                                                            if(position.left < this.containment[0]) position.left = this.containment[0];
                                                                                                                                                            if(position.top < this.containment[1]) position.top = this.containment[1];
                                                                                                                                                            if(position.left > this.containment[2]) position.left = this.containment[2];
                                                                                                                                                            if(position.top > this.containment[3]) position.top = this.containment[3];
                                                                                                                                                Severity: Major
                                                                                                                                                Found in assets/javascripts/jquery-ui.js and 2 other locations - About 6 hrs to fix
                                                                                                                                                assets/javascripts/jquery-ui.js on lines 719..724
                                                                                                                                                assets/javascripts/ui/ui.draggable.js on lines 312..317

                                                                                                                                                Duplicated Code

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

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

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

                                                                                                                                                Tuning

                                                                                                                                                This issue has a mass of 170.

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

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

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

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

                                                                                                                                                Refactorings

                                                                                                                                                Further Reading

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

                                                                                                                                                        if(this.containment) {
                                                                                                                                                            if(position.left < this.containment[0]) position.left = this.containment[0];
                                                                                                                                                            if(position.top < this.containment[1]) position.top = this.containment[1];
                                                                                                                                                            if(position.left > this.containment[2]) position.left = this.containment[2];
                                                                                                                                                            if(position.top > this.containment[3]) position.top = this.containment[3];
                                                                                                                                                Severity: Major
                                                                                                                                                Found in assets/javascripts/jquery-ui.js and 2 other locations - About 6 hrs to fix
                                                                                                                                                assets/javascripts/jquery-ui.js on lines 2003..2008
                                                                                                                                                assets/javascripts/ui/ui.draggable.js on lines 312..317

                                                                                                                                                Duplicated Code

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

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

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

                                                                                                                                                Tuning

                                                                                                                                                This issue has a mass of 170.

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

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

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

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

                                                                                                                                                Refactorings

                                                                                                                                                Further Reading

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

                                                                                                                                                            left: (
                                                                                                                                                                pos.left                                                                // the calculated relative position
                                                                                                                                                                + this.offset.relative.left    * mod                                        // Only for relative positioned nodes: Relative offset from element to offset parent
                                                                                                                                                                + this.offset.parent.left * mod                                            // The offsetParent's offset without borders (offset + border)
                                                                                                                                                                - (this.cssPosition == "fixed" || this.PAGEX_INCLUDES_SCROLL || this.OFFSET_PARENT_NOT_SCROLL_PARENT_X ? 0 : this.scrollLeftParent.scrollLeft()) * mod    // The offsetParent's scroll position, not if the element is fixed
                                                                                                                                                Severity: Major
                                                                                                                                                Found in assets/javascripts/jquery-ui.js and 1 other location - About 6 hrs to fix
                                                                                                                                                assets/javascripts/jquery-ui.js on lines 673..680

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

                                                                                                                                                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

                                                                                                                                                            top: (
                                                                                                                                                                pos.top                                                                    // the calculated relative position
                                                                                                                                                                + this.offset.relative.top    * mod                                        // Only for relative positioned nodes: Relative offset from element to offset parent
                                                                                                                                                                + this.offset.parent.top * mod                                            // The offsetParent's offset without borders (offset + border)
                                                                                                                                                                - (this.cssPosition == "fixed" || this.PAGEY_INCLUDES_SCROLL || this.OFFSET_PARENT_NOT_SCROLL_PARENT_Y ? 0 : this.scrollTopParent.scrollTop()) * mod    // The offsetParent's scroll position, not if the element is fixed
                                                                                                                                                Severity: Major
                                                                                                                                                Found in assets/javascripts/jquery-ui.js and 1 other location - About 6 hrs to fix
                                                                                                                                                assets/javascripts/jquery-ui.js on lines 681..688

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

                                                                                                                                                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

                                                                                                                                                    _init: function() {
                                                                                                                                                
                                                                                                                                                        var o = this.options;
                                                                                                                                                        this.containerCache = {};
                                                                                                                                                        this.element.addClass("ui-sortable");
                                                                                                                                                Severity: Major
                                                                                                                                                Found in assets/javascripts/jquery-ui.js and 1 other location - About 6 hrs to fix
                                                                                                                                                assets/javascripts/ui/ui.sortable.js on lines 16..34

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

                                                                                                                                                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

                                                                                                                                                $.ui.plugin.add("draggable", "zIndex", {
                                                                                                                                                    start: function(e, ui) {
                                                                                                                                                        var t = $(ui.helper);
                                                                                                                                                        if(t.css("zIndex")) ui.options._zIndex = t.css("zIndex");
                                                                                                                                                        t.css('zIndex', ui.options.zIndex);
                                                                                                                                                Severity: Major
                                                                                                                                                Found in assets/javascripts/jquery-ui.js and 3 other locations - About 6 hrs to fix
                                                                                                                                                assets/javascripts/jquery-ui.js on lines 836..845
                                                                                                                                                assets/javascripts/ui/ui.draggable.js on lines 536..545
                                                                                                                                                assets/javascripts/ui/ui.draggable.js on lines 685..694

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

                                                                                                                                                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

                                                                                                                                                $.ui.plugin.add("draggable", "opacity", {
                                                                                                                                                    start: function(e, ui) {
                                                                                                                                                        var t = $(ui.helper);
                                                                                                                                                        if(t.css("opacity")) ui.options._opacity = t.css("opacity");
                                                                                                                                                        t.css('opacity', ui.options.opacity);
                                                                                                                                                Severity: Major
                                                                                                                                                Found in assets/javascripts/jquery-ui.js and 3 other locations - About 6 hrs to fix
                                                                                                                                                assets/javascripts/jquery-ui.js on lines 825..834
                                                                                                                                                assets/javascripts/ui/ui.draggable.js on lines 536..545
                                                                                                                                                assets/javascripts/ui/ui.draggable.js on lines 685..694

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

                                                                                                                                                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

                                                                                                                                                $.ui.plugin.add("sortable", "zIndex", {
                                                                                                                                                    start: function(e, ui) {
                                                                                                                                                        var t = ui.helper;
                                                                                                                                                        if(t.css("zIndex")) ui.options._zIndex = t.css("zIndex");
                                                                                                                                                        t.css('zIndex', ui.options.zIndex);
                                                                                                                                                Severity: Major
                                                                                                                                                Found in assets/javascripts/jquery-ui.js and 1 other location - About 5 hrs to fix
                                                                                                                                                assets/javascripts/jquery-ui.js on lines 2208..2217

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

                                                                                                                                                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

                                                                                                                                                $.ui.plugin.add("sortable", "opacity", {
                                                                                                                                                    start: function(e, ui) {
                                                                                                                                                        var t = ui.helper;
                                                                                                                                                        if(t.css("opacity")) ui.options._opacity = t.css("opacity");
                                                                                                                                                        t.css('opacity', ui.options.opacity);
                                                                                                                                                Severity: Major
                                                                                                                                                Found in assets/javascripts/jquery-ui.js and 1 other location - About 5 hrs to fix
                                                                                                                                                assets/javascripts/jquery-ui.js on lines 2197..2206

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

                                                                                                                                                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

                                                                                                                                                            top: (
                                                                                                                                                                e.pageY                                                                    // The absolute mouse position
                                                                                                                                                                - this.offset.click.top                                                    // Click offset (relative to the element)
                                                                                                                                                                - this.offset.relative.top                                                // Only for relative positioned nodes: Relative offset from element to offset parent
                                                                                                                                                                - this.offset.parent.top                                                // The offsetParent's offset without borders (offset + border)
                                                                                                                                                Severity: Major
                                                                                                                                                Found in assets/javascripts/jquery-ui.js and 1 other location - About 5 hrs to fix
                                                                                                                                                assets/javascripts/jquery-ui.js on lines 703..710

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

                                                                                                                                                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

                                                                                                                                                    _init: function() {
                                                                                                                                                        
                                                                                                                                                        if (this.options.helper == 'original' && !(/^(?:r|a|f)/).test(this.element.css("position")))
                                                                                                                                                            this.element[0].style.position = 'relative';
                                                                                                                                                        
                                                                                                                                                Severity: Major
                                                                                                                                                Found in assets/javascripts/jquery-ui.js and 1 other location - About 5 hrs to fix
                                                                                                                                                assets/javascripts/ui/ui.draggable.js on lines 17..27

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

                                                                                                                                                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

                                                                                                                                                            left: (
                                                                                                                                                                e.pageX                                                                    // The absolute mouse position
                                                                                                                                                                - this.offset.click.left                                                // Click offset (relative to the element)
                                                                                                                                                                - this.offset.relative.left                                                // Only for relative positioned nodes: Relative offset from element to offset parent
                                                                                                                                                                - this.offset.parent.left                                                // The offsetParent's offset without borders (offset + border)
                                                                                                                                                Severity: Major
                                                                                                                                                Found in assets/javascripts/jquery-ui.js and 1 other location - About 5 hrs to fix
                                                                                                                                                assets/javascripts/jquery-ui.js on lines 695..702

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

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

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

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

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

                                                                                                                                                Refactorings

                                                                                                                                                Further Reading

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

                                                                                                                                                    show: function() {
                                                                                                                                                        if(!arguments[0] || (arguments[0].constructor == Number || /(slow|normal|fast)/.test(arguments[0])))
                                                                                                                                                            return this._show.apply(this, arguments);
                                                                                                                                                        else {
                                                                                                                                                            var o = arguments[1] || {}; o['mode'] = 'show';
                                                                                                                                                Severity: Major
                                                                                                                                                Found in assets/javascripts/jquery-ui.js and 1 other location - About 5 hrs to fix
                                                                                                                                                assets/javascripts/jquery-ui.js on lines 2417..2424

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

                                                                                                                                                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

                                                                                                                                                $.ui.plugin.add("draggable", "cursor", {
                                                                                                                                                    start: function(e, ui) {
                                                                                                                                                        var t = $('body');
                                                                                                                                                        if (t.css("cursor")) ui.options._cursor = t.css("cursor");
                                                                                                                                                        t.css("cursor", ui.options.cursor);
                                                                                                                                                Severity: Major
                                                                                                                                                Found in assets/javascripts/jquery-ui.js and 1 other location - About 5 hrs to fix
                                                                                                                                                assets/javascripts/ui/ui.draggable.js on lines 508..517

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

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

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

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

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

                                                                                                                                                Refactorings

                                                                                                                                                Further Reading

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

                                                                                                                                                    hide: function() {
                                                                                                                                                        if(!arguments[0] || (arguments[0].constructor == Number || /(slow|normal|fast)/.test(arguments[0])))
                                                                                                                                                            return this._hide.apply(this, arguments);
                                                                                                                                                        else {
                                                                                                                                                            var o = arguments[1] || {}; o['mode'] = 'hide';
                                                                                                                                                Severity: Major
                                                                                                                                                Found in assets/javascripts/jquery-ui.js and 1 other location - About 5 hrs to fix
                                                                                                                                                assets/javascripts/jquery-ui.js on lines 2409..2416

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

                                                                                                                                                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

                                                                                                                                                function getter(namespace, plugin, method, args) {
                                                                                                                                                    function getMethods(type) {
                                                                                                                                                        var methods = $[namespace][plugin][type] || [];
                                                                                                                                                        return (typeof methods == 'string' ? methods.split(/,?\s+/) : methods);
                                                                                                                                                    }
                                                                                                                                                Severity: Major
                                                                                                                                                Found in assets/javascripts/jquery-ui.js and 1 other location - About 5 hrs to fix
                                                                                                                                                assets/javascripts/ui/ui.core.js on lines 249..260

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

                                                                                                                                                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

                                                                                                                                                    _removeCurrentsFromItems: function() {
                                                                                                                                                            
                                                                                                                                                        var list = this.currentItem.find(":data(sortable-item)");    
                                                                                                                                                    
                                                                                                                                                        for (var i=0; i < this.items.length; i++) {
                                                                                                                                                Severity: Major
                                                                                                                                                Found in assets/javascripts/jquery-ui.js and 1 other location - About 4 hrs to fix
                                                                                                                                                assets/javascripts/ui/ui.sortable.js on lines 443..456

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

                                                                                                                                                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

                                                                                                                                                $.keyCode = {
                                                                                                                                                    BACKSPACE: 8,
                                                                                                                                                    CAPS_LOCK: 20,
                                                                                                                                                    COMMA: 188,
                                                                                                                                                    CONTROL: 17,
                                                                                                                                                Severity: Major
                                                                                                                                                Found in assets/javascripts/jquery-ui.js and 1 other location - About 4 hrs to fix
                                                                                                                                                assets/javascripts/ui/ui.core.js on lines 100..127

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

                                                                                                                                                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

                                                                                                                                                    hasScroll: function(e, a) {
                                                                                                                                                        
                                                                                                                                                        //If overflow is hidden, the element might have extra content, but the user wants to hide it
                                                                                                                                                        if ($(e).css('overflow') == 'hidden') { return false; }
                                                                                                                                                        
                                                                                                                                                Severity: Major
                                                                                                                                                Found in assets/javascripts/jquery-ui.js and 1 other location - About 4 hrs to fix
                                                                                                                                                assets/javascripts/ui/ui.core.js on lines 71..88

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

                                                                                                                                                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

                                                                                                                                                    getHandle: function(e) {
                                                                                                                                                
                                                                                                                                                        var handle = !this.options.handle || !$(this.options.handle, this.element).length ? true : false;
                                                                                                                                                        $(this.options.handle, this.element)
                                                                                                                                                            .find("*")
                                                                                                                                                Severity: Major
                                                                                                                                                Found in assets/javascripts/jquery-ui.js and 1 other location - About 4 hrs to fix
                                                                                                                                                assets/javascripts/ui/ui.draggable.js on lines 156..168

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

                                                                                                                                                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

                                                                                                                                                $.ui.plugin.add("droppable", "activeClass", {
                                                                                                                                                    activate: function(e, ui) {
                                                                                                                                                        $(this).addClass(ui.options.activeClass);
                                                                                                                                                    },
                                                                                                                                                    deactivate: function(e, ui) {
                                                                                                                                                Severity: Major
                                                                                                                                                Found in assets/javascripts/jquery-ui.js and 1 other location - About 4 hrs to fix
                                                                                                                                                assets/javascripts/ui/ui.droppable.js on lines 290..300

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

                                                                                                                                                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

                                                                                                                                                $.ui.plugin.add("droppable", "hoverClass", {
                                                                                                                                                    over: function(e, ui) {
                                                                                                                                                        $(this).addClass(ui.options.hoverClass);
                                                                                                                                                    },
                                                                                                                                                    out: function(e, ui) {
                                                                                                                                                Severity: Major
                                                                                                                                                Found in assets/javascripts/jquery-ui.js and 1 other location - About 4 hrs to fix
                                                                                                                                                assets/javascripts/ui/ui.droppable.js on lines 302..312

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

                                                                                                                                                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

                                                                                                                                                                    co.left+(over ? Math.max(ce.scrollWidth,ce.offsetWidth) : ce.offsetWidth) - (parseInt($(ce).css("borderLeftWidth"),10) || 0) - this.offset.parent.left - this.helperProportions.width - this.margins.left - (parseInt(this.currentItem.css("marginRight"),10) || 0),
                                                                                                                                                Severity: Major
                                                                                                                                                Found in assets/javascripts/jquery-ui.js and 1 other location - About 4 hrs to fix
                                                                                                                                                assets/javascripts/jquery-ui.js on lines 1935..1935

                                                                                                                                                Duplicated Code

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

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

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

                                                                                                                                                Tuning

                                                                                                                                                This issue has a mass of 126.

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

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

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

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

                                                                                                                                                Refactorings

                                                                                                                                                Further Reading

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

                                                                                                                                                        for (var i = this.containers.length - 1; i >= 0; i--){
                                                                                                                                                            this.containers[i]._propagate("deactivate", e, this, noPropagation);
                                                                                                                                                            if(this.containers[i].containerCache.over) {
                                                                                                                                                                this.containers[i]._propagate("out", e, this);
                                                                                                                                                                this.containers[i].containerCache.over = 0;
                                                                                                                                                Severity: Major
                                                                                                                                                Found in assets/javascripts/jquery-ui.js and 1 other location - About 4 hrs to fix
                                                                                                                                                assets/javascripts/ui/ui.sortable.js on lines 843..849

                                                                                                                                                Duplicated Code

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

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

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

                                                                                                                                                Tuning

                                                                                                                                                This issue has a mass of 126.

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

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

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

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

                                                                                                                                                Refactorings

                                                                                                                                                Further Reading

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

                                                                                                                                                                    co.top+(over ? Math.max(ce.scrollHeight,ce.offsetHeight) : ce.offsetHeight) - (parseInt($(ce).css("borderTopWidth"),10) || 0) - this.offset.parent.top - this.helperProportions.height - this.margins.top - (parseInt(this.currentItem.css("marginBottom"),10) || 0)
                                                                                                                                                Severity: Major
                                                                                                                                                Found in assets/javascripts/jquery-ui.js and 1 other location - About 4 hrs to fix
                                                                                                                                                assets/javascripts/jquery-ui.js on lines 1934..1934

                                                                                                                                                Duplicated Code

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

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

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

                                                                                                                                                Tuning

                                                                                                                                                This issue has a mass of 126.

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

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

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

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

                                                                                                                                                Refactorings

                                                                                                                                                Further Reading

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

                                                                                                                                                    destroy: function() {
                                                                                                                                                        var drop = $.ui.ddmanager.droppables[this.options.scope];
                                                                                                                                                        for ( var i = 0; i < drop.length; i++ )
                                                                                                                                                            if ( drop[i] == this )
                                                                                                                                                                drop.splice(i, 1);
                                                                                                                                                Severity: Major
                                                                                                                                                Found in assets/javascripts/jquery-ui.js and 1 other location - About 4 hrs to fix
                                                                                                                                                assets/javascripts/ui/ui.droppable.js on lines 38..48

                                                                                                                                                Duplicated Code

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

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

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

                                                                                                                                                Tuning

                                                                                                                                                This issue has a mass of 120.

                                                                                                                                                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

                                                                                                                                                    _propagate: function(n,e) {
                                                                                                                                                        $.ui.plugin.call(this, n, [e, this.uiHash()]);
                                                                                                                                                        if(n == "drag") this.positionAbs = this._convertPositionTo("absolute"); //The absolute position has to be recalculated after plugins
                                                                                                                                                        return this.element.triggerHandler(n == "drag" ? n : "drag"+n, [e, this.uiHash()], this.options[n]);
                                                                                                                                                    },
                                                                                                                                                Severity: Major
                                                                                                                                                Found in assets/javascripts/jquery-ui.js and 1 other location - About 4 hrs to fix
                                                                                                                                                assets/javascripts/ui/ui.draggable.js on lines 340..344

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

                                                                                                                                                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

                                                                                                                                                        case 'intersect':
                                                                                                                                                            return (l < x1 + (draggable.helperProportions.width / 2) // Right Half
                                                                                                                                                                && x2 - (draggable.helperProportions.width / 2) < r // Left Half
                                                                                                                                                                && t < y1 + (draggable.helperProportions.height / 2) // Bottom Half
                                                                                                                                                                && y2 - (draggable.helperProportions.height / 2) < b ); // Top Half
                                                                                                                                                Severity: Major
                                                                                                                                                Found in assets/javascripts/jquery-ui.js and 1 other location - About 4 hrs to fix
                                                                                                                                                assets/javascripts/ui/ui.droppable.js on lines 167..172

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

                                                                                                                                                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

                                                                                                                                                function contains(a, b) { 
                                                                                                                                                    var safari2 = $.browser.safari && $.browser.version < 522; 
                                                                                                                                                    if (a.contains && !safari2) { 
                                                                                                                                                        return a.contains(b); 
                                                                                                                                                    } 
                                                                                                                                                Severity: Major
                                                                                                                                                Found in assets/javascripts/jquery-ui.js and 1 other location - About 4 hrs to fix
                                                                                                                                                assets/javascripts/ui/ui.core.js on lines 41..51

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

                                                                                                                                                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

                                                                                                                                                        case 'touch':
                                                                                                                                                            return (
                                                                                                                                                                    (y1 >= t && y1 <= b) ||    // Top edge touching
                                                                                                                                                                    (y2 >= t && y2 <= b) ||    // Bottom edge touching
                                                                                                                                                                    (y1 < t && y2 > b)        // Surrounded vertically
                                                                                                                                                Severity: Major
                                                                                                                                                Found in assets/javascripts/jquery-ui.js and 1 other location - About 3 hrs to fix
                                                                                                                                                assets/javascripts/ui/ui.droppable.js on lines 179..189

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

                                                                                                                                                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

                                                                                                                                                    _trigger: function(type, e, data) {
                                                                                                                                                        var eventName = (type == this.widgetEventPrefix
                                                                                                                                                            ? type : this.widgetEventPrefix + type);
                                                                                                                                                        e = e  || $.event.fix({ type: eventName, target: this.element[0] });
                                                                                                                                                        return this.element.triggerHandler(eventName, [e, data], this.options[type]);
                                                                                                                                                Severity: Major
                                                                                                                                                Found in assets/javascripts/jquery-ui.js and 1 other location - About 3 hrs to fix
                                                                                                                                                assets/javascripts/ui/ui.core.js on lines 379..384

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

                                                                                                                                                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

                                                                                                                                                    option: function(key, value) {
                                                                                                                                                        var options = key,
                                                                                                                                                            self = this;
                                                                                                                                                        
                                                                                                                                                        if (typeof key == "string") {
                                                                                                                                                Severity: Major
                                                                                                                                                Found in assets/javascripts/jquery-ui.js and 1 other location - About 3 hrs to fix
                                                                                                                                                assets/javascripts/ui/ui.core.js on lines 343..358

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

                                                                                                                                                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

                                                                                                                                                    destroy: function() {
                                                                                                                                                        this.element
                                                                                                                                                            .removeClass("ui-sortable ui-sortable-disabled")
                                                                                                                                                            .removeData("sortable")
                                                                                                                                                            .unbind(".sortable");
                                                                                                                                                Severity: Major
                                                                                                                                                Found in assets/javascripts/jquery-ui.js and 1 other location - About 3 hrs to fix
                                                                                                                                                assets/javascripts/ui/ui.sortable.js on lines 36..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 106.

                                                                                                                                                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

                                                                                                                                                        this.scrollTopParent = function(el) {
                                                                                                                                                            do { if(/auto|scroll/.test(el.css('overflow')) || (/auto|scroll/).test(el.css('overflow-y'))) return el; el = el.parent(); } while (el[0].parentNode);
                                                                                                                                                            return $(document);
                                                                                                                                                        }(this.helper);
                                                                                                                                                Severity: Major
                                                                                                                                                Found in assets/javascripts/jquery-ui.js and 1 other location - About 3 hrs to fix
                                                                                                                                                assets/javascripts/jquery-ui.js on lines 619..622

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

                                                                                                                                                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

                                                                                                                                                        this.scrollLeftParent = function(el) {
                                                                                                                                                            do { if(/auto|scroll/.test(el.css('overflow')) || (/auto|scroll/).test(el.css('overflow-x'))) return el; el = el.parent(); } while (el[0].parentNode);
                                                                                                                                                            return $(document);
                                                                                                                                                        }(this.helper);
                                                                                                                                                Severity: Major
                                                                                                                                                Found in assets/javascripts/jquery-ui.js and 1 other location - About 3 hrs to fix
                                                                                                                                                assets/javascripts/jquery-ui.js on lines 615..618

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

                                                                                                                                                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

                                                                                                                                                        i.overflowY = function(el) {
                                                                                                                                                            do { if(/auto|scroll/.test(el.css('overflow')) || (/auto|scroll/).test(el.css('overflow-y'))) return el; el = el.parent(); } while (el[0].parentNode);
                                                                                                                                                            return $(document);
                                                                                                                                                        }(i.currentItem);
                                                                                                                                                Severity: Major
                                                                                                                                                Found in assets/javascripts/jquery-ui.js and 1 other location - About 3 hrs to fix
                                                                                                                                                assets/javascripts/jquery-ui.js on lines 2228..2231

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

                                                                                                                                                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

                                                                                                                                                        i.overflowX = function(el) {
                                                                                                                                                            do { if(/auto|scroll/.test(el.css('overflow')) || (/auto|scroll/).test(el.css('overflow-x'))) return el; el = el.parent(); } while (el[0].parentNode);
                                                                                                                                                            return $(document);
                                                                                                                                                        }(i.currentItem);
                                                                                                                                                Severity: Major
                                                                                                                                                Found in assets/javascripts/jquery-ui.js and 1 other location - About 3 hrs to fix
                                                                                                                                                assets/javascripts/jquery-ui.js on lines 2224..2227

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

                                                                                                                                                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

                                                                                                                                                        this.element = $(element)
                                                                                                                                                            .bind('setData.' + name, function(e, key, value) {
                                                                                                                                                                return self._setData(key, value);
                                                                                                                                                            })
                                                                                                                                                            .bind('getData.' + name, function(e, key) {
                                                                                                                                                Severity: Major
                                                                                                                                                Found in assets/javascripts/jquery-ui.js and 1 other location - About 3 hrs to fix
                                                                                                                                                assets/javascripts/ui/ui.core.js on lines 313..322

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

                                                                                                                                                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

                                                                                                                                                    _activate: function(e) {
                                                                                                                                                        
                                                                                                                                                        var draggable = $.ui.ddmanager.current;
                                                                                                                                                        $.ui.plugin.call(this, 'activate', [e, this.ui(draggable)]);
                                                                                                                                                        if(draggable) this.element.triggerHandler("dropactivate", [e, this.ui(draggable)], this.options.activate);
                                                                                                                                                Severity: Major
                                                                                                                                                Found in assets/javascripts/jquery-ui.js and 3 other locations - About 3 hrs to fix
                                                                                                                                                assets/javascripts/jquery-ui.js on lines 1242..1248
                                                                                                                                                assets/javascripts/ui/ui.droppable.js on lines 62..68
                                                                                                                                                assets/javascripts/ui/ui.droppable.js on lines 70..76

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

                                                                                                                                                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

                                                                                                                                                    _deactivate: function(e) {
                                                                                                                                                        
                                                                                                                                                        var draggable = $.ui.ddmanager.current;
                                                                                                                                                        $.ui.plugin.call(this, 'deactivate', [e, this.ui(draggable)]);
                                                                                                                                                        if(draggable) this.element.triggerHandler("dropdeactivate", [e, this.ui(draggable)], this.options.deactivate);
                                                                                                                                                Severity: Major
                                                                                                                                                Found in assets/javascripts/jquery-ui.js and 3 other locations - About 3 hrs to fix
                                                                                                                                                assets/javascripts/jquery-ui.js on lines 1235..1241
                                                                                                                                                assets/javascripts/ui/ui.droppable.js on lines 62..68
                                                                                                                                                assets/javascripts/ui/ui.droppable.js on lines 70..76

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

                                                                                                                                                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

                                                                                                                                                            top: (
                                                                                                                                                                pos.top                                                                    // the calculated relative position
                                                                                                                                                                + this.offset.parent.top * mod                                            // The offsetParent's offset without borders (offset + border)
                                                                                                                                                                - (this.offsetParent[0] == document.body ? 0 : this.offsetParent[0].scrollTop) * mod    // The offsetParent's scroll position
                                                                                                                                                                + this.margins.top * mod                                                //Add the margin (you don't want the margin counting in intersection methods)
                                                                                                                                                Severity: Major
                                                                                                                                                Found in assets/javascripts/jquery-ui.js and 1 other location - About 3 hrs to fix
                                                                                                                                                assets/javascripts/jquery-ui.js on lines 1970..1975

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

                                                                                                                                                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

                                                                                                                                                    _setData: function(key, value) {
                                                                                                                                                
                                                                                                                                                        if(key == 'accept') {
                                                                                                                                                            this.options.accept = value && $.isFunction(value) ? value : function(d) {
                                                                                                                                                                return d.is(accept);
                                                                                                                                                Severity: Major
                                                                                                                                                Found in assets/javascripts/jquery-ui.js and 1 other location - About 3 hrs to fix
                                                                                                                                                assets/javascripts/ui/ui.droppable.js on lines 50..60

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

                                                                                                                                                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.revert == "invalid" && !dropped) || (this.options.revert == "valid" && dropped) || this.options.revert === true || ($.isFunction(this.options.revert) && this.options.revert.call(this.element, dropped))) {
                                                                                                                                                            var self = this;
                                                                                                                                                            $(this.helper).animate(this.originalPosition, parseInt(this.options.revertDuration, 10) || 500, function() {
                                                                                                                                                                self._propagate("stop", e);
                                                                                                                                                                self._clear();
                                                                                                                                                Severity: Major
                                                                                                                                                Found in assets/javascripts/jquery-ui.js and 1 other location - About 3 hrs to fix
                                                                                                                                                assets/javascripts/ui/ui.draggable.js on lines 142..151

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

                                                                                                                                                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

                                                                                                                                                            left: (
                                                                                                                                                                pos.left                                                                // the calculated relative position
                                                                                                                                                                + this.offset.parent.left * mod                                            // The offsetParent's offset without borders (offset + border)
                                                                                                                                                                - (this.offsetParent[0] == document.body ? 0 : this.offsetParent[0].scrollLeft) * mod    // The offsetParent's scroll position
                                                                                                                                                                + this.margins.left * mod                                                //Add the margin (you don't want the margin counting in intersection methods)
                                                                                                                                                Severity: Major
                                                                                                                                                Found in assets/javascripts/jquery-ui.js and 1 other location - About 3 hrs to fix
                                                                                                                                                assets/javascripts/jquery-ui.js on lines 1964..1969

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

                                                                                                                                                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.handle && !overrideHandle) {
                                                                                                                                                            var validHandle = false;
                                                                                                                                                            
                                                                                                                                                            $(this.options.handle, currentItem).find("*").andSelf().each(function() { if(this == e.target) validHandle = true; });
                                                                                                                                                            if(!validHandle) return false;
                                                                                                                                                Severity: Major
                                                                                                                                                Found in assets/javascripts/jquery-ui.js and 1 other location - About 3 hrs to fix
                                                                                                                                                assets/javascripts/ui/ui.sortable.js on lines 68..73

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

                                                                                                                                                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

                                                                                                                                                    _mouseCapture: function(e) {
                                                                                                                                                
                                                                                                                                                        var o = this.options;
                                                                                                                                                        
                                                                                                                                                        if (this.helper || o.disabled || $(e.target).is('.ui-resizable-handle'))
                                                                                                                                                Severity: Major
                                                                                                                                                Found in assets/javascripts/jquery-ui.js and 1 other location - About 3 hrs to fix
                                                                                                                                                assets/javascripts/ui/ui.draggable.js on lines 35..49

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

                                                                                                                                                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

                                                                                                                                                        $(ui.options.connectToSortable).each(function() {
                                                                                                                                                            if($.data(this, 'sortable')) {
                                                                                                                                                                var sortable = $.data(this, 'sortable');
                                                                                                                                                                inst.sortables.push({
                                                                                                                                                                    instance: sortable,
                                                                                                                                                Severity: Major
                                                                                                                                                Found in assets/javascripts/jquery-ui.js and 1 other location - About 3 hrs to fix
                                                                                                                                                assets/javascripts/ui/ui.draggable.js on lines 400..410

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

                                                                                                                                                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

                                                                                                                                                        i.overflowY = function(el) {
                                                                                                                                                            do { if(/auto|scroll/.test(el.css('overflow')) || (/auto|scroll/).test(el.css('overflow-y'))) return el; el = el.parent(); } while (el[0].parentNode);
                                                                                                                                                            return $(document);
                                                                                                                                                        }(this);
                                                                                                                                                Severity: Major
                                                                                                                                                Found in assets/javascripts/jquery-ui.js and 1 other location - About 3 hrs to fix
                                                                                                                                                assets/javascripts/jquery-ui.js on lines 877..880

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

                                                                                                                                                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

                                                                                                                                                        i.overflowX = function(el) {
                                                                                                                                                            do { if(/auto|scroll/.test(el.css('overflow')) || (/auto|scroll/).test(el.css('overflow-x'))) return el; el = el.parent(); } while (el[0].parentNode);
                                                                                                                                                            return $(document);
                                                                                                                                                        }(this);
                                                                                                                                                Severity: Major
                                                                                                                                                Found in assets/javascripts/jquery-ui.js and 1 other location - About 3 hrs to fix
                                                                                                                                                assets/javascripts/jquery-ui.js on lines 873..876

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

                                                                                                                                                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

                                                                                                                                                            top: (
                                                                                                                                                                e.pageY                                                                    // The absolute mouse position
                                                                                                                                                                - this.offset.click.top                                                    // Click offset (relative to the element)
                                                                                                                                                                - this.offset.parent.top                                                // The offsetParent's offset without borders (offset + border)
                                                                                                                                                                + (this.offsetParent[0] == document.body ? 0 : this.offsetParent[0].scrollTop)    // The offsetParent's scroll position, not if the element is fixed
                                                                                                                                                Severity: Major
                                                                                                                                                Found in assets/javascripts/jquery-ui.js and 1 other location - About 2 hrs to fix
                                                                                                                                                assets/javascripts/jquery-ui.js on lines 1989..1994

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

                                                                                                                                                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

                                                                                                                                                            left: (
                                                                                                                                                                e.pageX                                                                    // The absolute mouse position
                                                                                                                                                                - this.offset.click.left                                                // Click offset (relative to the element)
                                                                                                                                                                - this.offset.parent.left                                                // The offsetParent's offset without borders (offset + border)
                                                                                                                                                                + (this.offsetParent[0] == document.body ? 0 : this.offsetParent[0].scrollLeft)    // The offsetParent's scroll position, not if the element is fixed
                                                                                                                                                Severity: Major
                                                                                                                                                Found in assets/javascripts/jquery-ui.js and 1 other location - About 2 hrs to fix
                                                                                                                                                assets/javascripts/jquery-ui.js on lines 1983..1988

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

                                                                                                                                                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 self = this,
                                                                                                                                                            btnIsLeft = (e.which == 1),
                                                                                                                                                            elIsCancel = (typeof this.options.cancel == "string" ? $(e.target).parents().add(e.target).filter(this.options.cancel).length : false);
                                                                                                                                                Severity: Major
                                                                                                                                                Found in assets/javascripts/jquery-ui.js and 1 other location - About 2 hrs to fix
                                                                                                                                                assets/javascripts/ui/ui.core.js on lines 434..436

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

                                                                                                                                                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.domPosition.prev != this.currentItem.prev().not(".ui-sortable-helper")[0] || this.domPosition.parent != this.currentItem.parent()[0]) this._propagate("update", e, null, noPropagation); //Trigger update callback if the DOM position has changed
                                                                                                                                                Severity: Major
                                                                                                                                                Found in assets/javascripts/jquery-ui.js and 1 other location - About 2 hrs to fix
                                                                                                                                                assets/javascripts/ui/ui.sortable.js on lines 831..831

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

                                                                                                                                                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 x1 = (draggable.positionAbs || draggable.position.absolute).left, x2 = x1 + draggable.helperProportions.width,
                                                                                                                                                        y1 = (draggable.positionAbs || draggable.position.absolute).top, y2 = y1 + draggable.helperProportions.height;
                                                                                                                                                Severity: Major
                                                                                                                                                Found in assets/javascripts/jquery-ui.js and 1 other location - About 2 hrs to fix
                                                                                                                                                assets/javascripts/ui/ui.droppable.js on lines 157..158

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

                                                                                                                                                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._mouseDistanceMet(e) && this._mouseDelayMet(e)) {
                                                                                                                                                            this._mouseStarted =
                                                                                                                                                                (this._mouseStart(this._mouseDownEvent, e) !== false);
                                                                                                                                                            (this._mouseStarted ? this._mouseDrag(e) : this._mouseUp(e));
                                                                                                                                                        }
                                                                                                                                                Severity: Major
                                                                                                                                                Found in assets/javascripts/jquery-ui.js and 1 other location - About 2 hrs to fix
                                                                                                                                                assets/javascripts/ui/ui.core.js on lines 485..489

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

                                                                                                                                                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

                                                                                                                                                    _mouseDistanceMet: function(e) {
                                                                                                                                                        return (Math.max(
                                                                                                                                                                Math.abs(this._mouseDownEvent.pageX - e.pageX),
                                                                                                                                                                Math.abs(this._mouseDownEvent.pageY - e.pageY)
                                                                                                                                                            ) >= this.options.distance
                                                                                                                                                Severity: Major
                                                                                                                                                Found in assets/javascripts/jquery-ui.js and 1 other location - About 2 hrs to fix
                                                                                                                                                assets/javascripts/ui/ui.core.js on lines 508..514

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

                                                                                                                                                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 currentItem = null, self = this, nodes = $(e.target).parents().each(function() {    
                                                                                                                                                            if($.data(this, 'sortable-item') == self) {
                                                                                                                                                                currentItem = $(this);
                                                                                                                                                                return false;
                                                                                                                                                            }
                                                                                                                                                Severity: Major
                                                                                                                                                Found in assets/javascripts/jquery-ui.js and 1 other location - About 2 hrs to fix
                                                                                                                                                assets/javascripts/ui/ui.sortable.js on lines 59..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 81.

                                                                                                                                                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 l = inst.snapElements[i].left, r = l + inst.snapElements[i].width, 
                                                                                                                                                                t = inst.snapElements[i].top, b = t + inst.snapElements[i].height;
                                                                                                                                                Severity: Major
                                                                                                                                                Found in assets/javascripts/jquery-ui.js and 1 other location - About 2 hrs to fix
                                                                                                                                                assets/javascripts/ui/ui.draggable.js on lines 628..629

                                                                                                                                                Duplicated Code

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

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

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

                                                                                                                                                Tuning

                                                                                                                                                This issue has a mass of 80.

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

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

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

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

                                                                                                                                                Refactorings

                                                                                                                                                Further Reading

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

                                                                                                                                                                if(inst.snapElements[i].snapping) (inst.options.snap.release && inst.options.snap.release.call(inst.element, null, $.extend(inst.uiHash(), { snapItem: inst.snapElements[i].item })));
                                                                                                                                                Severity: Major
                                                                                                                                                Found in assets/javascripts/jquery-ui.js and 1 other location - About 2 hrs to fix
                                                                                                                                                assets/javascripts/jquery-ui.js on lines 983..984

                                                                                                                                                Duplicated Code

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

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

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

                                                                                                                                                Tuning

                                                                                                                                                This issue has a mass of 80.

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

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

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

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

                                                                                                                                                Refactorings

                                                                                                                                                Further Reading

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

                                                                                                                                                            if(!inst.snapElements[i].snapping && (ts || bs || ls || rs || first))
                                                                                                                                                                (inst.options.snap.snap && inst.options.snap.snap.call(inst.element, null, $.extend(inst.uiHash(), { snapItem: inst.snapElements[i].item })));
                                                                                                                                                Severity: Major
                                                                                                                                                Found in assets/javascripts/jquery-ui.js and 1 other location - About 2 hrs to fix
                                                                                                                                                assets/javascripts/jquery-ui.js on lines 954..954

                                                                                                                                                Duplicated Code

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

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

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

                                                                                                                                                Tuning

                                                                                                                                                This issue has a mass of 80.

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

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

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

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

                                                                                                                                                Refactorings

                                                                                                                                                Further Reading

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

                                                                                                                                                        return (
                                                                                                                                                            // in tab order
                                                                                                                                                            a.tabIndex >= 0 &&
                                                                                                                                                            
                                                                                                                                                            ( // filter node types that participate in the tab order
                                                                                                                                                Severity: Major
                                                                                                                                                Found in assets/javascripts/jquery-ui.js and 1 other location - About 2 hrs to fix
                                                                                                                                                assets/javascripts/ui/ui.core.js on lines 224..240

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

                                                                                                                                                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._mouseDistanceMet(e) && this._mouseDelayMet(e)) {
                                                                                                                                                            this._mouseStarted = (this._mouseStart(e) !== false);
                                                                                                                                                            if (!this._mouseStarted) {
                                                                                                                                                                e.preventDefault();
                                                                                                                                                                return true;
                                                                                                                                                Severity: Major
                                                                                                                                                Found in assets/javascripts/jquery-ui.js and 1 other location - About 2 hrs to fix
                                                                                                                                                assets/javascripts/ui/ui.core.js on lines 448..454

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

                                                                                                                                                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

                                                                                                                                                    ui: function(c) {
                                                                                                                                                        return {
                                                                                                                                                            draggable: (c.currentItem || c.element),
                                                                                                                                                            helper: c.helper,
                                                                                                                                                            position: c.position,
                                                                                                                                                Severity: Major
                                                                                                                                                Found in assets/javascripts/jquery-ui.js and 1 other location - About 2 hrs to fix
                                                                                                                                                assets/javascripts/ui/ui.droppable.js on lines 128..137

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

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

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

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

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

                                                                                                                                                Refactorings

                                                                                                                                                Further Reading

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

                                                                                                                                                        if (a < Math.abs(c)) { a=c; var s=p/4; }
                                                                                                                                                        else var s = p/(2*Math.PI) * Math.asin (c/a);
                                                                                                                                                Severity: Major
                                                                                                                                                Found in assets/javascripts/jquery-ui.js and 2 other locations - About 1 hr to fix
                                                                                                                                                assets/javascripts/jquery-ui.js on lines 2705..2706
                                                                                                                                                assets/javascripts/jquery-ui.js on lines 2712..2713

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

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

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

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

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

                                                                                                                                                Refactorings

                                                                                                                                                Further Reading

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

                                                                                                                                                        if (a < Math.abs(c)) { a=c; var s=p/4; }
                                                                                                                                                        else var s = p/(2*Math.PI) * Math.asin (c/a);
                                                                                                                                                Severity: Major
                                                                                                                                                Found in assets/javascripts/jquery-ui.js and 2 other locations - About 1 hr to fix
                                                                                                                                                assets/javascripts/jquery-ui.js on lines 2705..2706
                                                                                                                                                assets/javascripts/jquery-ui.js on lines 2719..2720

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

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

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

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

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

                                                                                                                                                Refactorings

                                                                                                                                                Further Reading

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

                                                                                                                                                        if (a < Math.abs(c)) { a=c; var s=p/4; }
                                                                                                                                                        else var s = p/(2*Math.PI) * Math.asin (c/a);
                                                                                                                                                Severity: Major
                                                                                                                                                Found in assets/javascripts/jquery-ui.js and 2 other locations - About 1 hr to fix
                                                                                                                                                assets/javascripts/jquery-ui.js on lines 2712..2713
                                                                                                                                                assets/javascripts/jquery-ui.js on lines 2719..2720

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

                                                                                                                                                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

                                                                                                                                                    _mouseDestroy: function() {
                                                                                                                                                        this.element.unbind('.'+this.widgetName);
                                                                                                                                                        
                                                                                                                                                        // Restore text selection in IE
                                                                                                                                                        ($.browser.msie
                                                                                                                                                Severity: Major
                                                                                                                                                Found in assets/javascripts/jquery-ui.js and 1 other location - About 1 hr to fix
                                                                                                                                                assets/javascripts/ui/ui.core.js on lines 420..426

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

                                                                                                                                                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._intersectsWith(this.containers[i].containerCache)) {
                                                                                                                                                                if(!this.containers[i].containerCache.over) {
                                                                                                                                                                    
                                                                                                                                                
                                                                                                                                                                    if(this.currentContainer != this.containers[i]) {
                                                                                                                                                Severity: Major
                                                                                                                                                Found in assets/javascripts/jquery-ui.js and 1 other location - About 1 hr to fix
                                                                                                                                                assets/javascripts/ui/ui.sortable.js on lines 591..627

                                                                                                                                                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

                                                                                                                                                    destroy: function() {
                                                                                                                                                        if(!this.element.data('draggable')) return;
                                                                                                                                                        this.element.removeData("draggable").unbind(".draggable").removeClass('ui-draggable ui-draggable-dragging ui-draggable-disabled');
                                                                                                                                                        this._mouseDestroy();
                                                                                                                                                    }
                                                                                                                                                Severity: Major
                                                                                                                                                Found in assets/javascripts/jquery-ui.js and 1 other location - About 1 hr to fix
                                                                                                                                                assets/javascripts/ui/ui.draggable.js on lines 29..33

                                                                                                                                                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(!noActivation) {
                                                                                                                                                             for (var i = this.containers.length - 1; i >= 0; i--) { this.containers[i]._propagate("activate", e, this); }
                                                                                                                                                        }
                                                                                                                                                Severity: Major
                                                                                                                                                Found in assets/javascripts/jquery-ui.js and 1 other location - About 1 hr to fix
                                                                                                                                                assets/javascripts/ui/ui.sortable.js on lines 159..161

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

                                                                                                                                                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

                                                                                                                                                        this.margins = {                                                                                //Cache the margins
                                                                                                                                                            left: (parseInt(this.element.css("marginLeft"),10) || 0),
                                                                                                                                                            top: (parseInt(this.element.css("marginTop"),10) || 0)
                                                                                                                                                        };        
                                                                                                                                                Severity: Major
                                                                                                                                                Found in assets/javascripts/jquery-ui.js and 1 other location - About 1 hr to fix
                                                                                                                                                assets/javascripts/jquery-ui.js on lines 1848..1851

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

                                                                                                                                                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

                                                                                                                                                        this.options = $.extend({},
                                                                                                                                                            $.widget.defaults,
                                                                                                                                                            $[namespace][name].defaults,
                                                                                                                                                            $.metadata && $.metadata.get(element)[name],
                                                                                                                                                            options);
                                                                                                                                                Severity: Major
                                                                                                                                                Found in assets/javascripts/jquery-ui.js and 1 other location - About 1 hr to fix
                                                                                                                                                assets/javascripts/ui/ui.core.js on lines 307..311

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

                                                                                                                                                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

                                                                                                                                                        this.margins = {                                                                                //Cache the margins
                                                                                                                                                            left: (parseInt(this.currentItem.css("marginLeft"),10) || 0),
                                                                                                                                                            top: (parseInt(this.currentItem.css("marginTop"),10) || 0)
                                                                                                                                                        };        
                                                                                                                                                Severity: Major
                                                                                                                                                Found in assets/javascripts/jquery-ui.js and 1 other location - About 1 hr to fix
                                                                                                                                                assets/javascripts/jquery-ui.js on lines 537..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 68.

                                                                                                                                                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

                                                                                                                                                            OFFSET_PARENT_NOT_SCROLL_PARENT_X: this.scrollLeftParent[0] != this.offsetParent[0] && !(this.scrollLeftParent[0] == document && (/(body|html)/i).test(this.offsetParent[0].tagName))
                                                                                                                                                Severity: Major
                                                                                                                                                Found in assets/javascripts/jquery-ui.js and 1 other location - About 1 hr to fix
                                                                                                                                                assets/javascripts/jquery-ui.js on lines 590..590

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

                                                                                                                                                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

                                                                                                                                                            OFFSET_PARENT_NOT_SCROLL_PARENT_Y: this.scrollTopParent[0] != this.offsetParent[0] && !(this.scrollTopParent[0] == document && (/(body|html)/i).test(this.offsetParent[0].tagName)),
                                                                                                                                                Severity: Major
                                                                                                                                                Found in assets/javascripts/jquery-ui.js and 1 other location - About 1 hr to fix
                                                                                                                                                assets/javascripts/jquery-ui.js on lines 591..591

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

                                                                                                                                                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

                                                                                                                                                        this.offset = {                                                                                    //Substract the margins from the element's absolute offset
                                                                                                                                                            top: this.offset.top - this.margins.top,
                                                                                                                                                            left: this.offset.left - this.margins.left
                                                                                                                                                        };
                                                                                                                                                Severity: Major
                                                                                                                                                Found in assets/javascripts/jquery-ui.js and 1 other location - About 1 hr to fix
                                                                                                                                                assets/javascripts/jquery-ui.js on lines 544..547

                                                                                                                                                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

                                                                                                                                                        this.offset = {                                                                                    //Substract the margins from the element's absolute offset
                                                                                                                                                            top: this.offset.top - this.margins.top,
                                                                                                                                                            left: this.offset.left - this.margins.left
                                                                                                                                                        };
                                                                                                                                                Severity: Major
                                                                                                                                                Found in assets/javascripts/jquery-ui.js and 1 other location - About 1 hr to fix
                                                                                                                                                assets/javascripts/jquery-ui.js on lines 1854..1857

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

                                                                                                                                                        if(!this.options.axis || this.options.axis != "x") this.helper[0].style.top = this.position.top+'px';
                                                                                                                                                Severity: Major
                                                                                                                                                Found in assets/javascripts/jquery-ui.js and 3 other locations - About 1 hr to fix
                                                                                                                                                assets/javascripts/jquery-ui.js on lines 745..745
                                                                                                                                                assets/javascripts/ui/ui.draggable.js on lines 128..128
                                                                                                                                                assets/javascripts/ui/ui.draggable.js on lines 129..129

                                                                                                                                                Duplicated Code

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

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

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

                                                                                                                                                Tuning

                                                                                                                                                This issue has a mass of 65.

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

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

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

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

                                                                                                                                                Refactorings

                                                                                                                                                Further Reading

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

                                                                                                                                                        switch (origin[0]) {
                                                                                                                                                            case 'top': y = 0; break;
                                                                                                                                                            case 'middle': y = 0.5; break;
                                                                                                                                                            case 'bottom': y = 1; break;
                                                                                                                                                            default: y = origin[0] / original.height;
                                                                                                                                                Severity: Major
                                                                                                                                                Found in assets/javascripts/jquery-ui.js and 1 other location - About 1 hr to fix
                                                                                                                                                assets/javascripts/jquery-ui.js on lines 2319..2324

                                                                                                                                                Duplicated Code

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

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

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

                                                                                                                                                Tuning

                                                                                                                                                This issue has a mass of 65.

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

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

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

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

                                                                                                                                                Refactorings

                                                                                                                                                Further Reading

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

                                                                                                                                                        if(!this.options.axis || this.options.axis != "y") this.helper[0].style.left = this.position.left+'px';
                                                                                                                                                Severity: Major
                                                                                                                                                Found in assets/javascripts/jquery-ui.js and 3 other locations - About 1 hr to fix
                                                                                                                                                assets/javascripts/jquery-ui.js on lines 746..746
                                                                                                                                                assets/javascripts/ui/ui.draggable.js on lines 128..128
                                                                                                                                                assets/javascripts/ui/ui.draggable.js on lines 129..129

                                                                                                                                                Duplicated Code

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

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

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

                                                                                                                                                Tuning

                                                                                                                                                This issue has a mass of 65.

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

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

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

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

                                                                                                                                                Refactorings

                                                                                                                                                Further Reading

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

                                                                                                                                                        switch (origin[1]) {
                                                                                                                                                            case 'left': x = 0; break;
                                                                                                                                                            case 'center': x = 0.5; break;
                                                                                                                                                            case 'right': x = 1; break;
                                                                                                                                                            default: x = origin[1] / original.width;
                                                                                                                                                Severity: Major
                                                                                                                                                Found in assets/javascripts/jquery-ui.js and 1 other location - About 1 hr to fix
                                                                                                                                                assets/javascripts/jquery-ui.js on lines 2313..2318

                                                                                                                                                Duplicated Code

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

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

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

                                                                                                                                                Tuning

                                                                                                                                                This issue has a mass of 65.

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

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

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

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

                                                                                                                                                Refactorings

                                                                                                                                                Further Reading

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

                                                                                                                                                            if(res) str.push((o.key || res[1]+'[]')+'='+(o.key && o.expression ? res[1] : res[2]));
                                                                                                                                                Severity: Major
                                                                                                                                                Found in assets/javascripts/jquery-ui.js and 1 other location - About 1 hr to fix
                                                                                                                                                assets/javascripts/ui/ui.sortable.js on lines 316..316

                                                                                                                                                Duplicated Code

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

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

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

                                                                                                                                                Tuning

                                                                                                                                                This issue has a mass of 65.

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

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

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

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

                                                                                                                                                Refactorings

                                                                                                                                                Further Reading

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

                                                                                                                                                                        Math.max(Math.min( parseInt((fx.pos * (fx.end[1] - fx.start[1])) + fx.start[1]), 255), 0),
                                                                                                                                                Severity: Major
                                                                                                                                                Found in assets/javascripts/jquery-ui.js and 2 other locations - About 1 hr to fix
                                                                                                                                                assets/javascripts/jquery-ui.js on lines 2474..2474
                                                                                                                                                assets/javascripts/jquery-ui.js on lines 2476..2476

                                                                                                                                                Duplicated Code

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

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

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

                                                                                                                                                Tuning

                                                                                                                                                This issue has a mass of 63.

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

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

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

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

                                                                                                                                                Refactorings

                                                                                                                                                Further Reading

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

                                                                                                                                                                        Math.max(Math.min( parseInt((fx.pos * (fx.end[0] - fx.start[0])) + fx.start[0]), 255), 0),
                                                                                                                                                Severity: Major
                                                                                                                                                Found in assets/javascripts/jquery-ui.js and 2 other locations - About 1 hr to fix
                                                                                                                                                assets/javascripts/jquery-ui.js on lines 2475..2475
                                                                                                                                                assets/javascripts/jquery-ui.js on lines 2476..2476

                                                                                                                                                Duplicated Code

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

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

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

                                                                                                                                                Tuning

                                                                                                                                                This issue has a mass of 63.

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

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

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

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

                                                                                                                                                Refactorings

                                                                                                                                                Further Reading

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

                                                                                                                                                                        Math.max(Math.min( parseInt((fx.pos * (fx.end[2] - fx.start[2])) + fx.start[2]), 255), 0)
                                                                                                                                                Severity: Major
                                                                                                                                                Found in assets/javascripts/jquery-ui.js and 2 other locations - About 1 hr to fix
                                                                                                                                                assets/javascripts/jquery-ui.js on lines 2474..2474
                                                                                                                                                assets/javascripts/jquery-ui.js on lines 2475..2475

                                                                                                                                                Duplicated Code

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

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

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

                                                                                                                                                Tuning

                                                                                                                                                This issue has a mass of 63.

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

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

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

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

                                                                                                                                                Refactorings

                                                                                                                                                Further Reading

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

                                                                                                                                                    var l = droppable.offset.left, r = l + droppable.proportions.width,
                                                                                                                                                        t = droppable.offset.top, b = t + droppable.proportions.height;
                                                                                                                                                Severity: Major
                                                                                                                                                Found in assets/javascripts/jquery-ui.js and 3 other locations - About 1 hr to fix
                                                                                                                                                assets/javascripts/jquery-ui.js on lines 944..945
                                                                                                                                                assets/javascripts/ui/ui.draggable.js on lines 623..624
                                                                                                                                                assets/javascripts/ui/ui.droppable.js on lines 159..160

                                                                                                                                                Duplicated Code

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

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

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

                                                                                                                                                Tuning

                                                                                                                                                This issue has a mass of 62.

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

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

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

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

                                                                                                                                                Refactorings

                                                                                                                                                Further Reading

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

                                                                                                                                                        var x1 = ui.absolutePosition.left, x2 = x1 + inst.helperProportions.width,
                                                                                                                                                            y1 = ui.absolutePosition.top, y2 = y1 + inst.helperProportions.height;
                                                                                                                                                Severity: Major
                                                                                                                                                Found in assets/javascripts/jquery-ui.js and 3 other locations - About 1 hr to fix
                                                                                                                                                assets/javascripts/jquery-ui.js on lines 1266..1267
                                                                                                                                                assets/javascripts/ui/ui.draggable.js on lines 623..624
                                                                                                                                                assets/javascripts/ui/ui.droppable.js on lines 159..160

                                                                                                                                                Duplicated Code

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

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

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

                                                                                                                                                Tuning

                                                                                                                                                This issue has a mass of 62.

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

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

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

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

                                                                                                                                                Refactorings

                                                                                                                                                Further Reading

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

                                                                                                                                                                        itemWithLeastDistance ? this.options.sortIndicator.call(this, e, itemWithLeastDistance, null, true) : this.options.sortIndicator.call(this, e, null, this.containers[i].element, true);
                                                                                                                                                Severity: Major
                                                                                                                                                Found in assets/javascripts/jquery-ui.js and 1 other location - About 1 hr to fix
                                                                                                                                                assets/javascripts/ui/ui.sortable.js on lines 610..610

                                                                                                                                                Duplicated Code

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

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

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

                                                                                                                                                Tuning

                                                                                                                                                This issue has a mass of 61.

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

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

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

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

                                                                                                                                                Refactorings

                                                                                                                                                Further Reading

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

                                                                                                                                                        this.offset.parent = {                                                                            //Store its position plus border
                                                                                                                                                            top: po.top + this.offsetParentBorders.top,
                                                                                                                                                            left: po.left + this.offsetParentBorders.left
                                                                                                                                                        };
                                                                                                                                                Severity: Major
                                                                                                                                                Found in assets/javascripts/jquery-ui.js and 1 other location - About 1 hr to fix
                                                                                                                                                assets/javascripts/jquery-ui.js on lines 1859..1862

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

                                                                                                                                                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

                                                                                                                                                        this.offset.click = {                                                                            //Where the click happened, relative to the element
                                                                                                                                                            left: e.pageX - this.offset.left,
                                                                                                                                                            top: e.pageY - this.offset.top
                                                                                                                                                        };
                                                                                                                                                Severity: Major
                                                                                                                                                Found in assets/javascripts/jquery-ui.js and 1 other location - About 1 hr to fix
                                                                                                                                                assets/javascripts/jquery-ui.js on lines 1872..1875

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

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

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

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

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

                                                                                                                                                Refactorings

                                                                                                                                                Further Reading

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

                                                                                                                                                    toggleClass: function(classNames,speed,easing,callback) {
                                                                                                                                                        return speed ? $.effects.animateClass.apply(this, [{ toggle: classNames },speed,easing,callback]) : this._toggleClass(classNames);
                                                                                                                                                    },
                                                                                                                                                Severity: Major
                                                                                                                                                Found in assets/javascripts/jquery-ui.js and 2 other locations - About 1 hr to fix
                                                                                                                                                assets/javascripts/jquery-ui.js on lines 2433..2435
                                                                                                                                                assets/javascripts/jquery-ui.js on lines 2436..2438

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

                                                                                                                                                    addClass: function(classNames,speed,easing,callback) {
                                                                                                                                                        return speed ? $.effects.animateClass.apply(this, [{ add: classNames },speed,easing,callback]) : this._addClass(classNames);
                                                                                                                                                    },
                                                                                                                                                Severity: Major
                                                                                                                                                Found in assets/javascripts/jquery-ui.js and 2 other locations - About 1 hr to fix
                                                                                                                                                assets/javascripts/jquery-ui.js on lines 2436..2438
                                                                                                                                                assets/javascripts/jquery-ui.js on lines 2439..2441

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

                                                                                                                                                    removeClass: function(classNames,speed,easing,callback) {
                                                                                                                                                        return speed ? $.effects.animateClass.apply(this, [{ remove: classNames },speed,easing,callback]) : this._removeClass(classNames);
                                                                                                                                                    },
                                                                                                                                                Severity: Major
                                                                                                                                                Found in assets/javascripts/jquery-ui.js and 2 other locations - About 1 hr to fix
                                                                                                                                                assets/javascripts/jquery-ui.js on lines 2433..2435
                                                                                                                                                assets/javascripts/jquery-ui.js on lines 2439..2441

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

                                                                                                                                                        if(i.overflowY[0] != document && i.overflowY[0].tagName != 'HTML') i.overflowYOffset = i.overflowY.offset();
                                                                                                                                                Severity: Major
                                                                                                                                                Found in assets/javascripts/jquery-ui.js and 5 other locations - About 1 hr to fix
                                                                                                                                                assets/javascripts/jquery-ui.js on lines 882..882
                                                                                                                                                assets/javascripts/jquery-ui.js on lines 883..883
                                                                                                                                                assets/javascripts/jquery-ui.js on lines 2234..2234
                                                                                                                                                assets/javascripts/ui/ui.draggable.js on lines 552..552
                                                                                                                                                assets/javascripts/ui/ui.sortable.js on lines 952..952

                                                                                                                                                Duplicated Code

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

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

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

                                                                                                                                                Tuning

                                                                                                                                                This issue has a mass of 58.

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

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

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

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

                                                                                                                                                Refactorings

                                                                                                                                                Further Reading

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

                                                                                                                                                        if(i.overflowX[0] != document && i.overflowX[0].tagName != 'HTML') i.overflowXOffset = i.overflowX.offset();
                                                                                                                                                Severity: Major
                                                                                                                                                Found in assets/javascripts/jquery-ui.js and 5 other locations - About 1 hr to fix
                                                                                                                                                assets/javascripts/jquery-ui.js on lines 882..882
                                                                                                                                                assets/javascripts/jquery-ui.js on lines 2233..2233
                                                                                                                                                assets/javascripts/jquery-ui.js on lines 2234..2234
                                                                                                                                                assets/javascripts/ui/ui.draggable.js on lines 552..552
                                                                                                                                                assets/javascripts/ui/ui.sortable.js on lines 952..952

                                                                                                                                                Duplicated Code

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

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

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

                                                                                                                                                Tuning

                                                                                                                                                This issue has a mass of 58.

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

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

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

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

                                                                                                                                                Refactorings

                                                                                                                                                Further Reading

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

                                                                                                                                                        return -(a*Math.pow(2,10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )) + b;
                                                                                                                                                Severity: Major
                                                                                                                                                Found in assets/javascripts/jquery-ui.js and 1 other location - About 1 hr to fix
                                                                                                                                                assets/javascripts/jquery-ui.js on lines 2721..2721

                                                                                                                                                Duplicated Code

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

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

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

                                                                                                                                                Tuning

                                                                                                                                                This issue has a mass of 58.

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

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

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

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

                                                                                                                                                Refactorings

                                                                                                                                                Further Reading

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

                                                                                                                                                        if (t < 1) return -.5*(a*Math.pow(2,10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )) + b;
                                                                                                                                                Severity: Major
                                                                                                                                                Found in assets/javascripts/jquery-ui.js and 1 other location - About 1 hr to fix
                                                                                                                                                assets/javascripts/jquery-ui.js on lines 2707..2707

                                                                                                                                                Duplicated Code

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

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

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

                                                                                                                                                Tuning

                                                                                                                                                This issue has a mass of 58.

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

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

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

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

                                                                                                                                                Refactorings

                                                                                                                                                Further Reading

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

                                                                                                                                                        if(i.overflowY[0] != document && i.overflowY[0].tagName != 'HTML') i.overflowYOffset = i.overflowY.offset();
                                                                                                                                                Severity: Major
                                                                                                                                                Found in assets/javascripts/jquery-ui.js and 5 other locations - About 1 hr to fix
                                                                                                                                                assets/javascripts/jquery-ui.js on lines 883..883
                                                                                                                                                assets/javascripts/jquery-ui.js on lines 2233..2233
                                                                                                                                                assets/javascripts/jquery-ui.js on lines 2234..2234
                                                                                                                                                assets/javascripts/ui/ui.draggable.js on lines 552..552
                                                                                                                                                assets/javascripts/ui/ui.sortable.js on lines 952..952

                                                                                                                                                Duplicated Code

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

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

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

                                                                                                                                                Tuning

                                                                                                                                                This issue has a mass of 58.

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

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

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

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

                                                                                                                                                Refactorings

                                                                                                                                                Further Reading

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

                                                                                                                                                        if(i.overflowX[0] != document && i.overflowX[0].tagName != 'HTML') i.overflowXOffset = i.overflowX.offset();
                                                                                                                                                Severity: Major
                                                                                                                                                Found in assets/javascripts/jquery-ui.js and 5 other locations - About 1 hr to fix
                                                                                                                                                assets/javascripts/jquery-ui.js on lines 882..882
                                                                                                                                                assets/javascripts/jquery-ui.js on lines 883..883
                                                                                                                                                assets/javascripts/jquery-ui.js on lines 2233..2233
                                                                                                                                                assets/javascripts/ui/ui.draggable.js on lines 552..552
                                                                                                                                                assets/javascripts/ui/ui.sortable.js on lines 952..952

                                                                                                                                                Duplicated Code

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

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

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

                                                                                                                                                Tuning

                                                                                                                                                This issue has a mass of 58.

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

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

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

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

                                                                                                                                                Refactorings

                                                                                                                                                Further Reading

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

                                                                                                                                                                            if(Math.abs(cur - base) < dist) {
                                                                                                                                                                                dist = Math.abs(cur - base); itemWithLeastDistance = this.items[j];
                                                                                                                                                                            }
                                                                                                                                                Severity: Major
                                                                                                                                                Found in assets/javascripts/jquery-ui.js and 1 other location - About 1 hr to fix
                                                                                                                                                assets/javascripts/ui/ui.sortable.js on lines 601..603

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

                                                                                                                                                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 ($.browser.msie) {
                                                                                                                                                            this._mouseUnselectable = this.element.attr('unselectable');
                                                                                                                                                            this.element.attr('unselectable', 'on');
                                                                                                                                                        }
                                                                                                                                                Severity: Major
                                                                                                                                                Found in assets/javascripts/jquery-ui.js and 1 other location - About 1 hr to fix
                                                                                                                                                assets/javascripts/ui/ui.core.js on lines 410..413

                                                                                                                                                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

                                                                                                                                                            PAGEX_INCLUDES_SCROLL: (this.cssPosition == "absolute" && (!this.scrollLeftParent[0].tagName || (/(html|body)/i).test(this.scrollLeftParent[0].tagName))),
                                                                                                                                                Severity: Major
                                                                                                                                                Found in assets/javascripts/jquery-ui.js and 1 other location - About 1 hr to fix
                                                                                                                                                assets/javascripts/jquery-ui.js on lines 588..588

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

                                                                                                                                                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(o.cursorAt.right != undefined) this.offset.click.left = this.helperProportions.width - o.cursorAt.right;
                                                                                                                                                Severity: Major
                                                                                                                                                Found in assets/javascripts/jquery-ui.js and 1 other location - About 1 hr to fix
                                                                                                                                                assets/javascripts/jquery-ui.js on lines 1909..1909

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

                                                                                                                                                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

                                                                                                                                                            PAGEY_INCLUDES_SCROLL: (this.cssPosition == "absolute" && (!this.scrollTopParent[0].tagName || (/(html|body)/i).test(this.scrollTopParent[0].tagName))),
                                                                                                                                                Severity: Major
                                                                                                                                                Found in assets/javascripts/jquery-ui.js and 1 other location - About 1 hr to fix
                                                                                                                                                assets/javascripts/jquery-ui.js on lines 589..589

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

                                                                                                                                                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(o.cursorAt.bottom != undefined) this.offset.click.top = this.helperProportions.height - o.cursorAt.bottom;
                                                                                                                                                Severity: Major
                                                                                                                                                Found in assets/javascripts/jquery-ui.js and 1 other location - About 1 hr to fix
                                                                                                                                                assets/javascripts/jquery-ui.js on lines 1907..1907

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

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

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

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

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

                                                                                                                                                Refactorings

                                                                                                                                                Further Reading

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

                                                                                                                                                    cacheHelperProportions: function() {
                                                                                                                                                        this.helperProportions = {
                                                                                                                                                            width: this.helper.outerWidth(),
                                                                                                                                                            height: this.helper.outerHeight()
                                                                                                                                                        };
                                                                                                                                                Severity: Major
                                                                                                                                                Found in assets/javascripts/jquery-ui.js and 2 other locations - About 55 mins to fix
                                                                                                                                                assets/javascripts/ui/ui.draggable.js on lines 228..233
                                                                                                                                                assets/javascripts/ui/ui.sortable.js on lines 694..699

                                                                                                                                                Duplicated Code

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

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

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

                                                                                                                                                Tuning

                                                                                                                                                This issue has a mass of 54.

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

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

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

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

                                                                                                                                                Refactorings

                                                                                                                                                Further Reading

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

                                                                                                                                                        if (!this.mouseDelayMet) {
                                                                                                                                                            this._mouseDelayTimer = setTimeout(function() {
                                                                                                                                                                self.mouseDelayMet = true;
                                                                                                                                                            }, this.options.delay);
                                                                                                                                                        }
                                                                                                                                                Severity: Minor
                                                                                                                                                Found in assets/javascripts/jquery-ui.js and 1 other location - About 55 mins to fix
                                                                                                                                                assets/javascripts/ui/ui.core.js on lines 442..446

                                                                                                                                                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

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

                                                                                                                                                            $(o.appendTo != 'parent' ? o.appendTo : this.currentItem[0].parentNode)[0].appendChild(helper[0]); //Add the helper to the DOM if that didn't happen already
                                                                                                                                                Severity: Minor
                                                                                                                                                Found in assets/javascripts/jquery-ui.js and 1 other location - About 50 mins to fix
                                                                                                                                                assets/javascripts/ui/ui.sortable.js on lines 638..638

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

                                                                                                                                                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

                                                                                                                                                        this.domPosition = { prev: this.currentItem.prev()[0], parent: this.currentItem.parent()[0] };  //Cache the former DOM position
                                                                                                                                                Severity: Minor
                                                                                                                                                Found in assets/javascripts/jquery-ui.js and 1 other location - About 50 mins to fix
                                                                                                                                                assets/javascripts/ui/ui.sortable.js on lines 136..136

                                                                                                                                                Duplicated Code

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

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

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

                                                                                                                                                Tuning

                                                                                                                                                This issue has a mass of 51.

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

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

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

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

                                                                                                                                                Refactorings

                                                                                                                                                Further Reading

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

                                                                                                                                                    uiHash: function(e) {
                                                                                                                                                        return {
                                                                                                                                                            helper: this.helper,
                                                                                                                                                            position: this.position,
                                                                                                                                                            absolutePosition: this.positionAbs,
                                                                                                                                                Severity: Minor
                                                                                                                                                Found in assets/javascripts/jquery-ui.js and 1 other location - About 50 mins to fix
                                                                                                                                                assets/javascripts/ui/ui.draggable.js on lines 348..355

                                                                                                                                                Duplicated Code

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

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

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

                                                                                                                                                Tuning

                                                                                                                                                This issue has a mass of 51.

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

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

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

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

                                                                                                                                                Refactorings

                                                                                                                                                Further Reading

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

                                                                                                                                                            return (l < ((draggable.positionAbs || draggable.position.absolute).left + (draggable.clickOffset || draggable.offset.click).left) && ((draggable.positionAbs || draggable.position.absolute).left + (draggable.clickOffset || draggable.offset.click).left) < r
                                                                                                                                                Severity: Minor
                                                                                                                                                Found in assets/javascripts/jquery-ui.js and 1 other location - About 45 mins to fix
                                                                                                                                                assets/javascripts/jquery-ui.js on lines 1281..1282

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

                                                                                                                                                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 ($.ui.ddmanager && !this.options.dropBehaviour)
                                                                                                                                                            var dropped = $.ui.ddmanager.drop(this, e);        
                                                                                                                                                Severity: Minor
                                                                                                                                                Found in assets/javascripts/jquery-ui.js and 1 other location - About 45 mins to fix
                                                                                                                                                assets/javascripts/ui/ui.draggable.js on lines 139..140

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

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

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

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

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

                                                                                                                                                Refactorings

                                                                                                                                                Further Reading

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

                                                                                                                                                        $(document)
                                                                                                                                                            .unbind('mousemove.'+this.widgetName, this._mouseMoveDelegate)
                                                                                                                                                            .unbind('mouseup.'+this.widgetName, this._mouseUpDelegate);
                                                                                                                                                Severity: Major
                                                                                                                                                Found in assets/javascripts/jquery-ui.js and 2 other locations - About 40 mins to fix
                                                                                                                                                assets/javascripts/jquery-ui.js on lines 380..382
                                                                                                                                                assets/javascripts/ui/ui.core.js on lines 495..497

                                                                                                                                                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

                                                                                                                                                                && t < ((draggable.positionAbs || draggable.position.absolute).top + (draggable.clickOffset || draggable.offset.click).top) && ((draggable.positionAbs || draggable.position.absolute).top + (draggable.clickOffset || draggable.offset.click).top) < b);
                                                                                                                                                Severity: Minor
                                                                                                                                                Found in assets/javascripts/jquery-ui.js and 1 other location - About 40 mins to fix
                                                                                                                                                assets/javascripts/jquery-ui.js on lines 1281..1281

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

                                                                                                                                                        $(document)
                                                                                                                                                            .bind('mousemove.'+this.widgetName, this._mouseMoveDelegate)
                                                                                                                                                            .bind('mouseup.'+this.widgetName, this._mouseUpDelegate);
                                                                                                                                                Severity: Major
                                                                                                                                                Found in assets/javascripts/jquery-ui.js and 2 other locations - About 40 mins to fix
                                                                                                                                                assets/javascripts/jquery-ui.js on lines 408..410
                                                                                                                                                assets/javascripts/ui/ui.core.js on lines 495..497

                                                                                                                                                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

                                                                                                                                                        if(!noPropagation) this.element.triggerHandler(n == "sort" ? n : "sort"+n, [e, this.ui(inst)], this.options[n]);
                                                                                                                                                Severity: Minor
                                                                                                                                                Found in assets/javascripts/jquery-ui.js and 1 other location - About 40 mins to fix
                                                                                                                                                assets/javascripts/ui/ui.sortable.js on lines 877..877

                                                                                                                                                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

                                                                                                                                                        if ($.ui.ddmanager && !this.options.dropBehaviour)
                                                                                                                                                            $.ui.ddmanager.drop(this, e);
                                                                                                                                                Severity: Minor
                                                                                                                                                Found in assets/javascripts/jquery-ui.js and 1 other location - About 40 mins to fix
                                                                                                                                                assets/javascripts/ui/ui.sortable.js on lines 243..244

                                                                                                                                                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

                                                                                                                                                                if(contains(this.containers[i].element[0], this.currentItem[0])) {
                                                                                                                                                                    this.containers[i]._propagate("update", e, this, noPropagation);
                                                                                                                                                                    this.containers[i]._propagate("receive", e, this, noPropagation);
                                                                                                                                                                }
                                                                                                                                                Severity: Minor
                                                                                                                                                Found in assets/javascripts/jquery-ui.js and 1 other location - About 40 mins to fix
                                                                                                                                                assets/javascripts/ui/ui.sortable.js on lines 835..838

                                                                                                                                                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

                                                                                                                                                            if(this.floating) {
                                                                                                                                                                if(x2 > l && x1 < l) return 2; //Crosses left edge
                                                                                                                                                                if(x1 < r && x2 > r) return 1; //Crosses right edge
                                                                                                                                                            } else {
                                                                                                                                                Severity: Minor
                                                                                                                                                Found in assets/javascripts/jquery-ui.js and 1 other location - About 35 mins to fix
                                                                                                                                                assets/javascripts/jquery-ui.js on lines 1565..1568

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

                                                                                                                                                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 {
                                                                                                                                                                if(y2 > t && y1 < t) return 1; //Crosses top edge
                                                                                                                                                                if(y1 < b && y2 > b) return 2; //Crosses bottom edge
                                                                                                                                                            }
                                                                                                                                                Severity: Minor
                                                                                                                                                Found in assets/javascripts/jquery-ui.js and 1 other location - About 35 mins to fix
                                                                                                                                                assets/javascripts/jquery-ui.js on lines 1562..1565

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

                                                                                                                                                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

                                                                                                                                                            this.offset.parent = { top: po.top + this.offsetParentBorders.top, left: po.left + this.offsetParentBorders.left };
                                                                                                                                                Severity: Minor
                                                                                                                                                Found in assets/javascripts/jquery-ui.js and 1 other location - About 30 mins to fix
                                                                                                                                                assets/javascripts/ui/ui.slider.js on lines 135..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 45.

                                                                                                                                                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