return true;
}
/* now check each Resource in case the child only
lets through files from any children IT may have: */
for (Iterator i = cacheCollection().iterator(); i.hasNext();) {
if (!(i.next() instanceof FileResource)) {
return false;
}
}
return true;
return true;
}
/* now check each Resource in case the child only
lets through files from any children IT may have: */
for (Iterator i = cacheCollection().iterator(); i.hasNext();) {
if (!(i.next() instanceof FileResource)) {
return false;
}
}
return true;
Clone fragments detected by clone detection tool
File path: /apache-ant-1.7.0/src/org/apache/tools/ant/types/resources/BaseResourceCollectionWrapper.java
|
|
File path: /apache-ant-1.7.0/src/org/apache/tools/ant/types/resources/BaseResourceCollectionContainer.java
|
Method name: boolean isFilesystemOnly()
|
|
Method name: boolean isFilesystemOnly()
|
Number of AST nodes: 5
|
|
Number of AST nodes: 5
|
|
1 | return true;↵ | | 1 | return true;↵
|
2 | }↵ | | 2 | }↵
|
3 | /* now check each Resource in case the child only↵ | | 3 | /* now check each Resource in case the child only↵
|
4 | lets through files from any children IT may have: */↵ | | 4 | lets through files from any children IT may have: */↵
|
5 | for (Iterator i = cacheCollection().iterator(); i.hasNext();) {↵ | | 5 | for (Iterator i = cacheCollection().iterator(); i.hasNext();) {↵
|
6 | if (!(i.next() instanceof FileResource)) {↵ | | 6 | if (!(i.next() instanceof FileResource)) {↵
|
7 | return false;↵ | | 7 | return false;↵
|
8 | }↵ | | 8 | }↵
|
9 | }↵ | | 9 | }↵
|
10 | return true; | | 10 | return true;
|
See real code fragment |
|
See real code fragment |
Summary
Number of common nesting structure subtrees | 1 |
Number of refactorable cases | 0 |
Number of non-refactorable cases | 1 |
Time elapsed for finding largest common nesting structure subtrees (ms) | 0.3 |
Clones location | Clones are in different classes having the same super class |
Number of node comparisons | 6 |
-
{Non-refactorable}
Mapping Summary
Number of mapped statements | 4 |
Number of unmapped statements in the first code fragment | 0 |
Number of unmapped statements in the second code fragment | 0 |
Time elapsed for statement mapping (ms) | 17.8 |
Clone type | Type 1 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
6 | for (Iterator i = cacheCollection().iterator(); i.hasNext(); ) | | 9 | for (Iterator i = cacheCollection().iterator(); i.hasNext(); ) |
7 | if (!(i.next() instanceof FileResource)) | | 10 | if (!(i.next() instanceof FileResource)) |
8 | | | 11 | |
9 | return true; | | 12 | return true; |
Precondition Violations (1)
Row |
Violation |
1 | Not all possible execution flows end in a return statement |