Code Duplication    Length = 20-20 lines in 2 locations

js/jquery-ui.js 2 locations

@@ 14443-14462 (lines=20) @@
14440
14441
	},
14442
14443
	_adjustOffsetFromHelper: function(obj) {
14444
		if (typeof obj === "string") {
14445
			obj = obj.split(" ");
14446
		}
14447
		if ($.isArray(obj)) {
14448
			obj = {left: +obj[0], top: +obj[1] || 0};
14449
		}
14450
		if ("left" in obj) {
14451
			this.offset.click.left = obj.left + this.margins.left;
14452
		}
14453
		if ("right" in obj) {
14454
			this.offset.click.left = this.helperProportions.width - obj.right + this.margins.left;
14455
		}
14456
		if ("top" in obj) {
14457
			this.offset.click.top = obj.top + this.margins.top;
14458
		}
14459
		if ("bottom" in obj) {
14460
			this.offset.click.top = this.helperProportions.height - obj.bottom + this.margins.top;
14461
		}
14462
	},
14463
14464
	_getParentOffset: function() {
14465
@@ 6214-6233 (lines=20) @@
6211
		}
6212
	},
6213
6214
	_adjustOffsetFromHelper: function(obj) {
6215
		if (typeof obj === "string") {
6216
			obj = obj.split(" ");
6217
		}
6218
		if ($.isArray(obj)) {
6219
			obj = { left: +obj[0], top: +obj[1] || 0 };
6220
		}
6221
		if ("left" in obj) {
6222
			this.offset.click.left = obj.left + this.margins.left;
6223
		}
6224
		if ("right" in obj) {
6225
			this.offset.click.left = this.helperProportions.width - obj.right + this.margins.left;
6226
		}
6227
		if ("top" in obj) {
6228
			this.offset.click.top = obj.top + this.margins.top;
6229
		}
6230
		if ("bottom" in obj) {
6231
			this.offset.click.top = this.helperProportions.height - obj.bottom + this.margins.top;
6232
		}
6233
	},
6234
6235
	_isRootNode: function( element ) {
6236
		return ( /(html|body)/i ).test( element.tagName ) || element === this.document[ 0 ];