File path: /apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/ExecTask.java | File path: /apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/optional/XMLValidateTask.java | |||
Method name: void runExecute(Execute)
|
Method name: void execute()
|
|||
Number of AST nodes: 5 | Number of AST nodes: 4 | |||
1 | if (exe.killedProcess()) {↵ | |||
2 | String msg = "Timeout: killed the sub-process";↵ | 1 | String errorMsg = "File " + file + " cannot be read";↵ | |
3 | if (failOnError) {↵ | 2 | if (failOnError) {↵ | |
4 | throw new BuildException(msg);↵ | 3 | throw new BuildException(errorMsg);↵ | |
5 | } else {↵ | 4 | } else {↵ | |
6 | log(msg, Project.MSG_WARN);↵ | 5 | log(errorMsg, Project.MSG_ERR);↵ | |
7 | }↵ | 6 | ↵ | |
8 | } | 7 |
| |
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 | 10 |
Number of mapped statements | 4 |
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.8 |
Clone type | Type 2 |
ID | Statement | ID | Statement | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
5 | String msg = "Timeout: killed the sub-process"; |
| 8 | String errorMsg = "File " + file + " cannot be read"; | |||||||||||||
6 | if (failOnError) | 9 | if (failOnError) | ||||||||||||||
7 | throw new BuildException(msg); |
| 10 | throw new BuildException(errorMsg); | |||||||||||||
else | else | ||||||||||||||||
8 | log(msg, Project.MSG_WARN); |
| 11 | log(errorMsg, Project.MSG_ERR); |
Row | Violation |
---|