plainFont = UIManager.getFont("Tree.font"); if(plainFont == null) plainFont = jEdit.getFontProperty("metal.secondary.font"); boldFont = new Font(plainFont.getName(),Font.BOLD,plainFont.getSize());
entryFont = UIManager.getFont("Tree.font"); if(entryFont == null) entryFont = jEdit.getFontProperty("metal.secondary.font"); groupFont = entryFont.deriveFont(Font.BOLD);
Clone fragments detected by clone detection tool
File path: /jEdit-4.2/src/org/gjt/sp/jedit/browser/BrowserView.java File path: /jEdit-4.2/src/org/gjt/sp/jedit/gui/FilesChangedDialog.java
Method name: void ParentDirectoryRenderer() Method name: void Renderer()
Number of AST nodes: 4 Number of AST nodes: 4
1
plainFont = UIManager.getFont("Tree.font");
1
entryFont = UIManager.getFont("Tree.font");
2
			if(plainFont == null)
2
			if(entryFont == null)
3
				plainFont = jEdit.getFontProperty("metal.secondary.font");
3
				entryFont = jEdit.getFontProperty("metal.secondary.font");
4
			boldFont = new Font(plainFont.getName(),Font.BOLD,plainFont.getSize());
4
			groupFont = entryFont.deriveFont(Font.BOLD);
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)1.2
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    1
    plainFont = UIManager.getFont("Tree.font");
    1
    plainFont = UIManager.getFont("Tree.font");
    1
    entryFont = UIManager.getFont("Tree.font");
    Differences
    Expression1Expression2Difference
    plainFontentryFontVARIABLE_NAME_MISMATCH
    Preondition Violations
    Expression plainFont is a field being modified, and thus it cannot be parameterized
    Expression entryFont is a field being modified, and thus it cannot be parameterized
    1
    entryFont = UIManager.getFont("Tree.font");
    2
    if (plainFont == null)
    2
    if (plainFont == null)
    2
    if (entryFont == null)
    Differences
    Expression1Expression2Difference
    plainFontentryFontVARIABLE_NAME_MISMATCH
    Preondition Violations
    Expression plainFont cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression entryFont cannot be parameterized, because it has dependencies to/from statements that will be extracted
    2
    if (entryFont == null)
    3
    plainFont = jEdit.getFontProperty("metal.secondary.font");
    3
    plainFont = jEdit.getFontProperty("metal.secondary.font");
    3
    entryFont = jEdit.getFontProperty("metal.secondary.font");
    Differences
    Expression1Expression2Difference
    plainFontentryFontVARIABLE_NAME_MISMATCH
    Preondition Violations
    Expression plainFont is a field being modified, and thus it cannot be parameterized
    Expression entryFont is a field being modified, and thus it cannot be parameterized
    3
    entryFont = jEdit.getFontProperty("metal.secondary.font");
    4
    boldFont = new Font(plainFont.getName(), Font.BOLD, plainFont.getSize());
    4
    boldFont = new Font(plainFont.getName(), Font.BOLD, plainFont.getSize());
    4
    groupFont = entryFont.deriveFont(Font.BOLD);
    Differences
    Expression1Expression2Difference
    boldFontgroupFontVARIABLE_NAME_MISMATCH
    new Font(plainFont.getName(),Font.BOLD,plainFont.getSize())entryFont.deriveFont(Font.BOLD)TYPE_COMPATIBLE_REPLACEMENT
    Preondition Violations
    Expression boldFont is a field being modified, and thus it cannot be parameterized
    Expression groupFont is a field being modified, and thus it cannot be parameterized
    Expression new Font(plainFont.getName(),Font.BOLD,plainFont.getSize()) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression entryFont.deriveFont(Font.BOLD) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    4
    groupFont = entryFont.deriveFont(Font.BOLD);
    Precondition Violations (10)
    Row Violation
    1Expression plainFont is a field being modified, and thus it cannot be parameterized
    2Expression entryFont is a field being modified, and thus it cannot be parameterized
    3Expression plainFont cannot be parameterized, because it has dependencies to/from statements that will be extracted
    4Expression entryFont cannot be parameterized, because it has dependencies to/from statements that will be extracted
    5Expression plainFont is a field being modified, and thus it cannot be parameterized
    6Expression entryFont is a field being modified, and thus it cannot be parameterized
    7Expression boldFont is a field being modified, and thus it cannot be parameterized
    8Expression groupFont is a field being modified, and thus it cannot be parameterized
    9Expression new Font(plainFont.getName(),Font.BOLD,plainFont.getSize()) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    10Expression entryFont.deriveFont(Font.BOLD) cannot be parameterized, because it has dependencies to/from statements that will be extracted