File path: /apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/optional/clearcase/CCCheckin.java | File path: /apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/optional/clearcase/CCMkbl.java | |||
Method name: void checkOptions(Commandline)
|
Method name: void checkOptions(Commandline)
|
|||
Number of AST nodes: 14 | Number of AST nodes: 13 | |||
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 | }↵ | |
12 | if (getNoWarn()) {↵ | 12 | if (getIdentical()) {↵ | |
13 | // -nwarn↵ | 13 | // -identical↵ | |
14 | cmd.createArgument().setValue(FLAG_NOWARN);↵ | 14 | cmd.createArgument().setValue(FLAG_IDENTICAL);↵ | |
15 | }↵ | 15 | }↵ | |
16 | if (getPreserveTime()) {↵ | 16 | if (getFull()) {↵ | |
17 | // -ptime↵ | 17 | // -↵ | |
18 | ↵ | 18 | full↵ | |
19 | cmd.createArgument().setValue(FLAG_PRESERVETIME);↵ | 19 | cmd.createArgument().setValue(FLAG_↵ | |
20 | }↵ | |||
21 | if (getKeepCopy())↵ | 20 | FULL);↵ | |
22 | {↵ | 21 | } else {↵ | |
23 | // -keep↵ | 22 | // -↵ | |
24 | ↵ | 23 | incremental↵ | |
25 | cmd.createArgument().setValue(FLAG_KEEPCOPY);↵ | 24 | cmd.createArgument().setValue(FLAG_INCREMENTAL);↵ | |
26 | }↵ | 25 | }↵ | |
27 | if (getIdentical()) {↵ | 26 | if (getNlabel()) {↵ | |
28 | // -identical↵ | 27 | // -nlabel↵ | |
29 | cmd.createArgument().setValue(FLAG_IDENTICAL);↵ | 28 | cmd.createArgument().setValue(FLAG_NLABEL);↵ | |
30 | }↵ | 29 | }↵ | |
31 | // viewpath↵ | 30 | // baseline_root_name↵ | |
32 | cmd.createArgument().setValue(getViewPath()); | 31 | cmd.createArgument().setValue(getBaselineRootName()); | |
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.9 |
Clones location | Clones are in different classes having the same super class |
Number of node comparisons | 65 |
Number of mapped statements | 11 |
Number of unmapped statements in the first code fragment | 0 |
Number of unmapped statements in the second code fragment | 1 |
Time elapsed for statement mapping (ms) | 13.1 |
Clone type | Type 3 |
ID | Statement | ID | Statement | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | if (getComment() != null) | 1 | if (getComment() != null) | |||||||||||
2 | getCommentCommand(cmd); | 2 | getCommentCommand(cmd); | |||||||||||
else | else | |||||||||||||
3 | if (getCommentFile() != null) | 3 | if (getCommentFile() != null) | |||||||||||
4 | getCommentFileCommand(cmd); | 4 | getCommentFileCommand(cmd); | |||||||||||
else | else | |||||||||||||
5 | cmd.createArgument().setValue(FLAG_NOCOMMENT); | 5 | cmd.createArgument().setValue(FLAG_NOCOMMENT); | |||||||||||
6 | if (getNoWarn()) |
| 6 | if (getIdentical()) | ||||||||||
7 | cmd.createArgument().setValue(FLAG_NOWARN); |
| 7 | cmd.createArgument().setValue(FLAG_IDENTICAL); | ||||||||||
8 | if (getPreserveTime()) |
| 8 | if (getFull()) | ||||||||||
9 | cmd.createArgument().setValue(FLAG_PRESERVETIME); |
| 9 | cmd.createArgument().setValue(FLAG_FULL); | ||||||||||
| else | |||||||||||||
|
| 10 | cmd.createArgument().setValue(FLAG_INCREMENTAL); | |||||||||||
10 | if (getKeepCopy()) |
| 11 | if (getNlabel()) | ||||||||||
11 | cmd.createArgument().setValue(FLAG_KEEPCOPY); |
| 12 | cmd.createArgument().setValue(FLAG_NLABEL); |
Row | Violation |
---|---|
1 | Unmatched statement cmd.createArgument().setValue(FLAG_INCREMENTAL); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |