try
{
return Boolean.TRUE.equals(isFloppyDrive.
invoke(fsView, new Object[] { file }));
}
catch(Exception e)
{
Log.log(Log.ERROR,this,e);
return false;
}
try
{
return Boolean.TRUE.equals(isDrive.
invoke(fsView, new Object[] { file }));
}
catch(Exception e)
{
Log.log(Log.ERROR,this,e);
return false;
}
Clone fragments detected by clone detection tool
File path: /jEdit-4.2/src/org/gjt/sp/jedit/io/FileRootsVFS.java
|
|
File path: /jEdit-4.2/src/org/gjt/sp/jedit/io/FileRootsVFS.java
|
Method name: boolean isFloppy(File)
|
|
Method name: boolean isDrive(File)
|
Number of AST nodes: 2
|
|
Number of AST nodes: 2
|
|
1 | try↵ | | 1 | try↵
|
2 | {↵ | | 2 | {↵
|
3 | return Boolean.TRUE.equals(isFloppyDrive.↵ | | 3 | return Boolean.TRUE.equals(isDrive.↵
|
4 | invoke(fsView, new Object[] { file }));↵ | | 4 | invoke(fsView, new Object[] { file }));↵
|
5 | }↵ | | 5 | }↵
|
6 | catch(Exception e)↵ | | 6 | catch(Exception e)↵
|
7 | {↵ | | 7 | {↵
|
8 | Log.log(Log.ERROR,this,e);↵ | | 8 | Log.log(Log.ERROR,this,e);↵
|
9 | return false;↵ | | 9 | return false;↵
|
10 | } | | 10 | }
|
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 | 5 |
-
{Refactorable}
Mapping Summary
Number of mapped statements | 2 |
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.7 |
Clone type | Type 2 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
2 | try | | 2 | try |
3 | return Boolean.TRUE.equals(isFloppyDrive.invoke(fsView, new Object[] {file})); | | 3 | return Boolean.TRUE.equals(isDrive.invoke(fsView, new Object[] {file})); |
Precondition Violations (0)
Row |
Violation |