try { BufferedOutputStream bos = new BufferedOutputStream(new FileOutputStream(output)); outputstream = new PrintStream(bos); } catch (IOException e) { throw new BuildException(e, getLocation()); }
try { BufferedOutputStream bos = new BufferedOutputStream(new FileOutputStream(error)); errorstream = new PrintStream(bos); } catch (IOException e) { throw new BuildException(e, getLocation()); }
Clone fragments detected by clone detection tool
File path: /apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/optional/Rpm.java File path: /apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/optional/Rpm.java
Method name: void execute() Method name: void execute()
Number of AST nodes: 3 Number of AST nodes: 3
1
try {
1
try {
2
                    BufferedOutputStream bos
2
                    BufferedOutputStream bos
3
                        = new BufferedOutputStream(new FileOutputStream(output));
3
                        = new BufferedOutputStream(new FileOutputStream(error));
4
                    outputstream = new PrintStream(bos);
4
                    errorstream = new PrintStream(bos);
5
                } catch (IOException e) {
5
                }  catch (IOException e) {
6
                    throw new BuildException(e, getLocation());
6
                    throw new BuildException(e, getLocation());
7
                }
7
                }
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.3
Clones locationClones are in the same method
Number of node comparisons10
  1. {Refactorable}
    Mapping Summary
    Number of mapped statements3
    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.7
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    22
    try
    29
    try
    23
    BufferedOutputStream bos = new BufferedOutputStream(new FileOutputStream(output));
    23
    BufferedOutputStream bos = new BufferedOutputStream(new FileOutputStream(output));
    30
    BufferedOutputStream bos = new BufferedOutputStream(new FileOutputStream(error));
    Differences
    Expression1Expression2Difference
    outputerrorVARIABLE_NAME_MISMATCH
    30
    BufferedOutputStream bos = new BufferedOutputStream(new FileOutputStream(error));
    24
    outputstream = new PrintStream(bos);
    24
    outputstream = new PrintStream(bos);
    31
    errorstream = new PrintStream(bos);
    Differences
    Expression1Expression2Difference
    outputstreamerrorstreamVARIABLE_NAME_MISMATCH
    31
    errorstream = new PrintStream(bos);
    Precondition Violations (0)
    Row Violation