File path: /apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/optional/clearcase/CCLock.java | File path: /apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/optional/clearcase/CCUnlock.java | |||
Method name: void checkOptions(Commandline)
|
Method name: void checkOptions(Commandline)
|
|||
Number of AST nodes: 6 | Number of AST nodes: 6 | |||
1 | getCommentCommand(cmd);↵ | 1 | getCommentCommand(cmd);↵ | |
2 | if (getObjselect() == null && getPname() == null) {↵ | 2 | if (getObjSelect() == null && getPname() == null) {↵ | |
3 | throw new BuildException("Should select either an element "↵ | 3 | throw new BuildException("Should select either an element "↵ | |
4 | + "(pname) or an object (objselect)");↵ | 4 | + "(pname) or an object (objselect)");↵ | |
5 | }↵ | 5 | }↵ | |
6 | getPnameCommand(cmd);↵ | 6 | getPnameCommand(cmd);↵ | |
7 | // object selector↵ | 7 | // object selector↵ | |
8 | if (getObjselect() != null) {↵ | 8 | if (getObjSelect() != null) {↵ | |
9 | cmd.createArgument().setValue(getObjselect());↵ | 9 | cmd.createArgument().setValue(getObjSelect());↵ | |
10 | } | 10 |
| |
See real code fragment | See real code fragment |
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.5 |
Clones location | Clones are in different classes having the same super class |
Number of node comparisons | 14 |
Number of mapped statements | 6 |
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) | 15.0 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
6 | getCommentCommand(cmd); | 1 | getCommentCommand(cmd); | |||||||||||
7 | if (getObjselect() == null && getPname() == null) |
| 2 | if (getObjSelect() == null && getPname() == null) | ||||||||||
8 | throw new BuildException("Should select either an element " + "(pname) or an object (objselect)"); | 3 | throw new BuildException("Should select either an element " + "(pname) or an object (objselect)"); | |||||||||||
9 | getPnameCommand(cmd); | 4 | getPnameCommand(cmd); | |||||||||||
10 | if (getObjselect() != null) |
| 5 | if (getObjSelect() != null) | ||||||||||
11 | cmd.createArgument().setValue(getObjselect()); |
| 6 | cmd.createArgument().setValue(getObjSelect()); |
Row | Violation |
---|