while (e.hasMoreElements()) { Condition c = (Condition) e.nextElement(); if (c.eval()) { return true; } }
while (e.hasMoreElements()) { String s = (String) e.nextElement(); if (s.startsWith(CLASSPATH)) { cmd.createClasspath(getProject()).createPath() .append(new Path(getProject(), s.substring(CLASSPATH.length() ))); } }
Clone fragments detected by clone detection tool
File path: /apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/condition/Or.java File path: /apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/optional/junit/JUnitTask.java
Method name: boolean eval() Method name: TestResultHolder executeAsForked(JUnitTest, ExecuteWatchdog, File)
Number of AST nodes: 4 Number of AST nodes: 4
1
while (e.hasMoreElements()) {
1
while (e.hasMoreElements()) {
2
            Condition c = (Condition) e.nextElement();
2
                String s = (String) e.nextElement();
3
            if (c.eval()) {
3
                if (s.startsWith(CLASSPATH)) {
4
                return true
4
                    cmd.createClasspath(getProject()).createPath()
5
                        .append(new Path(getProject(),
6
                                         s.substring(CLASSPATH.length()
5
;
7
                                                     )));
6
            }
8
            
9
    }
7
        }
10
            }
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 having the same super class
Number of node comparisons1