File path: /apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/Tar.java | File path: /apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/Get.java | |||
Method name: void execute()
|
Method name: boolean doGet(int, DownloadProgress)
|
|||
Number of AST nodes: 4 | Number of AST nodes: 4 | |||
1 | if (tarFile == null) {↵ | 1 | if (dest == null) {↵ | |
2 | throw new BuildException("tarfile attribute must be set!",↵ | 2 | throw new BuildException("dest attribute ↵ | |
3 | getLocation());↵ | 3 | is required", getLocation());↵ | |
4 | }↵ | 4 | }↵ | |
5 | if (tarFile.exists() && tarFile.isDirectory()) {↵ | 5 | if (dest.exists() && dest.isDirectory()) {↵ | |
6 | throw new BuildException("tarfile is a directory!",↵ | 6 | throw new BuildException("The specified destination is a directory",↵ | |
7 | getLocation());↵ | 7 | getLocation());↵ | |
8 | } | 8 |
| |
See real code fragment | See real code fragment |
Number of common nesting structure subtrees | 1 |
Number of refactorable cases | 1 |
Number of non-refactorable cases | 0 |
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) | 22.8 |
Clone type | Type 2 |
ID | Statement | ID | Statement | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | if (tarFile == null) |
| 3 | if (dest == null) | |||||||||||||
2 | throw new BuildException("tarfile attribute must be set!", getLocation()); |
| 4 | throw new BuildException("dest attribute is required", getLocation()); | |||||||||||||
3 | if (tarFile.exists() && tarFile.isDirectory()) |
| 5 | if (dest.exists() && dest.isDirectory()) | |||||||||||||
4 | throw new BuildException("tarfile is a directory!", getLocation()); |
| 6 | throw new BuildException("The specified destination is a directory", getLocation()); |
Row | Violation |
---|