paneFont = UIManager.getFont("Tree.font"); if(paneFont == null) paneFont = jEdit.getFontProperty("metal.secondary.font"); groupFont = paneFont.deriveFont(Font.BOLD);
plainFont = UIManager.getFont("Tree.font"); if(plainFont == null) plainFont = jEdit.getFontProperty("metal.secondary.font"); boldFont = new Font(plainFont.getName(),Font.BOLD,plainFont.getSize());
Clone fragments detected by clone detection tool
File path: /jEdit-4.2/src/org/gjt/sp/jedit/gui/OptionsDialog.java File path: /jEdit-4.2/src/org/gjt/sp/jedit/browser/BrowserView.java
Method name: void PaneNameRenderer() Method name: void ParentDirectoryRenderer()
Number of AST nodes: 4 Number of AST nodes: 4
1
paneFont = UIManager.getFont("Tree.font");
1
plainFont = UIManager.getFont("Tree.font");
2
			if(paneFont == null)
2
			if(plainFont == null)
3
				paneFont = jEdit.getFontProperty("metal.secondary.font");
3
				plainFont = jEdit.getFontProperty("metal.secondary.font");
4
			groupFont = paneFont.deriveFont(Font.BOLD);
4
			boldFont = new Font(plainFont.getName(),Font.BOLD,plainFont.getSize());
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.1
Clones locationClones are in different classes having the same super class
Number of node comparisons7
  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)2.5
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    1
    paneFont = UIManager.getFont("Tree.font");
    1
    paneFont = UIManager.getFont("Tree.font");
    1
    plainFont = UIManager.getFont("Tree.font");
    Differences
    Expression1Expression2Difference
    paneFontplainFontVARIABLE_NAME_MISMATCH
    Preondition Violations
    Expression paneFont is a field being modified, and thus it cannot be parameterized
    Expression plainFont is a field being modified, and thus it cannot be parameterized
    1
    plainFont = UIManager.getFont("Tree.font");
    2
    if (paneFont == null)
    2
    if (paneFont == null)
    2
    if (plainFont == null)
    Differences
    Expression1Expression2Difference
    paneFontplainFontVARIABLE_NAME_MISMATCH
    Preondition Violations
    Expression paneFont cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression plainFont cannot be parameterized, because it has dependencies to/from statements that will be extracted
    2
    if (plainFont == null)
    3
    paneFont = jEdit.getFontProperty("metal.secondary.font");
    3
    paneFont = jEdit.getFontProperty("metal.secondary.font");
    3
    plainFont = jEdit.getFontProperty("metal.secondary.font");
    Differences
    Expression1Expression2Difference
    paneFontplainFontVARIABLE_NAME_MISMATCH
    Preondition Violations
    Expression paneFont is a field being modified, and thus it cannot be parameterized
    Expression plainFont is a field being modified, and thus it cannot be parameterized
    3
    plainFont = jEdit.getFontProperty("metal.secondary.font");
    4
    groupFont = paneFont.deriveFont(Font.BOLD);
    4
    groupFont = paneFont.deriveFont(Font.BOLD);
    4
    boldFont = new Font(plainFont.getName(), Font.BOLD, plainFont.getSize());
    Differences
    Expression1Expression2Difference
    groupFontboldFontVARIABLE_NAME_MISMATCH
    paneFont.deriveFont(Font.BOLD)new Font(plainFont.getName(),Font.BOLD,plainFont.getSize())TYPE_COMPATIBLE_REPLACEMENT
    Preondition Violations
    Expression paneFont.deriveFont(Font.BOLD) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression new Font(plainFont.getName(),Font.BOLD,plainFont.getSize()) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    4
    boldFont = new Font(plainFont.getName(), Font.BOLD, plainFont.getSize());
    Precondition Violations (9)
    Row Violation
    1Expression paneFont is a field being modified, and thus it cannot be parameterized
    2Expression plainFont is a field being modified, and thus it cannot be parameterized
    3Expression paneFont cannot be parameterized, because it has dependencies to/from statements that will be extracted
    4Expression plainFont cannot be parameterized, because it has dependencies to/from statements that will be extracted
    5Expression paneFont is a field being modified, and thus it cannot be parameterized
    6Expression plainFont is a field being modified, and thus it cannot be parameterized
    7Expression paneFont.deriveFont(Font.BOLD) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    8Expression new Font(plainFont.getName(),Font.BOLD,plainFont.getSize()) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    9The refactoring of the clones is infeasible, because classes org.gjt.sp.jedit.gui.OptionsDialog.PaneNameRenderer and org.gjt.sp.jedit.browser.BrowserView.ParentDirectoryRenderer do not have a common superclass