for (Enumeration e = params.elements(); e.hasMoreElements();) {
Param p = (Param) e.nextElement();
if (p.shouldUse()) {
liaison.addParam(p.getName(), p.getExpression());
}
}
while (e.hasMoreElements()) {
Condition c = (Condition) e.nextElement();
if (c.eval()) {
return true;
}
}
Clone fragments detected by clone detection tool
File path: /apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/XSLTProcess.java
|
|
File path: /apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/condition/Or.java
|
Method name: void configureLiaison(Resource)
|
|
Method name: boolean eval()
|
Number of AST nodes: 4
|
|
Number of AST nodes: 4
|
|
1 | for (Enumeration e = params.elements(); e.hasMoreElements();) {↵ | | 1 | while (e.hasMoreElements()) {↵
|
2 | Param p = (Param) e.nextElement();↵ | | 2 | Condition c = (Condition) e.nextElement();↵
|
3 | if (p.shouldUse()) {↵ | | 3 | if (c.eval()) {↵
|
4 | liaison.addParam(p.getName(), p.getExpression());↵ | | 4 | ↵
|
5 | ↵ | | 5 | return true;↵
|
6 | }↵ | | 6 | }↵
|
7 | } | | 7 | }
|
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 having the same super class |
Number of node comparisons | 1 |