File path: /apache-ant-1.7.0/src/tests/antunit/core/uuencode/src/task/BaseTask.java | File path: /apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/Available.java | |||
Method name: void assertAttribute(File, String)
|
Method name: boolean eval()
|
|||
Number of AST nodes: 2 | Number of AST nodes: 3 | |||
1 | if (type != null) {↵ | |||
1 | if (file == null) {↵ | 2 | if (file == null) {↵ | |
2 | throw new BuildException("Required attribute " + attributeName↵ | 3 | throw new BuildException("The type attribute ↵ | |
4 | is only valid "↵ | |||
5 | + "when specifying the file "↵ | |||
3 | + " not set");↵ | 6 | + "↵ | |
7 | attribute.", getLocation());↵ | |||
8 | }↵ | |||
4 | } | 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.1 |
Clones location | Clones are in different classes having the same super class |
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) | 4.6 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | if (file == null) | 5 | if (file == null) | |||||||||||
2 | throw new BuildException("Required attribute " + attributeName + " not set"); |
| 6 | throw new BuildException("The type attribute is only valid " + "when specifying the file " + "attribute.", getLocation()); |
Row | Violation |
---|