if (mf == null) // Probably caused by unit testing on headless system { log.warn("Mainframe is null"); } else { mf.setMainPanel((javax.swing.JComponent) getCurrentGui()); mf.setEditMenu(getTreeListener().getCurrentNode().createPopupMenu()); }
if (mf == null) // Probably caused by unit testing on headless system { log.warn("Mainframe is null"); } else { mf.setMainPanel((javax.swing.JComponent) getCurrentGui()); mf.setEditMenu(getTreeListener().getCurrentNode().createPopupMenu()); }
Clone fragments detected by clone detection tool
File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/gui/GuiPackage.java File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/gui/ReportGuiPackage.java
Method name: void localeChanged(LocaleChangeEvent) Method name: void localeChanged(LocaleChangeEvent)
Number of AST nodes: 4 Number of AST nodes: 4
1
if (mf == null) // Probably caused by unit testing on headless system
1
if (mf == null) // Probably caused by unit testing on headless system
2
		{
2
		{
3
			log.warn("Mainframe is null");
3
			log.warn("Mainframe is null");
4
		} else {
4
		} else {
5
			mf.setMainPanel((javax.swing.JComponent) getCurrentGui());
5
			mf.setMainPanel((javax.swing.JComponent) getCurrentGui());
6
			mf.setEditMenu(getTreeListener().getCurrentNode().createPopupMenu());
6
			mf.setEditMenu(getTreeListener().getCurrentNode().createPopupMenu());
7
		}
7
		}
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.2
Clones locationClones are in different classes
Number of node comparisons16
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements3
    Number of unmapped statements in the first code fragment1
    Number of unmapped statements in the second code fragment1
    Time elapsed for statement mapping (ms)27.5
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    7
    if (mf == null)
    7
    if (mf == null)
    7
    if (mf == null)
    Differences
    Expression1Expression2Difference
    org.apache.jmeter.gui.MainFrameorg.apache.jmeter.gui.ReportMainFrameSUBCLASS_TYPE_MISMATCH
    7
    if (mf == null)
    8
    log.warn("Mainframe is null");
    8
    log.warn("Mainframe is null");
    else
    else
    9
    mf.setMainPanel((javax.swing.JComponent)getCurrentGui());
    9
    mf.setMainPanel((javax.swing.JComponent)getCurrentGui());
    9
    mf.setMainPanel((javax.swing.JComponent)getCurrentGui());
    Differences
    Expression1Expression2Difference
    org.apache.jmeter.gui.MainFrameorg.apache.jmeter.gui.ReportMainFrameSUBCLASS_TYPE_MISMATCH
    Preondition Violations
    Expression mf cannot be unified with expression mf , because common superclass javax.swing.JFrame does not declare member(s) public void setMainPanel(javax.swing.JComponent)
    9
    mf.setMainPanel((javax.swing.JComponent)getCurrentGui());
                                                                                                                                                      
    10
    mf.setEditMenu(getTreeListener().getCurrentNode().createPopupMenu());
    10
    mf.setEditMenu(getTreeListener().getCurrentNode().createPopupMenu());
                                                                                                                                                      
    Precondition Violations (1)
    Row Violation
    1Expression mf cannot be unified with expression mf , because common superclass javax.swing.JFrame does not declare member(s) public void setMainPanel(javax.swing.JComponent)