File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/gui/action/ExitCommand.java | File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/report/gui/action/ReportExitCommand.java | |||
Method name: void doAction(ActionEvent)
|
Method name: void doAction(ActionEvent)
|
|||
Number of AST nodes: 9 | Number of AST nodes: 9 | |||
1 | if (GuiPackage.getInstance().isDirty()) {↵ | 1 | if (ReportGuiPackage.getInstance().isDirty()) {↵ | |
2 | int chosenOption = JOptionPane.showConfirmDialog(GuiPackage↵ | 2 | int chosenOption = JOptionPane.showConfirmDialog(ReportGuiPackage↵ | |
3 | .getInstance().getMainFrame(), JMeterUtils↵ | 3 | .getInstance().getMainFrame(), JMeterUtils↵ | |
4 | .getResString("cancel_exit_to_save"), // $NON-NLS-1$↵ | 4 | .getResString("cancel_exit_to_save"), ↵ | |
5 | JMeterUtils↵ | 5 | JMeterUtils↵ | |
6 | .getResString("save?"), // $NON-NLS-1$↵ | 6 | .getResString("Save?"), ↵ | |
7 | JOptionPane.YES_NO_CANCEL_OPTION, ↵ | 7 | JOptionPane.YES_NO_CANCEL_OPTION,↵ | |
8 | JOptionPane.QUESTION_MESSAGE);↵ | 8 | JOptionPane.QUESTION_MESSAGE);↵ | |
9 | if (chosenOption == JOptionPane.NO_OPTION) {↵ | 9 | if (chosenOption == JOptionPane.NO_OPTION) {↵ | |
10 | System.exit(0);↵ | 10 | System.exit(0);↵ | |
11 | } else if (chosenOption == JOptionPane.YES_OPTION) {↵ | 11 | } else if (chosenOption == JOptionPane.YES_OPTION) {↵ | |
12 | ActionRouter.getInstance().doActionNow(↵ | 12 | ReportActionRouter.getInstance().doActionNow(↵ | |
13 | new ActionEvent(e.getSource(), e.getID(), ActionNames↵ | 13 | new ActionEvent(e.getSource(), e.getID(),↵ | |
14 | .SAVE_ALL_AS));↵ | 14 | ReportSave.SAVE_ALL_AS));↵ | |
15 | if (!GuiPackage.getInstance().isDirty()) {↵ | 15 | if (!ReportGuiPackage.getInstance().isDirty()) {↵ | |
16 | System.exit(0);↵ | 16 | System.exit(0);↵ | |
17 | }↵ | 17 | }↵ | |
18 | }↵ | 18 | }↵ | |
19 | } else {↵ | 19 | } else {↵ | |
20 | System.exit(0);↵ | 20 | System.exit(0);↵ | |
21 | } | 21 |
| |
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.5 |
Clones location | Clones are in different classes |
Number of node comparisons | 21 |
Number of mapped statements | 8 |
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) | 4.7 |
Clone type | Type 2 |
ID | Statement | ID | Statement | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
2 | if (GuiPackage.getInstance().isDirty()) |
| 2 | if (ReportGuiPackage.getInstance().isDirty()) | |||||||||||||||||||
| 3 | int chosenOption = JOptionPane.showConfirmDialog(ReportGuiPackage.getInstance().getMainFrame(), JMeterUtils.getResString("cancel_exit_to_save"), JMeterUtils.getResString("Save?"), JOptionPane.YES_NO_CANCEL_OPTION, JOptionPane.QUESTION_MESSAGE); | |||||||||||||||||||||
3 | int chosenOption = JOptionPane.showConfirmDialog(GuiPackage.getInstance().getMainFrame(), JMeterUtils.getResString("cancel_exit_to_save"), JMeterUtils.getResString("save?"), JOptionPane.YES_NO_CANCEL_OPTION, JOptionPane.QUESTION_MESSAGE); | | |||||||||||||||||||||
4 | if (chosenOption == JOptionPane.NO_OPTION) | 4 | if (chosenOption == JOptionPane.NO_OPTION) | ||||||||||||||||||||
5 | System.exit(0); | 5 | System.exit(0); | ||||||||||||||||||||
6 | else if (chosenOption == JOptionPane.YES_OPTION) | 6 | else if (chosenOption == JOptionPane.YES_OPTION) | ||||||||||||||||||||
7 | ActionRouter.getInstance().doActionNow(new ActionEvent(e.getSource(), e.getID(), ActionNames.SAVE_ALL_AS)); |
| 7 | ReportActionRouter.getInstance().doActionNow(new ActionEvent(e.getSource(), e.getID(), ReportSave.SAVE_ALL_AS)); | |||||||||||||||||||
8 | if (!GuiPackage.getInstance().isDirty()) |
| 8 | if (!ReportGuiPackage.getInstance().isDirty()) | |||||||||||||||||||
9 | System.exit(0); | 9 | System.exit(0); | ||||||||||||||||||||
else | else | ||||||||||||||||||||||
10 | System.exit(0); | 10 | System.exit(0); |
Row | Violation |
---|---|
1 | Type org.apache.jmeter.gui.GuiPackage of variable GuiPackage.getInstance() does not match with type org.apache.jmeter.gui.ReportGuiPackage of variable ReportGuiPackage.getInstance() |
2 | Type org.apache.jmeter.gui.GuiPackage of variable GuiPackage does not match with type org.apache.jmeter.gui.ReportGuiPackage of variable ReportGuiPackage |
3 | Type org.apache.jmeter.gui.action.ActionNames of variable ActionNames does not match with type org.apache.jmeter.report.gui.action.ReportSave of variable ReportSave |
4 | Type org.apache.jmeter.gui.action.ActionRouter of variable ActionRouter.getInstance() does not match with type org.apache.jmeter.report.gui.action.ReportActionRouter of variable ReportActionRouter.getInstance() |
5 | Type org.apache.jmeter.gui.action.ActionRouter of variable ActionRouter does not match with type org.apache.jmeter.report.gui.action.ReportActionRouter of variable ReportActionRouter |
6 | Type org.apache.jmeter.gui.GuiPackage of variable GuiPackage.getInstance() does not match with type org.apache.jmeter.gui.ReportGuiPackage of variable ReportGuiPackage.getInstance() |
7 | Type org.apache.jmeter.gui.GuiPackage of variable GuiPackage does not match with type org.apache.jmeter.gui.ReportGuiPackage of variable ReportGuiPackage |