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