if (cipher != null)
{
try
{
cipher.finish(outputStream);
}
catch (Exception e)
{
throw new IOWrappedException(e);
}
}
if (cipher != null)
{
try
{
cipher.finish(inputStream);
}
catch (Exception e)
{
throw new IOWrappedException(e);
}
}
Clone fragments detected by clone detection tool
File path: /emf-2.4.1/src/org/eclipse/emf/ecore/resource/impl/ResourceImpl.java
|
|
File path: /emf-2.4.1/src/org/eclipse/emf/ecore/resource/impl/ResourceImpl.java
|
Method name: void save(OutputStream, Map,?>)
|
|
Method name: void load(InputStream, Map,?>)
|
Number of AST nodes: 3
|
|
Number of AST nodes: 3
|
|
1 | if (cipher != null)↵ | | 1 | if (cipher != null)↵
|
2 | {↵ | | 2 | ↵
|
| | | 3 | {↵
|
3 | try↵ | | 4 | try↵
|
4 | {↵ | | 5 | {↵
|
5 | cipher.finish(outputStream);↵ | | 6 | cipher.finish(inputStream);↵
|
6 | }↵ | | 7 | ↵
|
| | | 8 | }↵
|
7 | catch (Exception e)↵ | | 9 | catch (Exception e)↵
|
8 | {↵ | | 10 | {↵
|
9 | throw new IOWrappedException(e);↵ | | 11 | throw new IOWrappedException(e);↵
|
10 | }↵ | | 12 | ↵
|
| | | 13 | }↵
|
11 | } | | 14 | }
|
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.2 |
Clones location | Clones are declared in the same class |
Number of node comparisons | 5 |
-
{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.5 |
Clone type | Type 2 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
16 | if (cipher != null) | | 22 | if (cipher != null) |
17 | | | 23 | |
18 | cipher.finish(outputStream); | | 24 | cipher.finish(inputStream); |
Precondition Violations (1)
Row |
Violation |
1 | Type java.io.OutputStream of variable outputStream does not match with type java.io.InputStream of variable inputStream |