path = vfs._canonPath(session,path,view); VFS.DirectoryEntry entry = vfs._getDirectoryEntry( session,path,view); long length; if(entry != null) length = entry.length; else length = 0L; in = vfs._createInputStream(session,path, false,view); if(in == null) return;
path = vfs._canonPath(session,path,view); VFS.DirectoryEntry entry = vfs._getDirectoryEntry( session,path,view); long length; if(entry != null) length = entry.length; else length = 0L; in = vfs._createInputStream(session,path,false,view); if(in == null) return;
Clone fragments detected by clone detection tool
File path: /jEdit-4.2/src/org/gjt/sp/jedit/buffer/BufferIORequest.java File path: /jEdit-4.2/src/org/gjt/sp/jedit/buffer/BufferIORequest.java
Method name: void load() Method name: void insert()
Number of AST nodes: 9 Number of AST nodes: 9
1
path = vfs._canonPath(session,path,view);
1
path = vfs._canonPath(session,path,view);
2
				VFS.DirectoryEntry entry = vfs._getDirectoryEntry(
2
				VFS.DirectoryEntry entry = vfs._getDirectoryEntry(
3
					session,path,view);
3
					session,path,view);
4
				long length;
4
				long length;
5
				if(entry != null)
5
				if(entry != null)
6
					length = entry.length;
6
					length = entry.length;
7
				else
7
				else
8
					length = 0L;
8
					length = 0L;
9
				in = vfs._createInputStream(session,path,
9
				in = vfs._createInputStream(session,path,
10
					false,view);
10
false,view);
11
				if(in == null)
11
				if(in == null)
12
					return;
12
					return;
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.4
Clones locationClones are declared in the same class
Number of node comparisons31
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements9
    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.6
    Clone typeType 1
    Mapped Statements
    ID Statement ID Statement
    9
    path = vfs._canonPath(session, path, view);
    7
    path = vfs._canonPath(session, path, view);
    10
    VFS.DirectoryEntry entry = vfs._getDirectoryEntry(session, path, view);
    8
    VFS.DirectoryEntry entry = vfs._getDirectoryEntry(session, path, view);
    11
    long length;
    9
    long length;
    12
    if (entry != null)
    10
    if (entry != null)
    13
    length = entry.length;
    11
    length = entry.length;
    else
    else
    14
    length = 0L;
    12
    length = 0L;
    15
    in = vfs._createInputStream(session, path, false, view);
    13
    in = vfs._createInputStream(session, path, false, view);
    16
    if (in == null)
    14
    if (in == null)
    17
    return;
    17
    return;
    15
    return;
    Preondition Violations
    Conditional return;
    Conditional return;
    15
    return;
    Precondition Violations (3)
    Row Violation
    1Conditional return;
    2Conditional return;
    3Clone fragment #1 returns variables length, in , while Clone fragment #2 returns variables length, in