try
{
Object isArchive = FILE_INFO_GET_ATTRIBUTE_METHOD.invoke(info, ATTRIBUTE_ARCHIVE);
result.put(URIConverter.ATTRIBUTE_ARCHIVE, isArchive);
}
catch (Exception exception)
{
// Ignore.
}
try
{
Object isExecutable = FILE_INFO_GET_ATTRIBUTE_METHOD.invoke(info, ATTRIBUTE_EXECUTABLE);
result.put(URIConverter.ATTRIBUTE_EXECUTABLE, isExecutable);
}
catch (Exception exception)
{
// Ignore.
}
Clone fragments detected by clone detection tool
File path: /emf-2.4.1/src/org/eclipse/emf/ecore/resource/impl/EFSURIHandlerImpl.java
|
|
File path: /emf-2.4.1/src/org/eclipse/emf/ecore/resource/impl/EFSURIHandlerImpl.java
|
Method name: Map getAttributes(URI, Map,?>)
|
|
Method name: Map getAttributes(URI, Map,?>)
|
Number of AST nodes: 3
|
|
Number of AST nodes: 3
|
|
1 | try↵ | | 1 | try↵
|
2 | {↵ | | 2 | {↵
|
3 | Object isArchive = FILE_INFO_GET_ATTRIBUTE_METHOD.invoke(info, ATTRIBUTE_ARCHIVE);↵ | | 3 | Object isExecutable = FILE_INFO_GET_ATTRIBUTE_METHOD.invoke(info, ATTRIBUTE_EXECUTABLE);↵
|
4 | result.put(URIConverter.ATTRIBUTE_ARCHIVE, isArchive);↵ | | 4 | result.put(URIConverter.ATTRIBUTE_EXECUTABLE, isExecutable);↵
|
5 | }↵ | | 5 | }↵
|
6 | catch (Exception exception)↵ | | 6 | catch (Exception exception)↵
|
7 | {↵ | | 7 | {↵
|
8 | // Ignore.↵ | | 8 | // Ignore.↵
|
9 | } | | 9 | }
|
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.3 |
Clones location | Clones are in the same method |
Number of node comparisons | 10 |
-
{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) | 24.6 |
Clone type | Type 2 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
15 | try | | 19 | try |
16 | Object isArchive = FILE_INFO_GET_ATTRIBUTE_METHOD.invoke(info, ATTRIBUTE_ARCHIVE); | | 20 | Object isExecutable = FILE_INFO_GET_ATTRIBUTE_METHOD.invoke(info, ATTRIBUTE_EXECUTABLE); |
17 | result.put(URIConverter.ATTRIBUTE_ARCHIVE, isArchive); | | 21 | result.put(URIConverter.ATTRIBUTE_EXECUTABLE, isExecutable); |
Precondition Violations (0)
Row |
Violation |