if (isReference()) { throw noChildrenAllowed(); } addFilter(new Filter(token, value));
if (closed) { throw new IOException("The funneled OutputStream has been closed."); }
Clone fragments detected by clone detection tool
File path: /apache-ant-1.7.0/src/org/apache/tools/ant/types/FilterSet.java File path: /apache-ant-1.7.0/src/org/apache/tools/ant/util/OutputStreamFunneler.java
Method name: void addFilter(String, String) Method name: void dieIfClosed()
Number of AST nodes: 3 Number of AST nodes: 2
1
if (isReference()) {
1
if (closed) {
2
            throw noChildrenAllowed();
2
            throw new IOException("The funneled OutputStream has been closed.");
3
        }
3
        }
4
        addFilter(new Filter(token, value));
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 fragment1
    Number of unmapped statements in the second code fragment0
    Time elapsed for statement mapping (ms)0.4
    Clone typeType 3
    Mapped Statements
    ID Statement ID Statement
    1
    if (isReference())
    1
    if (isReference())
    1
    if (closed)
    Differences
    Expression1Expression2Difference
    isReference()closedTYPE_COMPATIBLE_REPLACEMENT
    1
    if (closed)
    2
    throw noChildrenAllowed();
    2
    throw noChildrenAllowed();
    2
    throw new IOException("The funneled OutputStream has been closed.");
    Differences
    Expression1Expression2Difference
    noChildrenAllowed()new IOException("The funneled OutputStream has been closed.")TYPE_COMPATIBLE_REPLACEMENT
    2
    throw new IOException("The funneled OutputStream has been closed.");
    3
    addFilter(new Filter(token, value));
                                                                                
    Precondition Violations (0)
    Row Violation