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/CCUpdate.java | |||
Method name: void checkOptions(Commandline)
|
Method name: void checkOptions(Commandline)
|
|||
Number of AST nodes: 4 | Number of AST nodes: 3 | |||
1 | if (getKeepCopy()) {↵ | 1 | if (getRename()) {↵ | |
2 | // -keep↵ | 2 | ↵ | |
3 | // -rename↵ | |||
3 | cmd.createArgument().setValue(FLAG_KEEPCOPY);↵ | 4 | cmd.createArgument().setValue(FLAG_↵ | |
5 | RENAME);↵ | |||
4 | } else {↵ | 6 | } else {↵ | |
5 | // -rm↵ | 7 | ↵ | |
8 | // -noverwrite↵ | |||
6 | cmd.createArgument().setValue(FLAG_RM);↵ | 9 | cmd.createArgument().setValue(FLAG_NOVERWRITE);↵ | |
7 | }↵ | 10 | ↵ | |
8 | // viewpath↵ | 11 | ↵ | |
9 | cmd.createArgument().setValue(getViewPath()); | 12 |
| |
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.1 |
Clones location | Clones are in different classes having the same super class |
Number of node comparisons | 9 |
Number of mapped statements | 3 |
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) | 1.1 |
Clone type | Type 3 |
ID | Statement | ID | Statement | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | if (getKeepCopy()) |
| 5 | if (getRename()) | ||||||||||
2 | cmd.createArgument().setValue(FLAG_KEEPCOPY); |
| 6 | cmd.createArgument().setValue(FLAG_RENAME); | ||||||||||
else | else | |||||||||||||
3 | cmd.createArgument().setValue(FLAG_RM); |
| 7 | cmd.createArgument().setValue(FLAG_NOVERWRITE); | ||||||||||
4 | cmd.createArgument().setValue(getViewPath()); |
| |
Row | Violation |
---|---|
1 | Unmatched statement cmd.createArgument().setValue(getViewPath()); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |