File path: /apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/optional/clearcase/CCMkattr.java | File path: /apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/optional/clearcase/CCMklabel.java | |||
Method name: void checkOptions(Commandline)
|
Method name: void checkOptions(Commandline)
|
|||
Number of AST nodes: 16 | Number of AST nodes: 14 | |||
1 | if (getReplace()) {↵ | 1 | if (getReplace()) {↵ | |
2 | // -replace↵ | 2 | // -replace↵ | |
3 | cmd.createArgument().setValue(FLAG_REPLACE);↵ | 3 | cmd.createArgument().setValue(FLAG_REPLACE);↵ | |
4 | }↵ | 4 | }↵ | |
5 | if (getRecurse()) {↵ | 5 | if (getRecurse()) {↵ | |
6 | // -recurse↵ | 6 | // -recurse↵ | |
7 | cmd.createArgument().setValue(FLAG_RECURSE);↵ | 7 | cmd.createArgument().setValue(FLAG_RECURSE);↵ | |
8 | }↵ | 8 | }↵ | |
9 | if (getVersion() != null) {↵ | 9 | if (getVersion() != null) {↵ | |
10 | // -version↵ | 10 | // -version↵ | |
11 | getVersionCommand(cmd);↵ | 11 | getVersionCommand(cmd);↵ | |
12 | }↵ | 12 | }↵ | |
13 | if (getComment() != null) {↵ | 13 | if (getComment() != null) {↵ | |
14 | // -c↵ | 14 | // -c↵ | |
15 | getCommentCommand(cmd);↵ | 15 | getCommentCommand(cmd);↵ | |
16 | } else {↵ | 16 | } else {↵ | |
17 | if (getCommentFile() != null) {↵ | 17 | if (getCommentFile() != null) {↵ | |
18 | // -cfile↵ | 18 | // -cfile↵ | |
19 | getCommentFileCommand(cmd);↵ | 19 | getCommentFileCommand(cmd);↵ | |
20 | } else {↵ | 20 | } else {↵ | |
21 | cmd.createArgument().setValue(FLAG_NOCOMMENT);↵ | 21 | cmd.createArgument().setValue(FLAG_NOCOMMENT);↵ | |
22 | }↵ | 22 | }↵ | |
23 | }↵ | 23 | }↵ | |
24 | if (getTypeName() != null) {↵ | 24 | if (getTypeName() != null) {↵ | |
25 | // type↵ | 25 | // type↵ | |
26 | getTypeCommand(cmd);↵ | 26 | getTypeCommand(cmd);↵ | |
27 | }↵ | 27 | }↵ | |
28 | if (getTypeValue() != null) {↵ | |||
29 | // type value↵ | |||
30 | getTypeValueCommand(cmd);↵ | |||
31 | }↵ | |||
32 | // viewpath↵ | 28 | // viewpath↵ | |
33 | cmd.createArgument().setValue(getViewPath()); | 29 |
| |
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) | 1.5 |
Clones location | Clones are in different classes having the same super class |
Number of node comparisons | 85 |
Number of mapped statements | 14 |
Number of unmapped statements in the first code fragment | 2 |
Number of unmapped statements in the second code fragment | 0 |
Time elapsed for statement mapping (ms) | 8.9 |
Clone type | Type 3 |
ID | Statement | ID | Statement | ||||
---|---|---|---|---|---|---|---|
1 | if (getReplace()) | 1 | if (getReplace()) | ||||
2 | cmd.createArgument().setValue(FLAG_REPLACE); | 2 | cmd.createArgument().setValue(FLAG_REPLACE); | ||||
3 | if (getRecurse()) | 3 | if (getRecurse()) | ||||
4 | cmd.createArgument().setValue(FLAG_RECURSE); | 4 | cmd.createArgument().setValue(FLAG_RECURSE); | ||||
5 | if (getVersion() != null) | 5 | if (getVersion() != null) | ||||
6 | getVersionCommand(cmd); | 6 | getVersionCommand(cmd); | ||||
7 | if (getComment() != null) | 7 | if (getComment() != null) | ||||
8 | getCommentCommand(cmd); | 8 | getCommentCommand(cmd); | ||||
else | else | ||||||
9 | if (getCommentFile() != null) | 9 | if (getCommentFile() != null) | ||||
10 | getCommentFileCommand(cmd); | 10 | getCommentFileCommand(cmd); | ||||
else | else | ||||||
11 | cmd.createArgument().setValue(FLAG_NOCOMMENT); | 11 | cmd.createArgument().setValue(FLAG_NOCOMMENT); | ||||
12 | if (getTypeName() != null) | 12 | if (getTypeName() != null) | ||||
13 | getTypeCommand(cmd); | 13 | getTypeCommand(cmd); | ||||
14 | if (getTypeValue() != null) | | |||||
15 | getTypeValueCommand(cmd); |
| | ||||
16 | cmd.createArgument().setValue(getViewPath()); | 14 | cmd.createArgument().setValue(getViewPath()); |
Row | Violation |
---|---|
1 | Unmatched statement getTypeValueCommand(cmd); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |