setAbortable(true);
String[] args = { path1 };
setStatus(jEdit.getProperty("vfs.status.deleting",args));
try
{
path1 = vfs._canonPath(session,path1,browser);
if(!vfs._delete(session,path1,browser))
VFSManager.error(browser,path1,"ioerror.delete-error",null);
setAbortable(true);
String[] args = { path1 };
setStatus(jEdit.getProperty("vfs.status.mkdir",args));
try
{
path1 = vfs._canonPath(session,path1,browser);
if(!vfs._mkdir(session,path1,browser))
VFSManager.error(browser,path1,"ioerror.mkdir-error",null);
Clone fragments detected by clone detection tool
File path: /jEdit-4.2/src/org/gjt/sp/jedit/browser/BrowserIORequest.java
|
|
File path: /jEdit-4.2/src/org/gjt/sp/jedit/browser/BrowserIORequest.java
|
Method name: void delete()
|
|
Method name: void mkdir()
|
Number of AST nodes: 6
|
|
Number of AST nodes: 6
|
|
1 | setAbortable(true);↵ | | 1 | setAbortable(true);↵
|
2 | String[] args = { path1 };↵ | | 2 | String[] args = { path1 };↵
|
3 | setStatus(jEdit.getProperty("vfs.status.deleting",args));↵ | | 3 | setStatus(jEdit.getProperty("vfs.status.mkdir",args));↵
|
|
4 | try↵ | | 4 | try↵
|
5 | {↵ | | 5 | {↵
|
6 | path1 = vfs._canonPath(session,path1,browser);↵ | | 6 | path1 = vfs._canonPath(session,path1,browser);↵
|
|
|
7 | if(!vfs._delete(session,path1,browser))↵ | | 7 | if(!vfs._mkdir(session,path1,browser))↵
|
8 | VFSManager.error(browser,path1,"ioerror.delete-error",null); | | 8 | VFSManager.error(browser,path1,"ioerror.mkdir-error",null);
|
See real code fragment |
|
See real code fragment |
Summary
Number of common nesting structure subtrees | 1 |
Number of refactorable cases | 0 |
Number of non-refactorable cases | 1 |
Time elapsed for finding largest common nesting structure subtrees (ms) | 0.6 |
Clones location | Clones are declared in the same class |
Number of node comparisons | 6 |
-
{Non-refactorable}
Mapping Summary
Number of mapped statements | 3 |
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) | 0.9 |
Clone type | Type 2 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
6 | path1 = vfs._canonPath(session, path1, browser); | | 6 | path1 = vfs._canonPath(session, path1, browser); |
7 | if (!vfs._delete(session, path1, browser)) | | 7 | if (!vfs._mkdir(session, path1, browser)) |
8 | VFSManager.error(browser, path1, "ioerror.delete-error", null); | | 8 | VFSManager.error(browser, path1, "ioerror.mkdir-error", null); |
Precondition Violations (2)
Row |
Violation |
1 | Expression vfs._delete(session,path1,browser) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
2 | Expression vfs._mkdir(session,path1,browser) cannot be parameterized, because it has dependencies to/from statements that will be extracted |