return true; } /* now check each Resource in case the child only lets through files from any children IT may have: */ for (Iterator i = cacheCollection().iterator(); i.hasNext();) { if (!(i.next() instanceof FileResource)) { return false; } } return true;
return true; } /* now check each Resource in case the child only lets through files from any children IT may have: */ for (Iterator i = cacheCollection().iterator(); i.hasNext();) { if (!(i.next() instanceof FileResource)) { return false; } } return true;
Clone fragments detected by clone detection tool
File path: /apache-ant-1.7.0/src/org/apache/tools/ant/types/resources/BaseResourceCollectionWrapper.java File path: /apache-ant-1.7.0/src/org/apache/tools/ant/types/resources/BaseResourceCollectionContainer.java
Method name: boolean isFilesystemOnly() Method name: boolean isFilesystemOnly()
Number of AST nodes: 5 Number of AST nodes: 5
1
return true;
1
return true;
2
        }
2
        }
3
        /* now check each Resource in case the child only
3
        /* now check each Resource in case the child only
4
           lets through files from any children IT may have: */
4
           lets through files from any children IT may have: */
5
        for (Iterator i = cacheCollection().iterator(); i.hasNext();) {
5
        for (Iterator i = cacheCollection().iterator(); i.hasNext();) {
6
            if (!(i.next() instanceof FileResource)) {
6
            if (!(i.next() instanceof FileResource)) {
7
                return false;
7
                return false;
8
            }
8
            }
9
        }
9
        }
10
        return true;
10
        return true;
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.3
Clones locationClones are in different classes having the same super class
Number of node comparisons6
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements4
    Number of unmapped statements in the first code fragment0
    Number of unmapped statements in the second code fragment0
    Time elapsed for statement mapping (ms)17.8
    Clone typeType 1
    Mapped Statements
    ID Statement ID Statement
    6
    for (Iterator i = cacheCollection().iterator(); i.hasNext(); )
    9
    for (Iterator i = cacheCollection().iterator(); i.hasNext(); )
    7
    if (!(i.next() instanceof FileResource))
    10
    if (!(i.next() instanceof FileResource))
    8
    return false;
    11
    return false;
    9
    return true;
    12
    return true;
    Precondition Violations (1)
    Row Violation
    1Not all possible execution flows end in a return statement