if (!getFailOnErr()) {
getProject().log("Ignoring any errors that occur for: "
+ getViewPathBasename(), Project.MSG_VERBOSE);
}
result = run(commandLine);
if (Execute.isFailure(result) && getFailOnErr()) {
String msg = "Failed executing: " + commandLine.toString();
throw new BuildException(msg, getLocation());
}
if (!getFailOnErr()) {
getProject().log("Ignoring any errors that occur for: "
+ getOpType(), Project.MSG_VERBOSE);
}
result = run(commandLine);
if (Execute.isFailure(result) && getFailOnErr()) {
String msg = "Failed executing: " + commandLine.toString();
throw new BuildException(msg, getLocation());
}
Clone fragments detected by clone detection tool
File path: /apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/optional/clearcase/CCUnCheckout.java
|
|
File path: /apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/optional/clearcase/CCLock.java
|
Method name: void execute()
|
|
Method name: void execute()
|
Number of AST nodes: 6
|
|
Number of AST nodes: 6
|
|
1 | if (!getFailOnErr()) {↵ | | 1 | if (!getFailOnErr()) {↵
|
2 | getProject().log("Ignoring any errors that occur for: "↵ | | 2 | getProject().log("Ignoring any errors that occur for: "↵
|
3 | + getViewPathBasename(), Project.MSG_VERBOSE);↵ | | 3 | + getOpType(), Project.MSG_VERBOSE);↵
|
4 | }↵ | | 4 | }↵
|
5 | result = run(commandLine);↵ | | 5 | result = run(commandLine);↵
|
6 | if (Execute.isFailure(result) && getFailOnErr()) {↵ | | 6 | if (Execute.isFailure(result) && getFailOnErr()) {↵
|
7 | String msg = "Failed executing: " + commandLine.toString();↵ | | 7 | String msg = "Failed executing: " + commandLine.toString();↵
|
8 | throw new BuildException(msg, getLocation());↵ | | 8 | throw new BuildException(msg, getLocation());↵
|
9 | } | | 9 | }
|
See real code fragment |
|
See real code fragment |
Summary
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.3 |
Clones location | Clones are in different classes having the same super class |
Number of node comparisons | 16 |
-
{Refactorable}
Mapping Summary
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) | 12.9 |
Clone type | Type 2 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
9 | if (!getFailOnErr()) | | 9 | if (!getFailOnErr()) |
10 | getProject().log("Ignoring any errors that occur for: " + getViewPathBasename(), Project.MSG_VERBOSE); | | 10 | getProject().log("Ignoring any errors that occur for: " + getOpType(), Project.MSG_VERBOSE); |
11 | result = run(commandLine); | | 11 | result = run(commandLine); |
12 | if (Execute.isFailure(result) && getFailOnErr()) | | 12 | if (Execute.isFailure(result) && getFailOnErr()) |
13 | String msg = "Failed executing: " + commandLine.toString(); | | 13 | String msg = "Failed executing: " + commandLine.toString(); |
14 | throw new BuildException(msg, getLocation()); | | 14 | throw new BuildException(msg, getLocation()); |
Precondition Violations (0)
Row |
Violation |