File path: /apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/optional/ccm/CCMReconfigure.java | File path: /apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/optional/ccm/CCMCheck.java | |||
Method name: void execute()
|
Method name: void doit()
|
|||
Number of AST nodes: 9 | Number of AST nodes: 8 | |||
1 | Commandline commandLine = new Commandline();↵ | 1 | Commandline commandLine = new Commandline();↵ | |
2 | int result = 0;↵ | |||
3 | // build the command line from what we got the format↵ | 2 | // build the command line from what we got the format is↵ | |
3 | // ccm co /t .. files↵ | |||
4 | // as specified in the CCM.EXE help↵ | 4 | // as specified in the CCM.EXE help↵ | |
5 | commandLine.setExecutable(getCcmCommand());↵ | 5 | commandLine.setExecutable(getCcmCommand());↵ | |
6 | commandLine.createArgument().setValue(getCcmAction());↵ | 6 | commandLine.createArgument().setValue(getCcmAction());↵ | |
7 | checkOptions(commandLine);↵ | 7 | checkOptions(commandLine);↵ | |
8 | result = run(commandLine);↵ | 8 | int result = run(commandLine);↵ | |
9 | if (Execute.isFailure(result)) {↵ | 9 | if (Execute.isFailure(result)) {↵ | |
10 | String msg = "Failed executing: " + commandLine.toString();↵ | 10 | String msg = "Failed executing: " + commandLine.toString();↵ | |
11 | throw new BuildException(msg, getLocation());↵ | 11 | throw new BuildException(msg, getLocation());↵ | |
12 | } | 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 | 27 |
Number of mapped statements | 8 |
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.9 |
Clone type | Type 3 |
ID | Statement | ID | Statement | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | Commandline commandLine = new Commandline(); | 1 | Commandline commandLine = new Commandline(); | ||||||||||||
2 | int result = 0; |
| 5 | int result = run(commandLine); | |||||||||||
3 | commandLine.setExecutable(getCcmCommand()); | 2 | commandLine.setExecutable(getCcmCommand()); | ||||||||||||
4 | commandLine.createArgument().setValue(getCcmAction()); | 3 | commandLine.createArgument().setValue(getCcmAction()); | ||||||||||||
5 | checkOptions(commandLine); | 4 | checkOptions(commandLine); | ||||||||||||
6 | result = run(commandLine); |
| | ||||||||||||
7 | if (Execute.isFailure(result)) | 6 | if (Execute.isFailure(result)) | ||||||||||||
8 | String msg = "Failed executing: " + commandLine.toString(); | 7 | String msg = "Failed executing: " + commandLine.toString(); | ||||||||||||
9 | throw new BuildException(msg, getLocation()); | 8 | throw new BuildException(msg, getLocation()); |
Row | Violation |
---|---|
1 | Expression run(commandLine) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
2 | Unmatched statement result=run(commandLine); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
3 | Clone fragment #1 returns variables commandLine, result , while Clone fragment #2 returns variables |