File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/control/GenericController.java | File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/protocol/jdbc/sampler/JDBCSampler.java | |||
Method name: void fireIterationStart()
|
Method name: void closeAllStatements(Collection)
|
|||
Number of AST nodes: 5 | Number of AST nodes: 4 | |||
1 | Iterator iter = iterationListeners.iterator();↵ | 1 | Iterator iter↵ | |
2 | LoopIterationEvent event = new LoopIterationEvent(this, getIterCount());↵ | 2 | ator = collection.iterator();↵ | |
3 | while (iter.hasNext()) {↵ | 3 | while (iterator.hasNext()) {↵ | |
4 | LoopIterationListener item = (LoopIterationListener) iter.next();↵ | 4 | PreparedStatement pstmt = (PreparedStatement) iterator.next();↵ | |
5 | item.iterationStart(event);↵ | 5 | close(pstmt);↵ | |
6 | } | 6 |
| |
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 having the same super class |
Number of node comparisons | 11 |
Number of mapped statements | 2 |
Number of unmapped statements in the first code fragment | 3 |
Number of unmapped statements in the second code fragment | 2 |
Time elapsed for statement mapping (ms) | 3.5 |
Clone type | Type 3 |
ID | Statement | ID | Statement | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | Iterator iter = iterationListeners.iterator(); |
| 1 | Iterator iterator = collection.iterator(); | |||||||||||||||||
2 | LoopIterationEvent event = new LoopIterationEvent(this, getIterCount()); | | |||||||||||||||||||
3 | while (iter.hasNext()) |
| 2 | while (iterator.hasNext()) | |||||||||||||||||
|
| 3 | PreparedStatement pstmt = (PreparedStatement)iterator.next(); | ||||||||||||||||||
| 4 | close(pstmt); | |||||||||||||||||||
4 | LoopIterationListener item = (LoopIterationListener)iter.next(); |
| | ||||||||||||||||||
5 | item.iterationStart(event); |
| |
Row | Violation |
---|---|
1 | Type java.util.LinkedList of variable iterationListeners does not match with type java.util.Collection of variable collection |
2 | Unmatched statement PreparedStatement pstmt=(PreparedStatement)iterator.next(); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
3 | Unmatched statement LoopIterationListener item=(LoopIterationListener)iter.next(); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
4 | Unmatched statement item.iterationStart(event); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |