file = new File(model.getItem(i)); item = new NSMenuItem(file.getName(),actionSel,""); item.setTarget(new ShowFileAction(file.getPath())); if (!file.exists()) item.setEnabled(false); addItem(item);
file = new File(((BufferHistory.Entry)recent.get(i)).path); item = new NSMenuItem(file.getName(),actionSel,""); item.setTarget(new ShowFileAction(file.getPath())); if (!file.exists()) item.setEnabled(false); addItem(item);
Clone fragments detected by clone detection tool
File path: /jEdit-4.2/jars/MacOS/macos/Delegate.java File path: /jEdit-4.2/jars/MacOS/macos/Delegate.java
Method name: void updateMenu() Method name: void updateMenu()
Number of AST nodes: 6 Number of AST nodes: 6
1
file = new File(model.getItem(i));
1
file = new File(((BufferHistory.Entry)recent.get(i)).path);
2
				item = new NSMenuItem(file.getName(),actionSel,"");
2
				item = new NSMenuItem(file.getName(),actionSel,"");
3
				item.setTarget(new ShowFileAction(file.getPath()));
3
				item.setTarget(new ShowFileAction(file.getPath()));
4
				if (!file.exists())
4
				if (!file.exists())
5
					item.setEnabled(false);
5
					item.setEnabled(false);
6
				addItem(item);
6
				addItem(item);
Summary
Number of common nesting structure subtrees1
Number of refactorable cases1
Number of non-refactorable cases0
Time elapsed for finding largest common nesting structure subtrees (ms)0.2
Clones locationClones are in the same java file
Number of node comparisons21
  1. {Refactorable}
    Mapping Summary
    Number of mapped statements6
    Number of unmapped statements in the first code fragment0
    Number of unmapped statements in the second code fragment0
    Time elapsed for statement mapping (ms)3.4
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    14
    file = new File(model.getItem(i));
    14
    file = new File(model.getItem(i));
    17
    file = new File(((BufferHistory.Entry)recent.get(i)).path);
    Differences
    Expression1Expression2Difference
    model.getItem(i)((BufferHistory.Entry)recent.get(i)).pathTYPE_COMPATIBLE_REPLACEMENT
    17
    file = new File(((BufferHistory.Entry)recent.get(i)).path);
    15
    item = new NSMenuItem(file.getName(), actionSel, "");
    18
    item = new NSMenuItem(file.getName(), actionSel, "");
    16
    item.setTarget(new ShowFileAction(file.getPath()));
    19
    item.setTarget(new ShowFileAction(file.getPath()));
    17
    if (!file.exists())
    20
    if (!file.exists())
    18
    item.setEnabled(false);
    21
    item.setEnabled(false);
    19
    addItem(item);
    22
    addItem(item);
    Precondition Violations (0)
    Row Violation