log.debug("popupShouldSave"); if (ReportGuiPackage.getInstance().getReportPlanFile() == null) { if (JOptionPane.showConfirmDialog(ReportGuiPackage.getInstance().getMainFrame(), JMeterUtils .getResString("should_save"), JMeterUtils.getResString("warning"), JOptionPane.YES_NO_OPTION, JOptionPane.QUESTION_MESSAGE) == JOptionPane.YES_OPTION) { ReportActionRouter.getInstance().doActionNow(new ActionEvent(e.getSource(), e.getID(), ReportSave.SAVE)); } }
log.debug("popupShouldSave"); if (GuiPackage.getInstance().getTestPlanFile() == null) { 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)); } }
Clone fragments detected by clone detection tool
File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/report/gui/action/AbstractAction.java File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/gui/action/AbstractAction.java
Method name: void popupShouldSave(ActionEvent) Method name: void popupShouldSave(ActionEvent)
Number of AST nodes: 4 Number of AST nodes: 4
1
log.debug("popupShouldSave");
1
log.debug("popupShouldSave");
2
		if (ReportGuiPackage.getInstance().getReportPlanFile() == null) {
2
		if (GuiPackage.getInstance().getTestPlanFile() == null) {
3
			if (JOptionPane.showConfirmDialog(ReportGuiPackage.getInstance().getMainFrame(), 
3
			if (JOptionPane.showConfirmDialog(GuiPackage.getInstance().getMainFrame(), 
4
JMeterUtils
4
					JMeterUtils
5
					.getResString("should_save"), 
5
.getResString("should_save"),  //$NON-NLS-1$
6
JMeterUtils.getResString("warning"), 
6
					JMeterUtils.getResString("warning"),  //$NON-NLS-1$
7
JOptionPane.YES_NO_OPTION,
7
					JOptionPane.YES_NO_OPTION,
8
					JOptionPane.QUESTION_MESSAGE) == JOptionPane.YES_OPTION) {
8
					JOptionPane.QUESTION_MESSAGE) == JOptionPane.YES_OPTION) {
9
				ReportActionRouter.getInstance().doActionNow(new ActionEvent(e.getSource(), e.getID(), ReportSave.SAVE));
9
				ActionRouter.getInstance().doActionNow(new ActionEvent(e.getSource(), e.getID(),ActionNames.SAVE));
10
			}
10
			}
11
		}
11
		}
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.6
Clones locationClones are in different classes
Number of node comparisons6
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements4
    Number of unmapped statements in the first code fragment0
    Number of unmapped statements in the second code fragment0
    Time elapsed for statement mapping (ms)1.8
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    1
    log.debug("popupShouldSave");
    1
    log.debug("popupShouldSave");
    2
    if (ReportGuiPackage.getInstance().getReportPlanFile() == null)
    2
    if (ReportGuiPackage.getInstance().getReportPlanFile() == null)
    2
    if (GuiPackage.getInstance().getTestPlanFile() == null)
    Differences
    Expression1Expression2Difference
    getReportPlanFilegetTestPlanFileMETHOD_INVOCATION_NAME_MISMATCH
    org.apache.jmeter.gui.ReportGuiPackageorg.apache.jmeter.gui.GuiPackageVARIABLE_TYPE_MISMATCH
    org.apache.jmeter.gui.ReportGuiPackageorg.apache.jmeter.gui.GuiPackageVARIABLE_TYPE_MISMATCH
    Preondition Violations
    Type org.apache.jmeter.gui.ReportGuiPackage of variable ReportGuiPackage.getInstance() does not match with type org.apache.jmeter.gui.GuiPackage of variable GuiPackage.getInstance()
    • Make classes org.apache.jmeter.gui.ReportGuiPackage and org.apache.jmeter.gui.GuiPackage extend a common superclass
    Type org.apache.jmeter.gui.ReportGuiPackage of variable ReportGuiPackage does not match with type org.apache.jmeter.gui.GuiPackage of variable GuiPackage
    • Make classes org.apache.jmeter.gui.ReportGuiPackage and org.apache.jmeter.gui.GuiPackage extend a common superclass
    2
    if (GuiPackage.getInstance().getTestPlanFile() == null)
    3
    if (JOptionPane.showConfirmDialog(ReportGuiPackage.getInstance().getMainFrame(), JMeterUtils.getResString("should_save"), JMeterUtils.getResString("warning"), JOptionPane.YES_NO_OPTION, JOptionPane.QUESTION_MESSAGE) == JOptionPane.YES_OPTION)
    3
    if (JOptionPane.showConfirmDialog(ReportGuiPackage.getInstance().getMainFrame(), JMeterUtils.getResString("should_save"), JMeterUtils.getResString("warning"), JOptionPane.YES_NO_OPTION, JOptionPane.QUESTION_MESSAGE) == JOptionPane.YES_OPTION)
    3
    if (JOptionPane.showConfirmDialog(GuiPackage.getInstance().getMainFrame(), JMeterUtils.getResString("should_save"), JMeterUtils.getResString("warning"), JOptionPane.YES_NO_OPTION, JOptionPane.QUESTION_MESSAGE) == JOptionPane.YES_OPTION)
    Differences
    Expression1Expression2Difference
    org.apache.jmeter.gui.ReportGuiPackageorg.apache.jmeter.gui.GuiPackageVARIABLE_TYPE_MISMATCH
    org.apache.jmeter.gui.ReportGuiPackageorg.apache.jmeter.gui.GuiPackageVARIABLE_TYPE_MISMATCH
    Preondition Violations
    Type org.apache.jmeter.gui.ReportGuiPackage of variable ReportGuiPackage.getInstance() does not match with type org.apache.jmeter.gui.GuiPackage of variable GuiPackage.getInstance()
    • Make classes org.apache.jmeter.gui.ReportGuiPackage and org.apache.jmeter.gui.GuiPackage extend a common superclass
    Type org.apache.jmeter.gui.ReportGuiPackage of variable ReportGuiPackage does not match with type org.apache.jmeter.gui.GuiPackage of variable GuiPackage
    • Make classes org.apache.jmeter.gui.ReportGuiPackage and org.apache.jmeter.gui.GuiPackage extend a common superclass
    3
    if (JOptionPane.showConfirmDialog(GuiPackage.getInstance().getMainFrame(), JMeterUtils.getResString("should_save"), JMeterUtils.getResString("warning"), JOptionPane.YES_NO_OPTION, JOptionPane.QUESTION_MESSAGE) == JOptionPane.YES_OPTION)
    4
    ReportActionRouter.getInstance().doActionNow(new ActionEvent(e.getSource(), e.getID(), ReportSave.SAVE));
    4
    ReportActionRouter.getInstance().doActionNow(new ActionEvent(e.getSource(), e.getID(), ReportSave.SAVE));
    4
    ActionRouter.getInstance().doActionNow(new ActionEvent(e.getSource(), e.getID(), ActionNames.SAVE));
    Differences
    Expression1Expression2Difference
    org.apache.jmeter.report.gui.action.ReportSaveorg.apache.jmeter.gui.action.ActionNamesVARIABLE_TYPE_MISMATCH
    org.apache.jmeter.report.gui.action.ReportActionRouterorg.apache.jmeter.gui.action.ActionRouterVARIABLE_TYPE_MISMATCH
    org.apache.jmeter.report.gui.action.ReportActionRouterorg.apache.jmeter.gui.action.ActionRouterVARIABLE_TYPE_MISMATCH
    Preondition Violations
    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
    • Make classes org.apache.jmeter.report.gui.action.ReportSave and org.apache.jmeter.gui.action.ActionNames extend a common superclass
    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()
    • Make classes org.apache.jmeter.report.gui.action.ReportActionRouter and org.apache.jmeter.gui.action.ActionRouter extend a common superclass
    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
    • Make classes org.apache.jmeter.report.gui.action.ReportActionRouter and org.apache.jmeter.gui.action.ActionRouter extend a common superclass
    4
    ActionRouter.getInstance().doActionNow(new ActionEvent(e.getSource(), e.getID(), ActionNames.SAVE));
    Precondition Violations (7)
    Row Violation
    1Type org.apache.jmeter.gui.ReportGuiPackage of variable ReportGuiPackage.getInstance() does not match with type org.apache.jmeter.gui.GuiPackage of variable GuiPackage.getInstance()
    2Type org.apache.jmeter.gui.ReportGuiPackage of variable ReportGuiPackage does not match with type org.apache.jmeter.gui.GuiPackage of variable GuiPackage
    3Type org.apache.jmeter.gui.ReportGuiPackage of variable ReportGuiPackage.getInstance() does not match with type org.apache.jmeter.gui.GuiPackage of variable GuiPackage.getInstance()
    4Type org.apache.jmeter.gui.ReportGuiPackage of variable ReportGuiPackage does not match with type org.apache.jmeter.gui.GuiPackage of variable GuiPackage
    5Type org.apache.jmeter.report.gui.action.ReportSave of variable ReportSave does not match with type org.apache.jmeter.gui.action.ActionNames of variable ActionNames
    6Type 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()
    7Type org.apache.jmeter.report.gui.action.ReportActionRouter of variable ReportActionRouter does not match with type org.apache.jmeter.gui.action.ActionRouter of variable ActionRouter