ListedHashTree newTree = new ListedHashTree(); cloneTree(newTree); return newTree;
LDAPArguments args = new LDAPArguments(); modifyTestElement(args); // TODO: Why do we clone the return value? This is the only reference // to it (right?) so we shouldn't need a separate copy. return (TestElement) args.clone();
Clone fragments detected by clone detection tool
File path: /jakarta-jmeter-2.3.2/src/org/apache/jorphan/collections/ListedHashTree.java File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/protocol/ldap/config/gui/LDAPArgumentsPanel.java
Method name: Object clone() Method name: TestElement createTestElement()
Number of AST nodes: 3 Number of AST nodes: 3
1
ListedHashTree newTree = new ListedHashTree();
1
L
2
		cloneTree(newTree);
3
		return newTree
2
DAPArguments args = new LDAPArguments();
3
		modifyTestElement(args);
4
		// TODO: Why do we clone the return value? This is the only reference
5
		// to it (right?) so we shouldn't need a separate copy.
4
;
6
		return (TestElement) args.clone();
Summary
Number of common nesting structure subtrees0
Number of refactorable cases0
Number of non-refactorable cases0
Time elapsed for finding largest common nesting structure subtrees (ms)0.0
Clones locationClones are in different classes
Number of node comparisons9