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/visualizers/MonitorPerformancePanel.java | |||
Method name: void notifyTestListenersOfEnd()
|
Method name: void addSample(MonitorModel)
|
|||
Number of AST nodes: 4 | Number of AST nodes: 4 | |||
1 | if (subNode.isEnabled()) {↵ | 1 | if (↵ | |
2 | TestElement testElement = subNode.getTestElemen↵ | 2 | node != null) {↵ | |
3 | t();↵ | 3 | Object usrobj = node.getUserObject();↵ | |
4 | if (testElement instanceof TestListener) {↵ | 4 | if (usrobj instanceof ↵ | |
5 | ((TestListener) testElement).testEnded(↵ | 5 | MonitorModel) {↵ | |
6 | );↵ | 6 | GRAPH.updateGui((MonitorModel) usrobj);↵ | |
7 | }↵ | 7 | }↵ | |
8 | } | 8 | } | |
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.2 |
Clones location | Clones are in different classes |
Number of node comparisons | 6 |
Number of mapped statements | 1 |
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) | 1.2 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
7 | TestElement testElement = subNode.getTestElement(); |
| | |||||||||||||||||||||
| 9 | Object usrobj = node.getUserObject(); | ||||||||||||||||||||||
8 | if (testElement instanceof TestListener) |
| 10 | if (usrobj instanceof MonitorModel) | ||||||||||||||||||||
9 | ((TestListener)testElement).testEnded(); |
| | |||||||||||||||||||||
|
| 11 | GRAPH.updateGui((MonitorModel)usrobj); |
Row | Violation |
---|---|
1 | Unmatched statement TestElement testElement=subNode.getTestElement(); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
2 | Type org.apache.jmeter.testelement.TestElement of variable testElement does not match with type java.lang.Object of variable usrobj |
3 | Expression testElement instanceof TestListener cannot be parameterized, because it has dependencies to/from statements that will be extracted |
4 | Expression usrobj instanceof MonitorModel cannot be parameterized, because it has dependencies to/from statements that will be extracted |
5 | Type org.apache.jmeter.testelement.TestListener does not match with type org.apache.jmeter.visualizers.MonitorModel |
6 | Unmatched statement ((TestListener)testElement).testEnded(); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted |
7 | Unmatched statement GRAPH.updateGui((MonitorModel)usrobj); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted |
8 | The refactoring of the clones is infeasible, because the number of macthed statements is equal to zero |