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/threads/JMeterThread.java | |||
Method name: void ListedHashTree(Collection)
|
Method name: void runPostProcessors(List)
|
|||
Number of AST nodes: 4 | Number of AST nodes: 4 | |||
1 | while (it.hasNext()) {↵ | 1 | while (iter.hasNext()) {↵ | |
2 | Object temp = it.next();↵ | |||
3 | data.put(temp, new ListedHashTree());↵ | |||
4 | order.add(temp);↵ | |||
5 | ↵ | 2 | PostProcessor ex = (PostProcessor) iter.next();↵ | |
3 | TestBeanHelper.prepare((TestElement) ex);↵ | |||
4 | ex.process();↵ | |||
6 | } | 5 | } | |
See real code fragment | See real code fragment |
Number of common nesting structure subtrees | 1 |
Number of refactorable cases | 0 |
Number of non-refactorable cases | 1 |
Time elapsed for finding largest common nesting structure subtrees (ms) | 0.1 |
Clones location | Clones are in different classes |
Number of node comparisons | 16 |
Number of mapped statements | 1 |
Number of unmapped statements in the first code fragment | 3 |
Number of unmapped statements in the second code fragment | 3 |
Time elapsed for statement mapping (ms) | 0.7 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
4 | while (it.hasNext()) |
| 9 | while (iter.hasNext()) | ||||||||||||||
5 | Object temp = it.next(); |
| | |||||||||||||||
6 | data.put(temp, new ListedHashTree()); |
| | |||||||||||||||
7 | order.add(temp); |
| | |||||||||||||||
|
| 10 | PostProcessor ex = (PostProcessor)iter.next(); | |||||||||||||||
| 11 | TestBeanHelper.prepare((TestElement)ex); | ||||||||||||||||
|
| 12 | ex.process(); |
Row | Violation |
---|---|
1 | Type java.util.Iterator of variable it does not match with type java.util.ListIterator of variable iter |
2 | Unmatched statement Object temp=it.next(); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
3 | Unmatched statement data.put(temp,new ListedHashTree()); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
4 | Unmatched statement order.add(temp); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
5 | Unmatched statement PostProcessor ex=(PostProcessor)iter.next(); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
6 | Unmatched statement ex.process(); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |