File path: /apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/Available.java | File path: /apache-ant-1.7.0/src/org/apache/tools/ant/util/ScriptRunnerBase.java | |||
Method name: boolean eval()
|
Method name: void checkLanguage()
|
|||
Number of AST nodes: 3 | Number of AST nodes: 2 | |||
1 | if (type != null) {↵ | 1 | if (↵ | |
2 | if (file == null) {↵ | 2 | language == null) {↵ | |
3 | throw new BuildException("The type attribute is only valid "↵ | 3 | throw new BuildException(↵ | |
4 | + "when specifying the file "↵ | |||
5 | + "attribute.", getLocation());↵ | |||
6 | }↵ | |||
7 | ↵ | |||
4 | "script language must be specified");↵ | |||
8 | } | 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.1 |
Clones location | Clones are in different classes |
Number of node comparisons | 4 |
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) | 0.4 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
5 | if (file == null) |
| 1 | if (language == null) | ||||||||||||||
6 | throw new BuildException("The type attribute is only valid " + "when specifying the file " + "attribute.", getLocation()); |
| 2 | throw new BuildException("script language must be specified"); |
Row | Violation |
---|---|
1 | Type java.io.File of variable file does not match with type java.lang.String of variable language |