Class typeClass =
(Class) getProject().getDataTypeDefinitions().get(type);
if (typeClass == null) {
typeClass =
(Class) getProject().getTaskDefinitions().get(type);
}
if (typeClass == null) {
// don't know the type, should throw exception instead?
return false;
}
return typeClass.isAssignableFrom(o.getClass());
if (null == name) {
Enumeration entries = jarFile.getEntries();
while (entries.hasMoreElements()) {
String eName = ((ZipEntry) entries.nextElement()).getName();
if (eName.startsWith(SIG_START)
&& eName.endsWith(SIG_END)) {
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/IsReference.java
|
|
File path: /apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/condition/IsSigned.java
|
Method name: boolean eval()
|
|
Method name: boolean isSigned(File, String)
|
Number of AST nodes: 6
|
|
Number of AST nodes: 7
|
|
1 | Class typeClass =↵ | | |
|
2 | (Class) getProject().getDataTypeDefinitions().get(type);↵ | | |
|
|
3 | if (typeClass == null↵ | | 1 | if (null == name) {↵
|
| | | 2 | Enumeration entries = jarFile.getEntries();↵
|
4 | ) {↵ | | 3 | while (entries.hasMoreElements()) {↵
|
5 | typeClass =↵ | | 4 | ↵
|
6 | (Class) getProject().getTaskDefinitions().get(type);↵ | | 5 | String eName = ((ZipEntry) entries.nextElement()).getName();↵
|
| | | 6 | if (eName.startsWith(SIG_START)↵
|
7 | }↵ | | 7 | ↵
|
|
8 | if (typeClass == null) {↵ | | 8 | ↵
|
9 | // don't know the type, should throw exception instead?↵ | | 9 | && eName.endsWith(SIG_END)) {↵
|
| | | 10 | return true;↵
|
10 | return false;↵ | | 11 | ↵
|
| | | 12 | }↵
|
11 | }↵ | | 13 | }↵
|
|
12 | return typeClass.isAssignableFrom(o.getClass()); | | 14 | return false;↵
|
| | | 15 | }
|
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.2 |
Clones location | Clones are in different classes having the same super class |
Number of node comparisons | 2 |