if((getCapabilities() & READ_CAP) == 0)
{
VFSManager.error(view,path,"vfs.not-supported.load",new String[] { name });
return false;
}
Object session = createVFSSession(path,view);
if(session == null)
return false;
if((getCapabilities() & READ_CAP) == 0)
{
VFSManager.error(view,path,"vfs.not-supported.load",new String[] { name });
return false;
}
Object session = createVFSSession(path,view);
if(session == null)
return false;
Clone fragments detected by clone detection tool
File path: /jEdit-4.2/src/org/gjt/sp/jedit/io/VFS.java
|
|
File path: /jEdit-4.2/src/org/gjt/sp/jedit/io/VFS.java
|
Method name: boolean load(View, Buffer, String)
|
|
Method name: boolean insert(View, Buffer, String)
|
Number of AST nodes: 6
|
|
Number of AST nodes: 6
|
|
1 | if((getCapabilities() & READ_CAP) == 0)↵ | | 1 | if((getCapabilities() & READ_CAP) == 0)↵
|
2 | {↵ | | 2 | {↵
|
3 | VFSManager.error(view,path,"vfs.not-supported.load",new String[] { name });↵ | | 3 | VFSManager.error(view,path,"vfs.not-supported.load",new String[] { name });↵
|
4 | return false;↵ | | 4 | return false;↵
|
5 | }↵ | | 5 | }↵
|
|
6 | Object session = createVFSSession(path,view);↵ | | 6 | Object session = createVFSSession(path,view);↵
|
7 | if(session == null)↵ | | 7 | if(session == null)↵
|
8 | return false; | | 8 | return false;
|
See real code fragment |
|
See real code fragment |
Summary
Number of common nesting structure subtrees | 1 |
Number of refactorable cases | 1 |
Number of non-refactorable cases | 0 |
Time elapsed for finding largest common nesting structure subtrees (ms) | 0.4 |
Clones location | Clones are declared in the same class |
Number of node comparisons | 21 |
-
{Refactorable}
Mapping Summary
Number of mapped statements | 6 |
Number of unmapped statements in the first code fragment | 0 |
Number of unmapped statements in the second code fragment | 0 |
Time elapsed for statement mapping (ms) | 1.2 |
Clone type | Type 1 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
1 | if ((getCapabilities() & READ_CAP) == 0) | | 1 | if ((getCapabilities() & READ_CAP) == 0) |
2 | VFSManager.error(view, path, "vfs.not-supported.load", new String[] {name}); | | 2 | VFSManager.error(view, path, "vfs.not-supported.load", new String[] {name}); |
3 | | | 3 | |
4 | Object session = createVFSSession(path, view); | | 4 | Object session = createVFSSession(path, view); |
5 | if (session == null) | | 5 | if (session == null) |
6 | | | 6 | |
Precondition Violations (0)
Row |
Violation |