t.start(); try { t.join(); } catch (InterruptedException e) { try { t.join(); } catch (InterruptedException e2) { // Ignore } } request.setInput(new String(baos.toByteArray()));
t.start(); try { t.join(); } catch (InterruptedException e) { try { t.join(); } catch (InterruptedException ee) { // Empty } }
Clone fragments detected by clone detection tool
File path: /apache-ant-1.7.0/src/org/apache/tools/ant/input/GreedyInputHandler.java File path: /apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/Concat.java
Method name: void handleInput(InputRequest) Method name: void binaryCat(ResourceCollection)
Number of AST nodes: 4 Number of AST nodes: 3
1
t.start();
1
t.start();
2
            try {
2
            try {
3
                t.join();
3
                t.join();
4
            } catch (InterruptedException e) {
4
            } catch (InterruptedException e) {
5
                try {
5
                try {
6
                    t.join();
6
                    t.join();
7
                } catch (InterruptedException e2) {
7
                } catch (InterruptedException ee) {
8
                    // Ignore
8
                    // Empty
9
                }
9
                }
10
            }
10
            }
11
            request.setInput(new String(baos.toByteArray()));
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 in different classes
Number of node comparisons7
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements3
    Number of unmapped statements in the first code fragment1
    Number of unmapped statements in the second code fragment0
    Time elapsed for statement mapping (ms)1.5
    Clone typeType 3
    Mapped Statements
    ID Statement ID Statement
    10
    t.start();
    10
    t.start();
    11
    try
    11
    try
    11
    try
    Differences
    Expression1Expression2Difference
    e2eeVARIABLE_NAME_MISMATCH
    11
    try
    12
    t.join();
    12
    t.join();
    13
    request.setInput(new String(baos.toByteArray()));
    13
    request.setInput(new String(baos.toByteArray()));
    Preondition Violations
    Unmatched statement request.setInput(new String(baos.toByteArray())); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted
                                                                                                              
    Precondition Violations (2)
    Row Violation
    1Unmatched statement request.setInput(new String(baos.toByteArray())); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted
    2The refactoring of the clones is infeasible, because classes org.apache.tools.ant.input.GreedyInputHandler and org.apache.tools.ant.taskdefs.Concat do not have a common superclass