for (int i = 0; i < fields.length; i++) {
Field fieldEntry = fields[i];
if (fieldEntry.getName().equals(field)) {
return true;
}
}
for (int i = 0; i < excludes.length; i++) {
String e = excludes[i];
if (e.endsWith("**") && SelectorUtils.matchPath(
e.substring(0, e.length() - 2), name, isCaseSensitive())) {
return true;
}
}
Clone fragments detected by clone detection tool
File path: /apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/condition/HasMethod.java
|
|
File path: /apache-ant-1.7.0/src/org/apache/tools/ant/DirectoryScanner.java
|
Method name: boolean isFieldFound(Class)
|
|
Method name: boolean contentsExcluded(String)
|
Number of AST nodes: 4
|
|
Number of AST nodes: 4
|
|
1 | for (int i = 0; i < fields.length; i++) {↵ | | 1 | for (int i = 0; i < excludes.length; i++) {↵
|
2 | Field fieldEntry = fields[i];↵ | | 2 | ↵
|
3 | if (fieldEntry.getName().equals(field↵ | | 3 | String e = excludes[i];↵
|
| | | 4 | if (e.endsWith("**") && SelectorUtils.matchPath(↵
|
4 | )) {↵ | | 5 | e.substring(0, e.length() - 2), name, isCaseSensitive())) {↵
|
5 | return true;↵ | | 6 | return true;↵
|
6 | }↵ | | 7 | }↵
|
7 | } | | 8 | }
|
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 |