File path: /apache-ant-1.7.0/src/org/apache/tools/ant/types/ZipFileSet.java | File path: /apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/XmlProperty.java | |||
Method name: String getEncoding()
|
Method name: File getFile()
|
|||
Number of AST nodes: 5 | Number of AST nodes: 3 | |||
1 | if (isReference()) {↵ | 1 | if (↵ | |
2 | AbstractFileSet ref = getRef(getProject());↵ | |||
3 | if (ref instanceof ZipFileSet) {↵ | 2 | src instanceof File↵ | |
4 | ↵ | 3 | Resource) {↵ | |
5 | return ((ZipFileSet) ref).getEncoding();↵ | 4 | return ((FileResource) src).getFile();↵ | |
6 | } else {↵ | 5 | } else {↵ | |
7 | return null;↵ | 6 | return null;↵ | |
8 | }↵ | |||
9 | } | 7 |
| |
See real code fragment | See real code fragment |
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 | 9 |
Number of mapped statements | 2 |
Number of unmapped statements in the first code fragment | 2 |
Number of unmapped statements in the second code fragment | 1 |
Time elapsed for statement mapping (ms) | 0.7 |
Clone type | Type 3 |
ID | Statement | ID | Statement | |||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
2 | AbstractFileSet ref = getRef(getProject()); | | ||||||||||||||||||
3 | if (ref instanceof ZipFileSet) |
| 1 | if (src instanceof FileResource) | ||||||||||||||||
|
| 2 | return ((FileResource)src).getFile(); | |||||||||||||||||
4 | return ((ZipFileSet)ref).getEncoding(); |
| | |||||||||||||||||
else | else | |||||||||||||||||||
5 | return null; | 3 | return null; |
Row | Violation |
---|---|
1 | Unmatched return ((FileResource)src).getFile(); |
2 | Unmatched return ((ZipFileSet)ref).getEncoding(); |