File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/protocol/http/proxy/ProxyControl.java | File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/protocol/http/proxy/ProxyControl.java | |||
Method name: void notifyTestListenersOfEnd()
|
Method name: void notifySampleListeners(SampleEvent)
|
|||
Number of AST nodes: 4 | Number of AST nodes: 4 | |||
1 | if (subNode.isEnabled()) {↵ | 1 | if (subNode.isEnabled()) {↵ | |
2 | TestElement testElement = subNode.getTestElement();↵ | 2 | TestElement testElement = subNode.getTestElement();↵ | |
3 | if (testElement instanceof TestListener) {↵ | 3 | if (testElement instanceof SampleListener) {↵ | |
4 | ((TestListener) testElement).testEnded();↵ | 4 | ((SampleListener) testElement).sampleOccurred(event);↵ | |
5 | }↵ | 5 | }↵ | |
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.3 |
Clones location | Clones are declared in the same class |
Number of node comparisons | 9 |
Number of mapped statements | 3 |
Number of unmapped statements in the first code fragment | 1 |
Number of unmapped statements in the second code fragment | 1 |
Time elapsed for statement mapping (ms) | 1.6 |
Clone type | Type 2 |
ID | Statement | ID | Statement | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
6 | if (subNode.isEnabled()) | 6 | if (subNode.isEnabled()) | ||||||||||||||
7 | TestElement testElement = subNode.getTestElement(); | 7 | TestElement testElement = subNode.getTestElement(); | ||||||||||||||
8 | if (testElement instanceof TestListener) |
| 8 | if (testElement instanceof SampleListener) | |||||||||||||
|
| 9 | ((SampleListener)testElement).sampleOccurred(event); | ||||||||||||||
9 | ((TestListener)testElement).testEnded(); |
| |
Row | Violation |
---|---|
1 | Expression testElement instanceof TestListener cannot be parameterized, because it has dependencies to/from statements that will be extracted |
2 | Expression testElement instanceof SampleListener cannot be parameterized, because it has dependencies to/from statements that will be extracted |
3 | Type org.apache.jmeter.testelement.TestListener does not match with type org.apache.jmeter.samplers.SampleListener |
4 | Unmatched statement ((SampleListener)testElement).sampleOccurred(event); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
5 | Unmatched statement ((TestListener)testElement).testEnded(); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |