for (Enumeration e = pathComponents.elements(); e.hasMoreElements();) {
File pathComponent = (File) e.nextElement();
if (pathComponent.equals(component)) {
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/AntClassLoader.java
|
|
File path: /apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/optional/junit/JUnitTask.java
|
Method name: boolean isInPath(File)
|
|
Method name: TestResultHolder executeAsForked(JUnitTest, ExecuteWatchdog, File)
|
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 | String s = (String) e.nextElement();↵
|
3 | if (pathComponent.equals(component)) {↵ | | 3 | ↵
|
4 | return true;↵ | | |
|
| | | 4 | if (s.startsWith(CLASSPATH)) {↵
|
| | | 5 | cmd.createClasspath(getProject()).createPath()↵
|
| | | 6 | .append(new Path(getProject(),↵
|
| | | 7 | s.substring(CLASSPATH.length()↵
|
| | | 8 | )));↵
|
5 | }↵ | | 9 | }↵
|
6 | } | | 10 | }
|
See real code fragment |
|
See real code fragment |
Summary
Number of common nesting structure subtrees | 0 |
Number of refactorable cases | 0 |
Number of non-refactorable cases | 0 |
Time elapsed for finding largest common nesting structure subtrees (ms) | 0.1 |
Clones location | Clones are in different classes |
Number of node comparisons | 1 |