VFS.DirectoryEntry[] list2 = new VFS.DirectoryEntry[list.length]; for(int i = 0; i < list.length; i++) list2[i] = new LocalDirectoryEntry(list[i]); return list2;
VFS.DirectoryEntry[] rootDE = new VFS.DirectoryEntry[roots.length]; for(int i = 0; i < roots.length; i++) rootDE[i] = new RootsEntry(roots[i]); return rootDE;
Clone fragments detected by clone detection tool
File path: /jEdit-4.2/src/org/gjt/sp/jedit/io/FileVFS.java File path: /jEdit-4.2/src/org/gjt/sp/jedit/io/FileRootsVFS.java
Method name: VFS.DirectoryEntry[] _listDirectory(Object, String, Component) Method name: VFS.DirectoryEntry[] _listDirectory(Object, String, Component)
Number of AST nodes: 4 Number of AST nodes: 4
1
VFS.DirectoryEntry[] list2 = new VFS.DirectoryEntry[list.length];
1
VFS.DirectoryEntry[] rootDE = new VFS.DirectoryEntry[roots.length];
2
		for(int i = 0; i < list.length; i++)
2
		for(int i = 0; i < roots.length; i++)
3
			list2[i] = new LocalDirectoryEntry(list[i]);
3
			rootDE[i] = new RootsEntry(roots[i]);
4
		return list2;
4
		return rootDE;
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 having the same super class
Number of node comparisons8
  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.8
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    9
    VFS.DirectoryEntry[] list2 = new VFS.DirectoryEntry[list.length];
    9
    VFS.DirectoryEntry[] list2 = new VFS.DirectoryEntry[list.length];
    4
    VFS.DirectoryEntry[] rootDE = new VFS.DirectoryEntry[roots.length];
    Differences
    Expression1Expression2Difference
    list2rootDEVARIABLE_NAME_MISMATCH
    listrootsVARIABLE_NAME_MISMATCH
    4
    VFS.DirectoryEntry[] rootDE = new VFS.DirectoryEntry[roots.length];
    10
    for (int i = 0; i < list.length; i++)
    10
    for (int i = 0; i < list.length; i++)
    5
    for (int i = 0; i < roots.length; i++)
    Differences
    Expression1Expression2Difference
    listrootsVARIABLE_NAME_MISMATCH
    5
    for (int i = 0; i < roots.length; i++)
    11
    list2[i] = new LocalDirectoryEntry(list[i]);
    11
    list2[i] = new LocalDirectoryEntry(list[i]);
    6
    rootDE[i] = new RootsEntry(roots[i]);
    Differences
    Expression1Expression2Difference
    list2rootDEVARIABLE_NAME_MISMATCH
    org.gjt.sp.jedit.io.FileVFS.LocalDirectoryEntryorg.gjt.sp.jedit.io.FileRootsVFS.RootsEntrySUBCLASS_TYPE_MISMATCH
    listrootsVARIABLE_NAME_MISMATCH
    Preondition Violations
    Expression new LocalDirectoryEntry(list[i]) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression new RootsEntry(roots[i]) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    6
    rootDE[i] = new RootsEntry(roots[i]);
    12
    return list2;
    12
    return list2;
    7
    return rootDE;
    Differences
    Expression1Expression2Difference
    list2rootDEVARIABLE_NAME_MISMATCH
    7
    return rootDE;
    Precondition Violations (2)
    Row Violation
    1Expression new LocalDirectoryEntry(list[i]) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    2Expression new RootsEntry(roots[i]) cannot be parameterized, because it has dependencies to/from statements that will be extracted