File path: /apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/optional/sos/SOSGet.java | File path: /apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/optional/sos/SOSGet.java | |||
Method name: Commandline buildCmdLine()
|
Method name: Commandline buildCmdLine()
|
|||
Number of AST nodes: 7 | Number of AST nodes: 6 | |||
1 | commandLine.createArgument().setValue(SOSCmd.FLAG_COMMAND);↵ | 1 | commandLine.createArgument().setValue(SOSCmd.FLAG_COMMAND);↵ | |
2 | commandLine.createArgument().setValue(SOSCmd.COMMAND_GET_FILE);↵ | 2 | commandLine.createArgument().setValue(SOSCmd.COMMAND_GET_PROJECT);↵ | |
3 | // add -file xxxxx to the commandline↵ | 3 | // ↵ | |
4 | commandLine.createArgument().setValue(SOSCmd.FLAG_FILE);↵ | 4 | look for a recursive option↵ | |
5 | commandLine.createArgument().setValue(getFilename());↵ | 5 | commandLine.createArgument().setValue(getRecursive());↵ | |
6 | // look for a version attribute↵ | 6 | // look for a label option↵ | |
7 | if (getVersion() != null) {↵ | 7 | if (getLabel() != null) {↵ | |
8 | //add -revision xxxxx to the commandline↵ | |||
9 | commandLine.createArgument().setValue(SOSCmd.FLAG_VERSION);↵ | 8 | commandLine.createArgument().setValue(SOSCmd.FLAG_LABEL);↵ | |
10 | commandLine.createArgument().setValue(getVersion());↵ | 9 | commandLine.createArgument().setValue(getLabel());↵ | |
11 | } | 10 |
| |
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 the same method |
Number of node comparisons | 21 |
Number of mapped statements | 6 |
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) | 3.4 |
Clone type | Type 3 |
ID | Statement | ID | Statement | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
3 | commandLine.createArgument().setValue(SOSCmd.FLAG_COMMAND); | 10 | commandLine.createArgument().setValue(SOSCmd.FLAG_COMMAND); | |||||||||||
4 | commandLine.createArgument().setValue(SOSCmd.COMMAND_GET_FILE); |
| 11 | commandLine.createArgument().setValue(SOSCmd.COMMAND_GET_PROJECT); | ||||||||||
5 | commandLine.createArgument().setValue(SOSCmd.FLAG_FILE); |
| 12 | commandLine.createArgument().setValue(getRecursive()); | ||||||||||
6 | commandLine.createArgument().setValue(getFilename()); |
| | |||||||||||
7 | if (getVersion() != null) |
| 13 | if (getLabel() != null) | ||||||||||
8 | commandLine.createArgument().setValue(SOSCmd.FLAG_VERSION); |
| 14 | commandLine.createArgument().setValue(SOSCmd.FLAG_LABEL); | ||||||||||
9 | commandLine.createArgument().setValue(getVersion()); |
| 15 | commandLine.createArgument().setValue(getLabel()); |
Row | Violation |
---|---|
1 | Unmatched statement commandLine.createArgument().setValue(getFilename()); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |