if (output != null) { try { output.close(); } catch (IOException ioe) { //do nothing } }
try { os.close(); } catch (IOException e) { //ignore }
Clone fragments detected by clone detection tool
File path: /apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/optional/jlink/jlink.java File path: /apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/PumpStreamHandler.java
Method name: void link() Method name: void setProcessInputStream(OutputStream)
Number of AST nodes: 3 Number of AST nodes: 2
1
if (output != null) {
2
            try {
1
try {
3
                output.close();
2
                os.close();
4
            } catch (IOException ioe) {
3
            } catch (IOException e) {
5
                //do nothing
4
                //
6
            }
5
ignore
7
        }
6
            }
Summary
Number of common nesting structure subtrees1
Number of refactorable cases1
Number of non-refactorable cases0
Time elapsed for finding largest common nesting structure subtrees (ms)0.1
Clones locationClones are in different classes
Number of node comparisons4
  1. {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.6
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    21
    try
    21
    try
    3
    try
    Differences
    Expression1Expression2Difference
    ioeeVARIABLE_NAME_MISMATCH
    3
    try
    22
    output.close();
    22
    output.close();
    4
    os.close();
    Differences
    Expression1Expression2Difference
    outputosVARIABLE_NAME_MISMATCH
    java.util.zip.ZipOutputStreamjava.io.OutputStreamSUBCLASS_TYPE_MISMATCH
    4
    os.close();
    Precondition Violations (0)
    Row Violation