File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/samplers/HoldSampleSender.java | File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/threads/TestCompiler.java | |||
Method name: void testEnded()
|
Method name: void configureWithConfigElements(Sampler, List)
|
|||
Number of AST nodes: 5 | Number of AST nodes: 4 | |||
1 | synchronized (sampleStore) {↵ | |||
2 | Iterator i = sampleStore.iterator();↵ | 1 | Iterator iter = configs.iterator();↵ | |
3 | while (i.hasNext()) {↵ | 2 | while (iter.hasNext()) {↵ | |
4 | SampleEvent se = (SampleEvent) i.next();↵ | 3 | ConfigTestElement config = (ConfigTestElement) iter.next();↵ | |
5 | listener.sampleOccurred(se);↵ | 4 | ↵ | |
6 | }↵ | |||
7 | ↵ | 5 | sam.addTestElement(config);↵ | |
8 | } | 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 |
Number of node comparisons | 10 |
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) | 9.3 |
Clone type | Type 2 |
ID | Statement | ID | Statement | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
4 | Iterator i = sampleStore.iterator(); |
| 1 | Iterator iter = configs.iterator(); | |||||||||||||
5 | while (i.hasNext()) |
| 2 | while (iter.hasNext()) | |||||||||||||
|
| 3 | ConfigTestElement config = (ConfigTestElement)iter.next(); | ||||||||||||||
| 4 | sam.addTestElement(config); | |||||||||||||||
6 | SampleEvent se = (SampleEvent)i.next(); |
| | ||||||||||||||
7 | listener.sampleOccurred(se); |
| |
Row | Violation |
---|---|
1 | Unmatched statement ConfigTestElement config=(ConfigTestElement)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 SampleEvent se=(SampleEvent)i.next(); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
3 | Unmatched statement listener.sampleOccurred(se); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
4 | Unmatched statement listener.sampleOccurred(se); 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 |
5 | The refactoring of the clones is infeasible, because classes org.apache.jmeter.samplers.HoldSampleSender and org.apache.jmeter.threads.TestCompiler do not have a common superclass |