File path: /apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/Checksum.java | File path: /apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/Checksum.java | |||
Method name: boolean validateAndExecute()
|
Method name: boolean validateAndExecute()
|
|||
Number of AST nodes: 2 | Number of AST nodes: 2 | |||
1 | if (totalproperty != null || todir != null) {↵ | 1 | if (totalproperty != null || todir != null) {↵ | |
2 | // Use '/' to calculate digest based on file name.↵ | 2 | ↵ | |
3 | // This is required in order to get the same result↵ | |||
4 | // on different platforms.↵ | |||
5 | relativeFilePaths.put(src, fr↵ | 3 | relativeFilePaths.put(↵ | |
6 | .getName().replace(File.separatorChar, '/'));↵ | 4 | file, file.getName().replace(File.separatorChar, '/'));↵ | |
7 | } | 5 |
| |
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.4 |
Clones location | Clones are in the same method |
Number of node comparisons | 6 |
Number of mapped statements | 2 |
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) | 5.3 |
Clone type | Type 2 |
ID | Statement | ID | Statement | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
45 | if (totalproperty != null || todir != null) | 49 | if (totalproperty != null || todir != null) | ||||||||||||||||||
46 | relativeFilePaths.put(src, fr.getName().replace(File.separatorChar, '/')); |
| 50 | relativeFilePaths.put(file, file.getName().replace(File.separatorChar, '/')); |
Row | Violation |
---|---|
1 | Type org.apache.tools.ant.types.resources.FileResource of variable fr does not match with type java.io.File of variable file |