if (JOptionPane.showConfirmDialog(GuiPackage.getInstance().getMainFrame(), JMeterUtils.getResString("should_save"), //$NON-NLS-1$ JMeterUtils.getResString("warning"), //$NON-NLS-1$ JOptionPane.YES_NO_OPTION, JOptionPane.QUESTION_MESSAGE) == JOptionPane.YES_OPTION) { ActionRouter.getInstance().doActionNow(new ActionEvent(e.getSource(), e.getID(),ActionNames.SAVE)); }
if (JOptionPane.showConfirmDialog(ReportGuiPackage.getInstance() .getMainFrame(), JMeterUtils .getResString("cancel_new_to_save"), JMeterUtils .getResString("Save?"), JOptionPane.YES_NO_OPTION, JOptionPane.QUESTION_MESSAGE) == JOptionPane.YES_OPTION) { ReportActionRouter.getInstance().doActionNow( new ActionEvent(e.getSource(), e.getID(), ActionNames.SAVE)); }
Clone fragments detected by clone detection tool
File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/gui/action/AbstractAction.java File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/report/gui/action/ReportClose.java
Method name: void popupShouldSave(ActionEvent) Method name: void doAction(ActionEvent)
Number of AST nodes: 2 Number of AST nodes: 2
1
if (JOptionPane.showConfirmDialog(GuiPackage.getInstance()
1
if (JOptionPane.showConfirmDialog(ReportGuiPackage.getInstance()
2
.getMainFrame(), 
2
					.getMainFrame(), 
3
					JMeterUtils
3
JMeterUtils
4
.getResString("should_save"),  //$NON-NLS-1$
4
					.getResString("
5
					JMeterUtils
5
cancel_new_to_save"), JMeterUtils
6
.getResString("warning"),  //$NON-NLS-1$
6
					.getResString("
7
					JOptionPane.YES_NO_OPTION,
7
Save?"), JOptionPane.YES_NO_OPTION,
8
					JOptionPane.QUESTION_MESSAGE) == JOptionPane.YES_OPTION) {
8
					JOptionPane.QUESTION_MESSAGE) == JOptionPane.YES_OPTION) {
9
				ActionRouter.getInstance().doActionNow(
9
				ReportActionRouter.getInstance().doActionNow(
10
new ActionEvent(e.getSource(), e.getID(),ActionNames.SAVE));
10
						new ActionEvent(e.getSource(), e.getID(), ActionNames.SAVE));
11
			}
11
			}
Summary
Number of common nesting structure subtrees0
Number of refactorable cases0
Number of non-refactorable cases0
Time elapsed for finding largest common nesting structure subtrees (ms)0.6
Clones locationClones are in different classes
Number of node comparisons1