if (requestedAttributes == null || requestedAttributes.contains(URIConverter.ATTRIBUTE_LENGTH))
{
if (inputStream == null)
{
inputStream = getInputStream();
inputStream.close();
}
result.put(URIConverter.ATTRIBUTE_LENGTH, zipEntry.getSize());
}
if (requestedAttributes == null || requestedAttributes.contains(URIConverter.ATTRIBUTE_TIME_STAMP))
{
if (inputStream == null)
{
inputStream = getInputStream();
inputStream.close();
}
result.put(URIConverter.ATTRIBUTE_TIME_STAMP, zipEntry.getTime());
}
Clone fragments detected by clone detection tool
File path: /emf-2.4.1/src/org/eclipse/emf/ecore/resource/impl/ArchiveURIHandlerImpl.java
|
|
File path: /emf-2.4.1/src/org/eclipse/emf/ecore/resource/impl/ArchiveURIHandlerImpl.java
|
Method name: Map getAttributes()
|
|
Method name: Map getAttributes()
|
Number of AST nodes: 5
|
|
Number of AST nodes: 5
|
|
1 | if (requestedAttributes == null || requestedAttributes.contains(URIConverter.ATTRIBUTE_LENGTH))↵ | | 1 | if (requestedAttributes == null || requestedAttributes.contains(URIConverter.ATTRIBUTE_TIME_STAMP))↵
|
2 | {↵ | | 2 | {↵
|
3 | if (inputStream == null)↵ | | 3 | if (inputStream == null)↵
|
4 | {↵ | | 4 | {↵
|
5 | inputStream = getInputStream();↵ | | 5 | inputStream = getInputStream();↵
|
6 | inputStream.close();↵ | | 6 | inputStream.close();↵
|
7 | }↵ | | 7 | }↵
|
8 | result.put(URIConverter.ATTRIBUTE_LENGTH, zipEntry.getSize());↵ | | 8 | result.put(URIConverter.ATTRIBUTE_TIME_STAMP, zipEntry.getTime());↵
|
9 | } | | 9 | }
|
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.3 |
Clones location | Clones are in the same method |
Number of node comparisons | 14 |
-
{Non-refactorable}
Mapping Summary
Number of mapped statements | 5 |
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) | 6.3 |
Clone type | Type 2 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
14 | if (requestedAttributes == null || requestedAttributes.contains(URIConverter.ATTRIBUTE_LENGTH)) | | 19 | if (requestedAttributes == null || requestedAttributes.contains(URIConverter.ATTRIBUTE_TIME_STAMP)) |
15 | | | 20 | |
16 | inputStream = getInputStream(); | | 21 | inputStream = getInputStream(); |
17 | | | 22 | |
18 | result.put(URIConverter.ATTRIBUTE_LENGTH, zipEntry.getSize()); | | 23 | result.put(URIConverter.ATTRIBUTE_TIME_STAMP, zipEntry.getTime()); |
Precondition Violations (1)
Row |
Violation |
1 | Clone fragment #1 returns variables inputStream , while Clone fragment #2 returns variables |