File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/threads/JMeterThread.java | File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/threads/JMeterThread.java | |||
Method name: void delay(List)
|
Method name: void runPostProcessors(List)
|
|||
Number of AST nodes: 4 | Number of AST nodes: 4 | |||
1 | while (iter.hasNext()) {↵ | 1 | while (iter.hasNext()) {↵ | |
2 | Timer timer = (Timer) iter.next();↵ | 2 | PostProcessor ex = (PostProcessor) iter.next();↵ | |
3 | TestBeanHelper.prepare((TestElement) timer);↵ | 3 | TestBeanHelper.prepare((TestElement) ↵ | |
4 | sum += timer.delay();↵ | |||
5 | ↵ | 4 | ex);↵ | |
5 | ex.process();↵ | |||
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 declared in the same class |
Number of node comparisons | 16 |
Number of mapped statements | 2 |
Number of unmapped statements in the first code fragment | 2 |
Number of unmapped statements in the second code fragment | 2 |
Time elapsed for statement mapping (ms) | 6.9 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
3 | while (iter.hasNext()) |
| 9 | while (iter.hasNext()) | ||||||||||||||
4 | Timer timer = (Timer)iter.next(); |
| | |||||||||||||||
|
| 10 | PostProcessor ex = (PostProcessor)iter.next(); | |||||||||||||||
5 | TestBeanHelper.prepare((TestElement)timer); |
| 11 | TestBeanHelper.prepare((TestElement)ex); | ||||||||||||||
6 | sum += timer.delay(); |
| | |||||||||||||||
|
| 12 | ex.process(); |
Row | Violation |
---|---|
1 | Unmatched statement Timer timer=(Timer)iter.next(); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
2 | 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 |
3 | Type org.apache.jmeter.timers.Timer of variable timer does not match with type org.apache.jmeter.processor.PostProcessor of variable ex |
4 | Unmatched statement sum+=timer.delay(); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
5 | Unmatched statement ex.process(); 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 throws exception(s) that should be caught by a try block that will be extracted |