for (Enumeration e = pathComponents.elements(); e.hasMoreElements();) { File pathComponent = (File) e.nextElement(); if (pathComponent.equals(component)) { return true; } }
while (e.hasMoreElements()) { PatternSet ps = (PatternSet) e.nextElement(); if (ps.hasPatterns(getProject())) { return true; } }
Clone fragments detected by clone detection tool
File path: /apache-ant-1.7.0/src/org/apache/tools/ant/AntClassLoader.java File path: /apache-ant-1.7.0/src/org/apache/tools/ant/types/AbstractFileSet.java
Method name: boolean isInPath(File) Method name: boolean hasPatterns()
Number of AST nodes: 4 Number of AST nodes: 4
1
for (Enumeration e = pathComponents.elements(); e.hasMoreElements();) {
1
while (e.hasMoreElements()) {
2
            File pathComponent = (File) e.nextElement();
2
            PatternSet ps = (PatternSet) e.nextElement();
3
            if (pathComponent.equals(component)) {
3
            if (ps.hasPatterns(getProject())) {
4
                return true;
4
                return true;
5
            }
5
            }
6
        }
6
        }
Summary
Number of common nesting structure subtrees0
Number of refactorable cases0
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 comparisons1