File path: /apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/optional/Rpm.java | File path: /apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/ExecTask.java | |||
Method name: void execute()
|
Method name: void runExecute(Execute)
|
|||
Number of AST nodes: 5 | Number of AST nodes: 5 | |||
1 | if (Execute.isFailure(returncode)) {↵ | 1 | if (exe.killedProcess()) {↵ | |
2 | String msg = "'" + toExecute.getExecutable()↵ | 2 | String msg = "↵ | |
3 | + "' failed with exit code " + returncode;↵ | 3 | Timeout: killed the sub-process";↵ | |
4 | if (failOnError) {↵ | 4 | if (failOnError) {↵ | |
5 | throw new BuildException(msg);↵ | 5 | throw new BuildException(msg);↵ | |
6 | } else {↵ | 6 | } else {↵ | |
7 | log(msg, Project.MSG_ERR);↵ | 7 | log(msg, Project.MSG_WARN);↵ | |
8 | }↵ | 8 | }↵ | |
9 | } | 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.2 |
Clones location | Clones are in different classes having the same super class |
Number of node comparisons | 14 |
Number of mapped statements | 5 |
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) | 1.2 |
Clone type | Type 2 |
ID | Statement | ID | Statement | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
40 | if (Execute.isFailure(returncode)) |
| 4 | if (exe.killedProcess()) | |||||||||||||
41 | String msg = "'" + toExecute.getExecutable() + "' failed with exit code " + returncode; |
| 5 | String msg = "Timeout: killed the sub-process"; | |||||||||||||
42 | if (failOnError) | 6 | if (failOnError) | ||||||||||||||
43 | throw new BuildException(msg); | 7 | throw new BuildException(msg); | ||||||||||||||
else | else | ||||||||||||||||
44 | log(msg, Project.MSG_ERR); |
| 8 | log(msg, Project.MSG_WARN); |
Row | Violation |
---|