Previous CloneSet | Next CloneSet | Back to Main Report |
Clone Mass | Clones in CloneSet | Parameter Count | Clone Similarity | Syntax Category [Sequence Length] |
---|---|---|---|---|
19 | 2 | 3 | 0.955 | ExpressionStatement |
Clone Abstraction | Parameter Bindings |
Clone Instance (Click to see clone) | Line Count | Source Line | Source File |
---|---|---|---|
1 | 19 | 532 | Closure/closure/goog/structs/avltree.js |
2 | 19 | 560 | Closure/closure/goog/structs/avltree.js |
| ||||
/** * Performs a left tree rotation on the specified node. * * @param {goog.structs.AvlTree.Node} node Pivot node to rotate from. * @private */ goog.structs.AvlTree.prototype.leftRotate_= function (node){ // Re-assign parent-child references for the parent of the node being removed if (node.isLeftChild( )){ node.parent.left= node.right; node.right.parent= node.parent; } else if (node.isRightChild( )){ node.parent.right= node.right; node.right.parent= node.parent; } else { this.root_= node.right; this.root_.parent= null; } // Re-assign parent-child references for the child of the node being removed var temp= node.right; node.right= node.right.left; if (node.right!= null) node.right.parent= node; temp.left= node; node.parent= temp; } ; |
| ||||
/** * Performs a right tree rotation on the specified node. * * @param {goog.structs.AvlTree.Node} node Pivot node to rotate from. * @private */ goog.structs.AvlTree.prototype.rightRotate_= function (node){ // Re-assign parent-child references for the parent of the node being removed if (node.isLeftChild( )){ node.parent.left= node.left; node.left.parent= node.parent; } else if (node.isRightChild( )) { node.parent.right= node.left; node.left.parent= node.parent; } else { this.root_= node.left; this.root_.parent= null; } // Re-assign parent-child references for the child of the node being removed var temp= node.left; node.left= node.left.right; if (node.left!= null) node.left.parent= node; temp.right= node; node.parent= temp; } ; |
| |||
/** * Performs a right tree rotation on the specified node. * * @param {goog.structs.AvlTree.Node} node Pivot node to rotate from. * @private */ /** * Performs a left tree rotation on the specified node. * * @param {goog.structs.AvlTree.Node} node Pivot node to rotate from. * @private */ goog.structs.AvlTree.prototype. [[#variable57499b40]]= function (node) { // Re-assign parent-child references for the parent of the node being removed if (node.isLeftChild( )) { node.parent.left=node. [[#variable57498020]]; node. [[#variable57498020]].parent=node.parent; } else if (node.isRightChild( )) { node.parent.right=node. [[#variable57498020]]; node. [[#variable57498020]].parent=node.parent; } else { this.root_=node. [[#variable57498020]]; this.root_.parent=null; } // Re-assign parent-child references for the child of the node being removed var temp=node. [[#variable57498020]]; node. [[#variable57498020]]=node. [[#variable57498020]]. [[#variable57499b00]]; if (node. [[#variable57498020]]!=null) node. [[#variable57498020]].parent=node; temp. [[#variable57499b00]]=node; node.parent=temp; } ; |
CloneAbstraction |
Parameter Index | Clone Instance | Parameter Name | Value |
---|---|---|---|
1 | 1 | [[#57499b40]] | rightRotate_ |
1 | 2 | [[#57499b40]] | leftRotate_ |
2 | 1 | [[#57498020]] | left |
2 | 2 | [[#57498020]] | right |
3 | 1 | [[#57499b00]] | right |
3 | 2 | [[#57499b00]] | left |