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); | |||
See real code fragment | See real code fragment |
Number of common nesting structure subtrees | 1 |
Number of refactorable cases | 1 |
Number of non-refactorable cases | 0 |
Time elapsed for finding largest common nesting structure subtrees (ms) | 0.0 |
Clones location | Clones are in different classes having the same super class |
Number of node comparisons | 12 |
Number of mapped statements | 2 |
Number of unmapped statements in the first code fragment | 2 |
Number of unmapped statements in the second code fragment | 1 |
Time elapsed for statement mapping (ms) | 0.0 |
Clone type | Type 3 |
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); | |||||
3 | data.put(newKey, tree); |
| | |||||
4 | return order.set(order.indexOf(currentKey), newKey); |
| |
Row | Violation |
---|---|
1 | 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 |
2 | Unmatched return data.put(newKey,tree); |
3 | 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 | 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 |
5 | Unmatched return order.set(order.indexOf(currentKey),newKey); |