int response = JOptionPane.showConfirmDialog(GuiPackage.getInstance().getMainFrame(), JMeterUtils.getResString("save_overwrite_existing_file"), // $NON-NLS-1$ JMeterUtils.getResString("save?"), // $NON-NLS-1$ JOptionPane.YES_NO_OPTION, JOptionPane.QUESTION_MESSAGE); if (response == JOptionPane.CLOSED_OPTION || response == JOptionPane.NO_OPTION) { return ; // Do not save, user does not want to overwrite }
int response = JOptionPane.showConfirmDialog(GuiPackage.getInstance().getMainFrame(), JMeterUtils.getResString("save_overwrite_existing_file"), // $NON-NLS-1$ JMeterUtils.getResString("save?"), // $NON-NLS-1$ JOptionPane.YES_NO_OPTION, JOptionPane.QUESTION_MESSAGE); if (response == JOptionPane.CLOSED_OPTION || response == JOptionPane.NO_OPTION) { return ; // Do not save, user does not want to overwrite }
Clone fragments detected by clone detection tool
File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/gui/action/Save.java File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/gui/action/SaveGraphics.java
Method name: void doAction(ActionEvent) Method name: void saveImage(JComponent)
Number of AST nodes: 3 Number of AST nodes: 3
1
int response = JOptionPane.showConfirmDialog(GuiPackage.getInstance().getMainFrame(), 
1
int response = JOptionPane.showConfirmDialog(GuiPackage.getInstance().getMainFrame(), 
2
							JMeterUtils.getResString("save_overwrite_existing_file"), // $NON-NLS-1$
2
						JMeterUtils.getResString("save_overwrite_existing_file"), // $NON-NLS-1$
3
							JMeterUtils.getResString("save?"),  // $NON-NLS-1$
3
						JMeterUtils.getResString("save?"),  // $NON-NLS-1$
4
							JOptionPane.YES_NO_OPTION,
4
						JOptionPane.YES_NO_OPTION,
5
							JOptionPane.QUESTION_MESSAGE);
5
						JOptionPane.QUESTION_MESSAGE);
6
					if (response == JOptionPane.CLOSED_OPTION || response == JOptionPane.NO_OPTION) {
6
				if (response == JOptionPane.CLOSED_OPTION || response == JOptionPane.NO_OPTION) {
7
						return ; // Do not save, user does not want to overwrite
7
					return ; // Do not save, user does not want to overwrite
8
					}
8
				}
Summary
Number of common nesting structure subtrees1
Number of refactorable cases0
Number of non-refactorable cases1
Time elapsed for finding largest common nesting structure subtrees (ms)0.3
Clones locationClones are in different classes
Number of node comparisons6
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements3
    Number of unmapped statements in the first code fragment0
    Number of unmapped statements in the second code fragment0
    Time elapsed for statement mapping (ms)0.7
    Clone typeType 1
    Mapped Statements
    ID Statement ID Statement
    22
    int response = JOptionPane.showConfirmDialog(GuiPackage.getInstance().getMainFrame(), JMeterUtils.getResString("save_overwrite_existing_file"), JMeterUtils.getResString("save?"), JOptionPane.YES_NO_OPTION, JOptionPane.QUESTION_MESSAGE);
    9
    int response = JOptionPane.showConfirmDialog(GuiPackage.getInstance().getMainFrame(), JMeterUtils.getResString("save_overwrite_existing_file"), JMeterUtils.getResString("save?"), JOptionPane.YES_NO_OPTION, JOptionPane.QUESTION_MESSAGE);
    23
    if (response == JOptionPane.CLOSED_OPTION || response == JOptionPane.NO_OPTION)
    10
    if (response == JOptionPane.CLOSED_OPTION || response == JOptionPane.NO_OPTION)
    24
    return;
    24
    return;
    11
    return;
    Preondition Violations
    Conditional return;
    Conditional return;
    11
    return;
    Precondition Violations (2)
    Row Violation
    1Conditional return;
    2Conditional return;