File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/gui/action/Start.java | File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/report/gui/action/ReportStart.java | |||
Method name: void doAction(ActionEvent)
|
Method name: void doAction(ActionEvent)
|
|||
Number of AST nodes: 5 | Number of AST nodes: 4 | |||
1 | if (e.getActionCommand().equals(ActionNames.ACTION_SHUTDOWN)) {↵ | |||
2 | if (engine != null) {↵ | 1 | if (engine != null) {↵ | |
3 | GuiPackage.getInstance().getMainFrame().showStoppingMessage("");↵ | 2 | ReportGuiPackage.getInstance().getMainFrame().showStoppingMessage("");↵ | |
4 | engine.askThreadsToStop();↵ | 3 | engine.stopTest();↵ | |
5 | engine = null;↵ | 4 | engine = null;↵ | |
6 | }↵ | 5 |
| |
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.3 |
Clones location | Clones are in different classes |
Number of node comparisons | 17 |
Number of mapped statements | 4 |
Number of unmapped statements in the first code fragment | 0 |
Number of unmapped statements in the second code fragment | 0 |
Time elapsed for statement mapping (ms) | 77.5 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
10 | if (engine != null) | 5 | if (engine != null) | |||||||||||||||
11 | GuiPackage.getInstance().getMainFrame().showStoppingMessage(""); |
| 6 | ReportGuiPackage.getInstance().getMainFrame().showStoppingMessage(""); | ||||||||||||||
12 | engine.askThreadsToStop(); |
| 7 | engine.stopTest(); | ||||||||||||||
13 | engine = null; | 8 | engine = null; |
Row | Violation |
---|---|
1 | Expression GuiPackage cannot be unified with expression ReportGuiPackage , because common superclass org.apache.jmeter.util.LocaleChangeListener does not declare member(s) public static org.apache.jmeter.gui.GuiPackage getInstance() , public static org.apache.jmeter.gui.ReportGuiPackage getInstance() , public org.apache.jmeter.gui.MainFrame getMainFrame() , public org.apache.jmeter.gui.ReportMainFrame getMainFrame() |
2 | Expression engine.askThreadsToStop() cannot be parameterized, because it has dependencies to/from statements that will be extracted |
3 | Expression engine.stopTest() cannot be parameterized, because it has dependencies to/from statements that will be extracted |
4 | Expression engine.askThreadsToStop() is a void method call, and thus it cannot be parameterized |
5 | Expression engine.stopTest() is a void method call, and thus it cannot be parameterized |
6 | The refactoring of the clones is infeasible, because classes org.apache.jmeter.gui.action.Start and org.apache.jmeter.report.gui.action.ReportStart do not have a common superclass |