File path: /apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/optional/net/FTP.java | File path: /apache-ant-1.7.0/src/tests/junit/org/apache/tools/ant/types/mappers/MapperResult.java | |||
Method name: void checkAttributes()
|
Method name: void execute()
|
|||
Number of AST nodes: 6 | Number of AST nodes: 6 | |||
1 | if (server == null) {↵ | 1 | if (input == null) {↵ | |
2 | throw new BuildException("server attribute must be set!");↵ | 2 | throw new BuildException("Missing attribute 'input'");↵ | |
3 | }↵ | 3 | }↵ | |
4 | if (userid == null) {↵ | 4 | if (output == null) {↵ | |
5 | throw new BuildException("userid attribute must be set!");↵ | 5 | throw new BuildException("Missing attribute 'output'");↵ | |
6 | }↵ | 6 | }↵ | |
7 | if (password == null) {↵ | 7 | if (fileNameMapper == null) {↵ | |
8 | throw new BuildException("password attribute must be set!");↵ | 8 | throw new BuildException("Missing a nested file name mapper type element");↵ | |
9 | } | 9 |
| |
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.6 |
Clones location | Clones are in different classes having the same super class |
Number of node comparisons | 27 |
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) | 2.4 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | if (server == null) |
| 1 | if (input == null) | ||||||||||||||
2 | throw new BuildException("server attribute must be set!"); |
| 2 | throw new BuildException("Missing attribute 'input'"); | ||||||||||||||
3 | if (userid == null) |
| 3 | if (output == null) | ||||||||||||||
4 | throw new BuildException("userid attribute must be set!"); |
| 4 | throw new BuildException("Missing attribute 'output'"); | ||||||||||||||
5 | if (password == null) |
| 5 | if (fileNameMapper == null) | ||||||||||||||
6 | throw new BuildException("password attribute must be set!"); |
| 6 | throw new BuildException("Missing a nested file name mapper type element"); |
Row | Violation |
---|---|
1 | Type java.lang.String of variable password does not match with type org.apache.tools.ant.util.FileNameMapper of variable fileNameMapper |