File path: /apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/optional/vss/MSVSSCHECKOUT.java | File path: /apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/optional/vss/MSVSSGET.java | |||
Method name: Commandline buildCmdLine()
|
Method name: Commandline buildCmdLine()
|
|||
Number of AST nodes: 16 | Number of AST nodes: 16 | |||
1 | Commandline commandLine = new Commandline();↵ | 1 | Commandline commandLine = new Commandline();↵ | |
2 | // first off, make sure that we've got a command and a vssdir ...↵ | |||
3 | if (getVsspath() == null) {↵ | |||
4 | String msg = "vsspath attribute must be set!";↵ | |||
5 | throw new BuildException(msg, getLocation());↵ | |||
6 | }↵ | |||
7 | // build the command line from what we got the format is↵ | 2 | // build the command line from what we got the format is↵ | |
8 | // ss Checkout VSS items [-G] [-C] [-H] [-I-] [-N] [-O] [-R] [-V] [-Y] [-?]↵ | 3 | // ss Get VSS items [-G] [-H] [-I-] [-N] [-O] [-R] [-V] [-W] [-Y] [-?]↵ | |
9 | // as specified in the SS.EXE help↵ | 4 | // as specified in the SS.EXE help↵ | |
10 | commandLine.setExecutable(getSSCommand());↵ | 5 | commandLine.setExecutable(getSSCommand());↵ | |
11 | commandLine.createArgument().setValue(COMMAND_CHECKOUT);↵ | 6 | commandLine.createArgument().setValue(COMMAND_GET);↵ | |
12 | // VSS items↵ | 7 | if (getVsspath() == null) {↵ | |
8 | throw new BuildException("vsspath attribute must be set!", getLocation());↵ | |||
9 | }↵ | |||
13 | commandLine.createArgument().setValue(getVsspath());↵ | 10 | commandLine.createArgument().setValue(getVsspath());↵ | |
14 | // -GL↵ | 11 | // -GL↵ | |
15 | commandLine.createArgument().setValue(getLocalpath());↵ | 12 | commandLine.createArgument().setValue(getLocalpath());↵ | |
16 | // -I- or -I-Y or -I-N↵ | 13 | // -I- or -I-Y or -I-N↵ | |
17 | commandLine.createArgument().setValue(getAutoresponse());↵ | 14 | commandLine.createArgument().setValue(getAutoresponse());↵ | |
15 | // -O-↵ | |||
16 | commandLine.createArgument().setValue(getQuiet());↵ | |||
18 | // -R↵ | 17 | // -R↵ | |
19 | commandLine.createArgument().setValue(getRecursive());↵ | 18 | commandLine.createArgument().setValue(getRecursive());↵ | |
20 | // -V↵ | 19 | // -V↵ | |
21 | commandLine.createArgument().setValue(getVersionDateLabel());↵ | 20 | commandLine.createArgument().setValue(getVersionDateLabel());↵ | |
21 | // -W↵ | |||
22 | commandLine.createArgument().setValue(getWritable());↵ | |||
22 | // -Y↵ | 23 | // -Y↵ | |
23 | commandLine.createArgument().setValue(getLogin());↵ | 24 | commandLine.createArgument().setValue(getLogin());↵ | |
24 | // -G↵ | 25 | // -G↵ | |
25 | commandLine.createArgument().setValue(getFileTimeStamp());↵ | 26 | commandLine.createArgument().setValue(getFileTimeStamp());↵ | |
26 | // -GWS or -GWR↵ | 27 | // -GWS or -GWR↵ | |
27 | commandLine.createArgument().setValue(getWritableFiles());↵ | 28 | commandLine.createArgument().setValue(getWritableFiles());↵ | |
28 | // -G-↵ | |||
29 | commandLine.createArgument().setValue(getGetLocalCopy());↵ | |||
30 | return commandLine; | 29 |
| |
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 | 164 |
Number of mapped statements | 15 |
Number of unmapped statements in the first code fragment | 1 |
Number of unmapped statements in the second code fragment | 1 |
Time elapsed for statement mapping (ms) | 56.8 |
Clone type | Type 3 |
ID | Statement | ID | Statement | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | Commandline commandLine = new Commandline(); | 1 | Commandline commandLine = new Commandline(); | |||||||||||
2 | if (getVsspath() == null) | 4 | if (getVsspath() == null) | |||||||||||
3 | String msg = "vsspath attribute must be set!"; | | ||||||||||||
4 | throw new BuildException(msg, getLocation()); |
| 5 | throw new BuildException("vsspath attribute must be set!", getLocation()); | ||||||||||
5 | commandLine.setExecutable(getSSCommand()); | 2 | commandLine.setExecutable(getSSCommand()); | |||||||||||
6 | commandLine.createArgument().setValue(COMMAND_CHECKOUT); |
| 3 | commandLine.createArgument().setValue(COMMAND_GET); | ||||||||||
7 | commandLine.createArgument().setValue(getVsspath()); | 6 | commandLine.createArgument().setValue(getVsspath()); | |||||||||||
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(getQuiet()); | ||||||||||
11 | commandLine.createArgument().setValue(getVersionDateLabel()); |
| 10 | commandLine.createArgument().setValue(getRecursive()); | ||||||||||
12 | commandLine.createArgument().setValue(getLogin()); |
| 11 | commandLine.createArgument().setValue(getVersionDateLabel()); | ||||||||||
13 | commandLine.createArgument().setValue(getFileTimeStamp()); |
| 12 | commandLine.createArgument().setValue(getWritable()); | ||||||||||
14 | commandLine.createArgument().setValue(getWritableFiles()); |
| 13 | commandLine.createArgument().setValue(getLogin()); | ||||||||||
15 | commandLine.createArgument().setValue(getGetLocalCopy()); |
| 14 | commandLine.createArgument().setValue(getFileTimeStamp()); | ||||||||||
| 15 | commandLine.createArgument().setValue(getWritableFiles()); | ||||||||||||
16 | return commandLine; | 16 | return commandLine; |
Row | Violation |
---|---|
1 | Clone fragment #1 returns variables , while Clone fragment #2 returns variables commandLine |