for (Enumeration e = pathComponents.elements(); e.hasMoreElements();) { File pathComponent = (File) e.nextElement(); if (pathComponent.equals(component)) { return true; } } return false;
Enumeration e = getConditions(); while (e.hasMoreElements()) { Condition c = (Condition) e.nextElement(); if (c.eval()) { return true; } } return false;
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/taskdefs/condition/Or.java
Method name: boolean isInPath(File) Method name: boolean eval()
Number of AST nodes: 5 Number of AST nodes: 6
1
for (Enumeration e = pathComponents.elements(); 
1
Enumeration e = getConditions();
2
e.hasMoreElements();) {
2
        while (e.hasMoreElements()) {
3
            File pathComponent = (File) e.nextElement();
3
            Condition c = (Condition) e.nextElement();
4
            if (pathComponent.equals(component)) {
4
            if (c.eval()) {
5
                return true;
5
                return true;
6
            }
6
            }
7
        }
7
        }
8
        return false;
8
        return false;
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