HashTree tree = getTree(currentKey); data.remove(currentKey); data.put(newKey, tree); return order.set(order.indexOf(currentKey), newKey);
HashTree tree = getTree(currentKey); data.remove(currentKey); return data.put(newKey, tree);
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/jorphan/collections/HashTree.java
Method name: Object replace(Object, Object) Method name: Object replace(Object, Object)
Number of AST nodes: 4 Number of AST nodes: 3
1
HashTree tree = getTree(currentKey);
1
HashTree tree = getTree(currentKey);
2
		data.remove(currentKey);
2
		data.remove(currentKey);
3
		data.put(newKey, tree);
3
		return data.put(newKey, tree);
4
		return order.set(order.indexOf(currentKey), newKey);
Summary
Number of common nesting structure subtrees1
Number of refactorable cases1
Number of non-refactorable cases0
Time elapsed for finding largest common nesting structure subtrees (ms)0.0
Clones locationClones are in different classes having the same super class
Number of node comparisons12
  1. {Refactorable}
    Mapping Summary
    Number of mapped statements2
    Number of unmapped statements in the first code fragment2
    Number of unmapped statements in the second code fragment1
    Time elapsed for statement mapping (ms)0.0
    Clone typeType 3
    Mapped Statements
    ID Statement ID Statement
    1
    HashTree tree = getTree(currentKey);
    1
    HashTree tree = getTree(currentKey);
    2
    data.remove(currentKey);
    2
    data.remove(currentKey);
                                                                    
    3
    return data.put(newKey, tree);
    Preondition Violations
    Unmatched statement return data.put(newKey,tree); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
    Unmatched return data.put(newKey,tree);
    3
    return data.put(newKey, tree);
    3
    data.put(newKey, tree);
    3
    data.put(newKey, tree);
    Preondition Violations
    Unmatched statement data.put(newKey,tree); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
                                                      
    4
    return order.set(order.indexOf(currentKey), newKey);
    4
    return order.set(order.indexOf(currentKey), newKey);
    Preondition Violations
    Unmatched statement return order.set(order.indexOf(currentKey),newKey); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted
    Unmatched return order.set(order.indexOf(currentKey),newKey);
                                                                                                                
    Precondition Violations (5)
    Row Violation
    1Unmatched statement return data.put(newKey,tree); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
    2Unmatched return data.put(newKey,tree);
    3Unmatched statement data.put(newKey,tree); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
    4Unmatched statement return order.set(order.indexOf(currentKey),newKey); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted
    5Unmatched return order.set(order.indexOf(currentKey),newKey);