if (getComment() != null) {
// -c
getCommentCommand(cmd);
} else {
if (getCommentFile() != null) {
// -cfile
getCommentFileCommand(cmd);
} else {
cmd.createArgument().setValue(FLAG_NOCOMMENT);
}
}
if (getComment() != null) {
// -c
getCommentCommand(cmd);
} else {
if (getCommentFile() != null) {
// -cfile
getCommentFileCommand(cmd);
} else {
cmd.createArgument().setValue(FLAG_NOCOMMENT);
}
}
Clone fragments detected by clone detection tool
File path: /apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/optional/clearcase/CCCheckout.java
|
|
File path: /apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/optional/clearcase/CCMklbtype.java
|
Method name: void checkOptions(Commandline)
|
|
Method name: void checkOptions(Commandline)
|
Number of AST nodes: 5
|
|
Number of AST nodes: 5
|
|
1 | if (getComment() != null) {↵ | | 1 | if (getComment() != null) {↵
|
2 | // -c↵ | | 2 | // -c↵
|
3 | getCommentCommand(cmd);↵ | | 3 | getCommentCommand(cmd);↵
|
4 | } else {↵ | | 4 | } else {↵
|
5 | if (getCommentFile() != null) {↵ | | 5 | if (getCommentFile() != null) {↵
|
6 | // -cfile↵ | | 6 | // -cfile↵
|
7 | getCommentFileCommand(cmd);↵ | | 7 | getCommentFileCommand(cmd);↵
|
8 | } else {↵ | | 8 | } else {↵
|
9 | cmd.createArgument().setValue(FLAG_NOCOMMENT);↵ | | 9 | cmd.createArgument().setValue(FLAG_NOCOMMENT);↵
|
10 | }↵ | | 10 | }↵
|
11 | } | | 11 | }
|
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 | 13 |
-
{Refactorable}
Mapping Summary
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) | 12.3 |
Clone type | Type 1 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
14 | if (getComment() != null) | | 11 | if (getComment() != null) |
15 | | | 12 | |
| | | | |
16 | if (getCommentFile() != null) | | 13 | if (getCommentFile() != null) |
17 | getCommentFileCommand(cmd); | | 14 | getCommentFileCommand(cmd); |
| | | | |
18 | cmd.createArgument().setValue(FLAG_NOCOMMENT); | | 15 | cmd.createArgument().setValue(FLAG_NOCOMMENT); |
Precondition Violations (0)
Row |
Violation |