File path: /apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/Unpack.java | File path: /apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/Pack.java | |||
Method name: void setSrcResource(Resource)
|
Method name: void setSrcResource(Resource)
|
|||
Number of AST nodes: 6 | Number of AST nodes: 6 | |||
1 | if (src.isDirectory()) {↵ | 1 | if (src.isDirectory()) {↵ | |
2 | throw new BuildException("the archive can't be a directory");↵ | 2 | throw new BuildException("the source can't be a directory");↵ | |
3 | }↵ | 3 | }↵ | |
4 | if (src instanceof FileResource) {↵ | 4 | if (src instanceof FileResource) {↵ | |
5 | source = ((FileResource) src).getFile();↵ | 5 | source = ((FileResource) src).getFile();↵ | |
6 | } else if (!supportsNonFileResources()) {↵ | 6 | } else if (!supportsNonFileResources()) {↵ | |
7 | throw new BuildException("Only FileSystem resources are"↵ | 7 | throw new BuildException("Only FileSystem resources are"↵ | |
8 | + " supported.");↵ | 8 | + " supported.");↵ | |
9 | } | 9 |
| |
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.4 |
Clones location | Clones are in different classes having the same super class |
Number of node comparisons | 21 |
Number of mapped statements | 6 |
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.9 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
3 | if (src.isDirectory()) | 1 | if (src.isDirectory()) | |||||||||||
4 | throw new BuildException("the archive can't be a directory"); |
| 2 | throw new BuildException("the source can't be a directory"); | ||||||||||
5 | if (src instanceof FileResource) | 3 | if (src instanceof FileResource) | |||||||||||
6 | source = ((FileResource)src).getFile(); | 4 | source = ((FileResource)src).getFile(); | |||||||||||
7 | else if (!supportsNonFileResources()) | 5 | else if (!supportsNonFileResources()) | |||||||||||
8 | throw new BuildException("Only FileSystem resources are" + " supported."); | 6 | throw new BuildException("Only FileSystem resources are" + " supported."); |
Row | Violation |
---|