File path: /apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/optional/vss/MSVSSCHECKIN.java | File path: /apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/optional/vss/MSVSSADD.java | |||
Method name: Commandline buildCmdLine()
|
Method name: Commandline buildCmdLine()
|
|||
Number of AST nodes: 14 | Number of AST nodes: 13 | |||
1 | Commandline commandLine = new Commandline();↵ | 1 | Commandline commandLine = new Commandline();↵ | |
2 | // first off, make sure that we've got a command and a vssdir ...↵ | 2 | // first off, make sure that we've got a command and a localPath ...↵ | |
3 | if (getVsspath() == null) {↵ | 3 | if (getLocalpath() == null) {↵ | |
4 | String msg = "vsspath attribute must be set!";↵ | 4 | String msg = "localPath attribute must be set!";↵ | |
5 | throw new BuildException(msg, getLocation());↵ | 5 | throw new BuildException(msg, getLocation());↵ | |
6 | }↵ | 6 | }↵ | |
7 | // build the command line from what we got the format is↵ | 7 | // build the command line from what we got the format is↵ | |
8 | // ss Checkin VSS items [-H] [-C] [-I-] [-N] [-O] [-R] [-W] [-Y] [-?]↵ | 8 | // ss Add VSS items [-B] [-C] [-D-] [-H] [-I-] [-K] [-N] [-O] [-R] [-W] [-Y] [-?]↵ | |
9 | // as specified in the SS.EXE help↵ | 9 | // as specified in the SS.EXE help↵ | |
10 | commandLine.setExecutable(getSSCommand());↵ | 10 | commandLine.setExecutable(getSSCommand());↵ | |
11 | commandLine.createArgument().setValue(COMMAND_CHECKIN);↵ | 11 | commandLine.createArgument().setValue(COMMAND_ADD);↵ | |
12 | // VSS items↵ | 12 | // VSS items↵ | |
13 | commandLine.createArgument().setValue(getVsspath());↵ | |||
14 | // -GL↵ | |||
15 | commandLine.createArgument().setValue(getLocalpath());↵ | 13 | commandLine.createArgument().setValue(getLocalpath());↵ | |
16 | // -I- or -I-Y or -I-N↵ | 14 | // -I- or -I-Y or -I-N↵ | |
17 | commandLine.createArgument().setValue(getAutoresponse());↵ | 15 | commandLine.createArgument().setValue(getAutoresponse());↵ | |
18 | // -R↵ | 16 | // -R↵ | |
19 | commandLine.createArgument().setValue(getRecursive());↵ | 17 | commandLine.createArgument().setValue(getRecursive());↵ | |
20 | // -W↵ | 18 | // -W↵ | |
21 | commandLine.createArgument().setValue(getWritable());↵ | 19 | commandLine.createArgument().setValue(getWritable());↵ | |
22 | // -Y↵ | 20 | // -Y↵ | |
23 | commandLine.createArgument().setValue(getLogin());↵ | 21 | commandLine.createArgument().setValue(getLogin());↵ | |
24 | // -C↵ | 22 | // -C↵ | |
25 | commandLine.createArgument().setValue(getComment());↵ | 23 | commandLine.createArgument().setValue(getComment());↵ | |
26 | return commandLine; | 24 |
| |
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.2 |
Clones location | Clones are in different classes having the same super class |
Number of node comparisons | 101 |
Number of mapped statements | 13 |
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) | 17.1 |
Clone type | Type 3 |
ID | Statement | ID | Statement | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | Commandline commandLine = new Commandline(); | 1 | Commandline commandLine = new Commandline(); | |||||||||||
2 | if (getVsspath() == null) |
| 2 | if (getLocalpath() == null) | ||||||||||
3 | String msg = "vsspath attribute must be set!"; |
| 3 | String msg = "localPath attribute must be set!"; | ||||||||||
4 | throw new BuildException(msg, getLocation()); | 4 | throw new BuildException(msg, getLocation()); | |||||||||||
5 | commandLine.setExecutable(getSSCommand()); | 5 | commandLine.setExecutable(getSSCommand()); | |||||||||||
6 | commandLine.createArgument().setValue(COMMAND_CHECKIN); |
| | |||||||||||
7 | commandLine.createArgument().setValue(getVsspath()); |
| 6 | commandLine.createArgument().setValue(COMMAND_ADD); | ||||||||||
8 | commandLine.createArgument().setValue(getLocalpath()); | 7 | commandLine.createArgument().setValue(getLocalpath()); | |||||||||||
9 | commandLine.createArgument().setValue(getAutoresponse()); | 8 | commandLine.createArgument().setValue(getAutoresponse()); | |||||||||||
10 | commandLine.createArgument().setValue(getRecursive()); | 9 | commandLine.createArgument().setValue(getRecursive()); | |||||||||||
11 | commandLine.createArgument().setValue(getWritable()); | 10 | commandLine.createArgument().setValue(getWritable()); | |||||||||||
12 | commandLine.createArgument().setValue(getLogin()); | 11 | commandLine.createArgument().setValue(getLogin()); | |||||||||||
13 | commandLine.createArgument().setValue(getComment()); | 12 | commandLine.createArgument().setValue(getComment()); | |||||||||||
14 | return commandLine; | 13 | return commandLine; |
Row | Violation |
---|---|
1 | Unmatched statement commandLine.createArgument().setValue(COMMAND_CHECKIN); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
2 | Clone fragment #1 returns variables commandLine , while Clone fragment #2 returns variables |