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 execute()
|
Method name: void execute()
|
|||
Number of AST nodes: 11 | Number of AST nodes: 11 | |||
1 | if (getViewPath() == null) {↵ | 1 | if (getViewPath() == null) {↵ | |
2 | setViewPath(aProj.getBaseDir().getPath());↵ | 2 | setViewPath(aProj.getBaseDir().getPath());↵ | |
3 | }↵ | 3 | }↵ | |
4 | // build the command line from what we got the format is↵ | 4 | // build the command line from what we got the format is↵ | |
5 | // cleartool lock [options...]↵ | 5 | // cleartool lock [options...]↵ | |
6 | // as specified in the CLEARTOOL.EXE help↵ | 6 | // as specified in the CLEARTOOL.EXE help↵ | |
7 | commandLine.setExecutable(getClearToolCommand());↵ | 7 | commandLine.setExecutable(getClearToolCommand());↵ | |
8 | commandLine.createArgument().setValue(COMMAND_LOCK);↵ | 8 | commandLine.createArgument().setValue(COMMAND_UNLOCK);↵ | |
9 | // Check the command line options↵ | 9 | // Check the command line options↵ | |
10 | checkOptions(commandLine);↵ | 10 | checkOptions(commandLine);↵ | |
11 | // For debugging↵ | 11 | // For debugging↵ | |
12 | // System.out.println(commandLine.toString());↵ | 12 | // System.out.println(commandLine.toString());↵ | |
13 | if (!getFailOnErr()) {↵ | 13 | if (!getFailOnErr()) {↵ | |
14 | getProject().log("Ignoring any errors that occur for: "↵ | 14 | getProject().log("Ignoring any errors that occur for: "↵ | |
15 | + getOpType(), Project.MSG_VERBOSE);↵ | 15 | + getOpType(), Project.MSG_VERBOSE);↵ | |
16 | }↵ | 16 | }↵ | |
17 | result = run(commandLine);↵ | 17 | result = run(commandLine);↵ | |
18 | if (Execute.isFailure(result) && getFailOnErr()) {↵ | 18 | if (Execute.isFailure(result) && getFailOnErr()) {↵ | |
19 | String msg = "Failed executing: " + commandLine.toString();↵ | 19 | String msg = "Failed executing: " + commandLine.toString();↵ | |
20 | throw new BuildException(msg, getLocation());↵ | 20 | throw new BuildException(msg, getLocation());↵ | |
21 | } | 21 |
| |
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.6 |
Clones location | Clones are in different classes having the same super class |
Number of node comparisons | 39 |
Number of mapped statements | 11 |
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) | 29.5 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
4 | if (getViewPath() == null) | 4 | if (getViewPath() == null) | |||||||||||
5 | setViewPath(aProj.getBaseDir().getPath()); | 5 | setViewPath(aProj.getBaseDir().getPath()); | |||||||||||
6 | commandLine.setExecutable(getClearToolCommand()); | 6 | commandLine.setExecutable(getClearToolCommand()); | |||||||||||
7 | commandLine.createArgument().setValue(COMMAND_LOCK); |
| 7 | commandLine.createArgument().setValue(COMMAND_UNLOCK); | ||||||||||
8 | checkOptions(commandLine); | 8 | checkOptions(commandLine); | |||||||||||
9 | if (!getFailOnErr()) | 9 | if (!getFailOnErr()) | |||||||||||
10 | getProject().log("Ignoring any errors that occur for: " + getOpType(), Project.MSG_VERBOSE); | 10 | getProject().log("Ignoring any errors that occur for: " + getOpType(), Project.MSG_VERBOSE); | |||||||||||
11 | result = run(commandLine); | 11 | result = run(commandLine); | |||||||||||
12 | if (Execute.isFailure(result) && getFailOnErr()) | 12 | if (Execute.isFailure(result) && getFailOnErr()) | |||||||||||
13 | String msg = "Failed executing: " + commandLine.toString(); | 13 | String msg = "Failed executing: " + commandLine.toString(); | |||||||||||
14 | throw new BuildException(msg, getLocation()); | 14 | throw new BuildException(msg, getLocation()); |
Row | Violation |
---|