File path: /apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/optional/ccm/CCMCheck.java | File path: /apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/Touch.java | |||
Method name: void execute()
|
Method name: void checkConfiguration()
|
|||
Number of AST nodes: 4 | Number of AST nodes: 4 | |||
1 | if (file == null && filesets.size() == 0) {↵ | 1 | if (file == null && resources.size() == 0) {↵ | |
2 | throw new BuildException(↵ | 2 | throw new BuildException(↵ | |
3 | "Specify at least one source - a file or a fileset↵ | 3 | "Specify at least one source"↵ | |
4 | .");↵ | 4 | + "--a file or resource collection.");↵ | |
5 | }↵ | 5 | }↵ | |
6 | if (file != null && file.exists() && file.isDirectory()) {↵ | 6 | if (file != null && file.exists() && file.isDirectory()) {↵ | |
7 | throw new BuildException("CCMCheck cannot be generated for directories");↵ | 7 | throw new BuildException("Use a resource collection to touch directories.");↵ | |
8 | } | 8 |
| |
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.8 |
Clones location | Clones are in different classes having the same super class |
Number of node comparisons | 10 |
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) | 1.7 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | if (file == null && filesets.size() == 0) |
| 1 | if (file == null && resources.size() == 0) | ||||||||||||||
2 | throw new BuildException("Specify at least one source - a file or a fileset."); |
| 2 | throw new BuildException("Specify at least one source" + "--a file or resource collection."); | ||||||||||||||
3 | if (file != null && file.exists() && file.isDirectory()) | 3 | if (file != null && file.exists() && file.isDirectory()) | |||||||||||||||
4 | throw new BuildException("CCMCheck cannot be generated for directories"); |
| 4 | throw new BuildException("Use a resource collection to touch directories."); |
Row | Violation |
---|---|
1 | Type java.util.Vector of variable filesets does not match with type org.apache.tools.ant.types.resources.Union of variable resources |