File path: /apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/optional/clearcase/CCMkbl.java | File path: /apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/optional/clearcase/CCCheckin.java | |||
Method name: void checkOptions(Commandline)
|
Method name: void checkOptions(Commandline)
|
|||
Number of AST nodes: 13 | Number of AST nodes: 14 | |||
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 (getIdentical()) {↵ | 12 | if (getNoWarn()) {↵ | |
13 | // -identical↵ | 13 | // -nwarn↵ | |
14 | cmd.createArgument().setValue(FLAG_IDENTICAL);↵ | 14 | cmd.createArgument().setValue(FLAG_NOWARN);↵ | |
15 | }↵ | 15 | }↵ | |
16 | if (getFull()) {↵ | 16 | if (getPreserveTime()) {↵ | |
17 | // -full↵ | 17 | // -↵ | |
18 | ptime↵ | |||
18 | cmd.createArgument().setValue(FLAG_FULL);↵ | 19 | cmd.createArgument().setValue(FLAG_↵ | |
19 | } else↵ | 20 | PRESERVETIME);↵ | |
21 | }↵ | |||
20 | {↵ | 22 | if (getKeepCopy()) {↵ | |
21 | // -incremental↵ | 23 | // -↵ | |
24 | keep↵ | |||
22 | cmd.createArgument().setValue(FLAG_INCREMENTAL);↵ | 25 | cmd.createArgument().setValue(FLAG_KEEPCOPY);↵ | |
23 | }↵ | 26 | }↵ | |
24 | if (getNlabel()) {↵ | 27 | if (getIdentical()) {↵ | |
25 | // -nlabel↵ | 28 | // -identical↵ | |
26 | cmd.createArgument().setValue(FLAG_NLABEL);↵ | 29 | cmd.createArgument().setValue(FLAG_IDENTICAL);↵ | |
27 | }↵ | 30 | }↵ | |
28 | // baseline_root_name↵ | 31 | // viewpath↵ | |
29 | cmd.createArgument().setValue(getBaselineRootName()); | 32 | cmd.createArgument().setValue(getViewPath()); | |
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.7 |
Clones location | Clones are in different classes having the same super class |
Number of node comparisons | 60 |
Number of mapped statements | 11 |
Number of unmapped statements in the first code fragment | 1 |
Number of unmapped statements in the second code fragment | 0 |
Time elapsed for statement mapping (ms) | 7.9 |
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 (getIdentical()) |
| 6 | if (getNoWarn()) | ||||||||||
7 | cmd.createArgument().setValue(FLAG_IDENTICAL); |
| 7 | cmd.createArgument().setValue(FLAG_NOWARN); | ||||||||||
8 | if (getFull()) |
| 8 | if (getPreserveTime()) | ||||||||||
9 | cmd.createArgument().setValue(FLAG_FULL); |
| 9 | cmd.createArgument().setValue(FLAG_PRESERVETIME); | ||||||||||
else | | |||||||||||||
10 | cmd.createArgument().setValue(FLAG_INCREMENTAL); |
| | |||||||||||
11 | if (getNlabel()) |
| 10 | if (getKeepCopy()) | ||||||||||
12 | cmd.createArgument().setValue(FLAG_NLABEL); |
| 11 | cmd.createArgument().setValue(FLAG_KEEPCOPY); |
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 |