Field[] fields = clazz.getDeclaredFields();
for (int i = 0; i < fields.length; i++) {
Field fieldEntry = fields[i];
if (fieldEntry.getName().equals(field)) {
return true;
}
}
return false;
name = (name.endsWith(File.separator)) ? name : name + File.separator;
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;
}
}
return false;
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: 6
|
|
Number of AST nodes: 6
|
|
1 | Field[] fields = clazz.getDeclaredFields();↵ | | 1 | name = (name.endsWith(File.separator)) ? name : name + File.separator;↵
|
2 | for (int i = 0; i < fields.length; i++) {↵ | | 2 | for (int i = 0; i < excludes.length; i++) {↵
|
3 | Field fieldEntry = fields[i];↵ | | 3 | ↵
|
4 | if (fieldEntry.getName().equals(field↵ | | 4 | String e = excludes[i];↵
|
| | | 5 | if (e.endsWith("**") && SelectorUtils.matchPath(↵
|
5 | )) {↵ | | 6 | e.substring(0, e.length() - 2), name, isCaseSensitive())) {↵
|
6 | return true;↵ | | 7 | return true;↵
|
7 | }↵ | | 8 | }↵
|
8 | }↵ | | 9 | }↵
|
9 | return false; | | 10 | return false;
|
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 |