file = new File(model.getItem(i)); item = new ShowRecentDirMenuItem(file.getName(),file.getPath()); item.setIcon(FileCellRenderer.dirIcon); add(item);
file = new File(((BufferHistory.Entry)recent.get(i)).path); item = new ShowRecentMenuItem(file.getName(),file.getPath()); item.setIcon(FileCellRenderer.fileIcon); add(item);
Clone fragments detected by clone detection tool
File path: /jEdit-4.2/jars/MacOS/macos/menu/ShowRecentDirMenu.java File path: /jEdit-4.2/jars/MacOS/macos/menu/ShowRecentMenu.java
Method name: void construct() Method name: void construct()
Number of AST nodes: 4 Number of AST nodes: 4
1
file = new File(model.getItem(i));
1
file = new File(((BufferHistory.Entry)recent.get(i)).path);
2
			item = new ShowRecentDirMenuItem(file.getName(),file.getPath());
2
			item = new ShowRecentMenuItem(file.getName(),file.getPath());
3
			item.setIcon(FileCellRenderer.dirIcon);
3
			item.setIcon(FileCellRenderer.fileIcon);
4
			add(item);
4
			add(item);
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.0
Clones locationClones are in different classes having the same super class
Number of node comparisons17
  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)0.0
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    11
    file = new File(model.getItem(i));
    11
    file = new File(model.getItem(i));
    14
    file = new File(((BufferHistory.Entry)recent.get(i)).path);
    Differences
    Expression1Expression2Difference
    model.getItem(i)((BufferHistory.Entry)recent.get(i)).pathTYPE_COMPATIBLE_REPLACEMENT
    14
    file = new File(((BufferHistory.Entry)recent.get(i)).path);
    12
    item = new ShowRecentDirMenuItem(file.getName(), file.getPath());
    12
    item = new ShowRecentDirMenuItem(file.getName(), file.getPath());
    15
    item = new ShowRecentMenuItem(file.getName(), file.getPath());
    Differences
    Expression1Expression2Difference
    macos.menu.ShowRecentDirMenu.ShowRecentDirMenuItemmacos.menu.ShowRecentMenu.ShowRecentMenuItemSUBCLASS_TYPE_MISMATCH
    Preondition Violations
    Expression new ShowRecentDirMenuItem(file.getName(),file.getPath()) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression new ShowRecentMenuItem(file.getName(),file.getPath()) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    15
    item = new ShowRecentMenuItem(file.getName(), file.getPath());
    13
    item.setIcon(FileCellRenderer.dirIcon);
    13
    item.setIcon(FileCellRenderer.dirIcon);
    16
    item.setIcon(FileCellRenderer.fileIcon);
    Differences
    Expression1Expression2Difference
    dirIconfileIconVARIABLE_NAME_MISMATCH
    16
    item.setIcon(FileCellRenderer.fileIcon);
    14
    add(item);
    17
    add(item);
    Precondition Violations (2)
    Row Violation
    1Expression new ShowRecentDirMenuItem(file.getName(),file.getPath()) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    2Expression new ShowRecentMenuItem(file.getName(),file.getPath()) cannot be parameterized, because it has dependencies to/from statements that will be extracted