try { cipher.finish(outputStream); } catch (Exception e) { throw new IOWrappedException(e); }
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: 2 Number of AST nodes: 2
1
try
1
try
2
      {
2
      
3
    {
3
        cipher.finish(outputStream);
4
            cipher.finish(inputStream);
4
      }
5
          }
5
      catch (Exception e)
6
          catch (Exception e)
6
      {
7
          {
7
        throw new IOWrappedException(e);
8
            throw new IOWrappedException(e);
8
      }
9
          }
Summary
Number of common nesting structure subtrees1
Number of refactorable cases0
Number of non-refactorable cases1
Time elapsed for finding largest common nesting structure subtrees (ms)0.2
Clones locationClones are declared in the same class
Number of node comparisons5
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements2
    Number of unmapped statements in the first code fragment0
    Number of unmapped statements in the second code fragment0
    Time elapsed for statement mapping (ms)0.4
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    17
    try
    23
    try
    18
    cipher.finish(outputStream);
    18
    cipher.finish(outputStream);
    24
    cipher.finish(inputStream);
    Differences
    Expression1Expression2Difference
    outputStreaminputStreamVARIABLE_NAME_MISMATCH
    java.io.OutputStreamjava.io.InputStreamVARIABLE_TYPE_MISMATCH
    Preondition Violations
    Type java.io.OutputStream of variable outputStream does not match with type java.io.InputStream of variable inputStream
    • Make classes java.io.OutputStream and java.io.InputStream extend a common superclass
    24
    cipher.finish(inputStream);
    Precondition Violations (1)
    Row Violation
    1Type java.io.OutputStream of variable outputStream does not match with type java.io.InputStream of variable inputStream