File path: /apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/optional/extension/JarLibDisplayTask.java | File path: /apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/optional/extension/JarLibAvailableTask.java | |||
Method name: void validate()
|
Method name: void validate()
|
|||
Number of AST nodes: 9 | Number of AST nodes: 9 | |||
1 | if (null == libraryFile && libraryFileSets.isEmpty()) {↵ | 1 | if (null == libraryFile && extensionFileSets.isEmpty()) {↵ | |
2 | final String message = "File attribute not specified.";↵ | 2 | final String message = "File attribute not specified.";↵ | |
3 | throw new BuildException(message);↵ | 3 | throw new BuildException(message);↵ | |
4 | }↵ | 4 | }↵ | |
5 | if (null != libraryFile && !libraryFile.exists()) {↵ | 5 | if (null != libraryFile && !libraryFile.exists()) {↵ | |
6 | final String message = "File '" + libraryFile + "' does not exist.";↵ | 6 | final String message = "File '" + libraryFile + "' does not exist.";↵ | |
7 | throw new BuildException(message);↵ | 7 | throw new BuildException(message);↵ | |
8 | }↵ | 8 | }↵ | |
9 | if (null != libraryFile && !libraryFile.isFile()) {↵ | 9 | if (null != libraryFile && !libraryFile.isFile()) {↵ | |
10 | final String message = "\'" + libraryFile + "\' is not a file.";↵ | 10 | final String message = "\'" + libraryFile + "\' is not a file.";↵ | |
11 | throw new BuildException(message);↵ | 11 | throw new BuildException(message);↵ | |
12 | } | 12 |
| |
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.9 |
Clones location | Clones are in different classes having the same super class |
Number of node comparisons | 57 |
Number of mapped statements | 9 |
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) | 2.6 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | if (null == libraryFile && libraryFileSets.isEmpty()) |
| 4 | if (null == libraryFile && extensionFileSets.isEmpty()) | ||||||||||
2 | final String message = "File attribute not specified."; | 5 | final String message = "File attribute not specified."; | |||||||||||
3 | throw new BuildException(message); | 6 | throw new BuildException(message); | |||||||||||
4 | if (null != libraryFile && !libraryFile.exists()) | 7 | if (null != libraryFile && !libraryFile.exists()) | |||||||||||
5 | final String message = "File '" + libraryFile + "' does not exist."; | 8 | final String message = "File '" + libraryFile + "' does not exist."; | |||||||||||
6 | throw new BuildException(message); | 9 | throw new BuildException(message); | |||||||||||
7 | if (null != libraryFile && !libraryFile.isFile()) | 10 | if (null != libraryFile && !libraryFile.isFile()) | |||||||||||
8 | final String message = "\'" + libraryFile + "\' is not a file."; | 11 | final String message = "\'" + libraryFile + "\' is not a file."; | |||||||||||
9 | throw new BuildException(message); | 12 | throw new BuildException(message); |
Row | Violation |
---|