File path: /apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/optional/vss/MSVSSCREATE.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: 9 | Number of AST nodes: 9 | |||
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↵ | 7 | // build the command line from what we got↵ | |
8 | // the format is:↵ | 8 | the format is↵ | |
9 | // ss Create VSS items [-C] [-H] [-I-] [-N] [-O] [-S] [-Y] [-?]↵ | 9 | // ss Add VSS items [-B] [-C] [-D-] [-H] [-I-] [-K] [-N] [-O] [-R] [-W] [-Y] [-?]↵ | |
10 | // as specified in the SS.EXE help↵ | 10 | // as specified in the SS.EXE help↵ | |
11 | commandLine.setExecutable(getSSCommand());↵ | 11 | commandLine.setExecutable(getSSCommand());↵ | |
12 | commandLine.createArgument().setValue(COMMAND_CREATE);↵ | 12 | commandLine.createArgument().setValue(COMMAND_ADD);↵ | |
13 | // VSS items↵ | 13 | // VSS items↵ | |
14 | commandLine.createArgument().setValue(getVsspath());↵ | 14 | commandLine.createArgument().setValue(getLocalpath());↵ | |
15 | // -C↵ | 15 | // -I- or -I-Y or -I-N↵ | |
16 | commandLine.createArgument().setValue(getComment());↵ | 16 | commandLine.createArgument().setValue(getAutoresponse());↵ | |
17 | // -I- or -I-Y or -I-N↵ | 17 | // -R↵ | |
18 | commandLine.createArgument().setValue(getAutoresponse()); | 18 | commandLine.createArgument().setValue(getRecursive()); | |
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.1 |
Clones location | Clones are in different classes having the same super class |
Number of node comparisons | 45 |
Number of mapped statements | 9 |
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) | 25.9 |
Clone type | Type 2 |
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_CREATE); |
| 6 | commandLine.createArgument().setValue(COMMAND_ADD); | ||||||||||
7 | commandLine.createArgument().setValue(getVsspath()); |
| 7 | commandLine.createArgument().setValue(getLocalpath()); | ||||||||||
8 | commandLine.createArgument().setValue(getComment()); |
| 8 | commandLine.createArgument().setValue(getAutoresponse()); | ||||||||||
9 | commandLine.createArgument().setValue(getAutoresponse()); |
| 9 | commandLine.createArgument().setValue(getRecursive()); |
Row | Violation |
---|