File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/gui/action/Clear.java | File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/protocol/http/proxy/ProxyControl.java | |||
Method name: void doAction(ActionEvent)
|
Method name: void notifyTestListenersOfStart()
|
|||
Number of AST nodes: 3 | Number of AST nodes: 4 | |||
1 | JMeterGUIComponent guiComp = guiPackage.getCurrentGui↵ | 1 | if (subNode.isEnabled()) {↵ | |
2 | ();↵ | 2 | TestElement testElement = subNode.getTestElement();↵ | |
3 | if (guiComp instanceof Clearable){↵ | 3 | if (testElement instanceof TestListener) {↵ | |
4 | ((Clearable) guiComp).clearData();↵ | 4 | ((TestListener) testElement).testStarted();↵ | |
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.4 |
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 | |||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
4 | JMeterGUIComponent guiComp = guiPackage.getCurrentGui(); |
| | |||||||||||||||||||||
|
| 7 | TestElement testElement = subNode.getTestElement(); | |||||||||||||||||||||
5 | if (guiComp instanceof Clearable) |
| 8 | if (testElement instanceof TestListener) | ||||||||||||||||||||
6 | ((Clearable)guiComp).clearData(); |
| | |||||||||||||||||||||
|
| 9 | ((TestListener)testElement).testStarted(); |
Row | Violation |
---|---|
1 | Unmatched statement JMeterGUIComponent guiComp=guiPackage.getCurrentGui(); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted |
2 | 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 |
3 | Type org.apache.jmeter.gui.JMeterGUIComponent of variable guiComp does not match with type org.apache.jmeter.testelement.TestElement of variable testElement |
4 | Expression guiComp instanceof Clearable cannot be parameterized, because it has dependencies to/from statements that will be extracted |
5 | Expression testElement instanceof TestListener cannot be parameterized, because it has dependencies to/from statements that will be extracted |
6 | Type org.apache.jmeter.samplers.Clearable does not match with type org.apache.jmeter.testelement.TestListener |
7 | Unmatched statement ((Clearable)guiComp).clearData(); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted |
8 | Unmatched statement ((TestListener)testElement).testStarted(); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted |
9 | The refactoring of the clones is infeasible, because the number of macthed statements is equal to zero |