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.has↵ | |
2 | Timer timer = (Timer) iter.next↵ | 2 | Previous()) {↵ | |
3 | ();↵ | 3 | PostProcessor ex = (PostProcessor) iter.previous();↵ | |
4 | TestBeanHelper.prepare((TestElement) timer);↵ | 4 | TestBeanHelper.prepare((TestElement) ↵ | |
5 | sum += timer.delay↵ | 5 | ex);↵ | |
6 | ();↵ | 6 | ex.process();↵ | |
7 | } | 7 | } | |
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) | 343.3 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
3 | while (iter.hasNext()) |
| 4 | while (iter.hasPrevious()) | ||||||||||||||||
4 | Timer timer = (Timer)iter.next(); |
| | |||||||||||||||||
|
| 5 | PostProcessor ex = (PostProcessor)iter.previous(); | |||||||||||||||||
5 | TestBeanHelper.prepare((TestElement)timer); |
| 6 | TestBeanHelper.prepare((TestElement)ex); | ||||||||||||||||
6 | sum += timer.delay(); |
| | |||||||||||||||||
|
| 7 | ex.process(); |
Row | Violation |
---|---|
1 | Expression iter.hasNext() cannot be parameterized, because it has dependencies to/from statements that will be extracted |
2 | Expression iter.hasPrevious() cannot be parameterized, because it has dependencies to/from statements that will be extracted |
3 | Expression iter cannot be unified with expression iter , because common superclass java.util.Iterator does not declare member(s) public abstract boolean hasPrevious() |
4 | 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 |
5 | Unmatched statement PostProcessor ex=(PostProcessor)iter.previous(); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
6 | Type org.apache.jmeter.timers.Timer of variable timer does not match with type org.apache.jmeter.processor.PostProcessor of variable ex |
7 | 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 |
8 | Unmatched statement ex.process(); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
9 | 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 |