File path: /apache-ant-1.7.0/src/tests/junit/org/apache/tools/ant/taskdefs/optional/vss/MSVSSTest.java | File path: /apache-ant-1.7.0/src/tests/junit/org/apache/tools/ant/taskdefs/optional/vss/MSVSSTest.java | |||
Method name: void testCheckinCommandLine()
|
Method name: void testCreateCommandLine()
|
|||
Number of AST nodes: 10 | Number of AST nodes: 11 | |||
1 | String[] sTestCmdLine = {MSVSS.SS_EXE, MSVSS.COMMAND_CHECKIN, DS_VSS_PROJECT_PATH,↵ | 1 | String[] sTestCmdLine = { MSVSS.SS_EXE, MSVSS.COMMAND_CREATE,↵ | |
2 | MSVSS.FLAG_AUTORESPONSE_NO, MSVSS.FLAG_WRITABLE, MSVSS.FLAG_LOGIN + VSS_USERNAME,↵ | 2 | DS_VSS_PROJECT_PATH, MSVSS.FLAG_COMMENT + SRC_COMMENT, MSVSS.FLAG_AUTORESPONSE_NO,↵ | |
3 | MSVSS.FLAG_COMMENT + SRC_COMMENT};↵ | 3 | MSVSS.FLAG_QUIET, MSVSS.FLAG_LOGIN + VSS_USERNAME};↵ | |
4 | // Set up a VSSCheckIn task↵ | 4 | // Set up a VSSCreate task↵ | |
5 | MSVSSCHECKIN vssCheckin = new MSVSSCHECKIN();↵ | 5 | MSVSSCREATE vssCreate = new MSVSSCREATE();↵ | |
6 | vssCheckin.setProject(project);↵ | 6 | vssCreate.setProject(project);↵ | |
7 | vssCheckin.setComment(SRC_COMMENT);↵ | 7 | vssCreate.setComment(SRC_COMMENT);↵ | |
8 | vssCheckin.setLogin(VSS_USERNAME);↵ | 8 | vssCreate.setLogin(VSS_USERNAME);↵ | |
9 | vssCheckin.setAutoresponse("N");↵ | 9 | vssC↵ | |
10 | vssCheckin.setVsspath(VSS_PROJECT_PATH);↵ | 10 | reate.setVsspath(DS_VSS_PROJECT_PATH);↵ | |
11 | vssCheckin.setWritable↵ | 11 | vssCreate.setFailOnError(true);↵ | |
12 | vssCreate.setAutoresponse("N");↵ | |||
12 | (true);↵ | 13 | vssCreate.setQuiet(true);↵ | |
13 | commandline = vssCheckin.buildCmdLine();↵ | 14 | commandline = vssCreate.buildCmdLine();↵ | |
14 | checkCommandLines(sTestCmdLine, commandline.getCommandline()); | 15 |
| |
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.0 |
Clones location | Clones are declared in the same class |
Number of node comparisons | 70 |
Number of mapped statements | 10 |
Number of unmapped statements in the first code fragment | 0 |
Number of unmapped statements in the second code fragment | 1 |
Time elapsed for statement mapping (ms) | 0.0 |
Clone type | Type 3 |
ID | Statement | ID | Statement | ||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | String[] sTestCmdLine = {MSVSS.SS_EXE, MSVSS.COMMAND_CHECKIN, DS_VSS_PROJECT_PATH, MSVSS.FLAG_AUTORESPONSE_NO, MSVSS.FLAG_WRITABLE, MSVSS.FLAG_LOGIN + VSS_USERNAME, MSVSS.FLAG_COMMENT + SRC_COMMENT}; |
| 1 | String[] sTestCmdLine = {MSVSS.SS_EXE, MSVSS.COMMAND_CREATE, DS_VSS_PROJECT_PATH, MSVSS.FLAG_COMMENT + SRC_COMMENT, MSVSS.FLAG_AUTORESPONSE_NO, MSVSS.FLAG_QUIET, MSVSS.FLAG_LOGIN + VSS_USERNAME}; | |||||||||||||||||||||||||
2 | MSVSSCHECKIN vssCheckin = new MSVSSCHECKIN(); |
| 2 | MSVSSCREATE vssCreate = new MSVSSCREATE(); | |||||||||||||||||||||||||
3 | vssCheckin.setProject(project); |
| 3 | vssCreate.setProject(project); | |||||||||||||||||||||||||
4 | vssCheckin.setComment(SRC_COMMENT); |
| 4 | vssCreate.setComment(SRC_COMMENT); | |||||||||||||||||||||||||
5 | vssCheckin.setLogin(VSS_USERNAME); |
| 5 | vssCreate.setLogin(VSS_USERNAME); | |||||||||||||||||||||||||
6 | vssCheckin.setAutoresponse("N"); |
| 8 | vssCreate.setAutoresponse("N"); | |||||||||||||||||||||||||
7 | vssCheckin.setVsspath(VSS_PROJECT_PATH); |
| 6 | vssCreate.setVsspath(DS_VSS_PROJECT_PATH); | |||||||||||||||||||||||||
| 7 | vssCreate.setFailOnError(true); | |||||||||||||||||||||||||||
8 | vssCheckin.setWritable(true); |
| 9 | vssCreate.setQuiet(true); | |||||||||||||||||||||||||
9 | commandline = vssCheckin.buildCmdLine(); |
| 10 | commandline = vssCreate.buildCmdLine(); | |||||||||||||||||||||||||
10 | checkCommandLines(sTestCmdLine, commandline.getCommandline()); | 11 | checkCommandLines(sTestCmdLine, commandline.getCommandline()); |
Row | Violation |
---|---|
1 | Expression vssCheckin cannot be unified with expression vssCreate , because common superclass org.apache.tools.ant.taskdefs.optional.vss.MSVSS does not declare member(s) public void setComment(java.lang.String) |
2 | Expression vssCheckin cannot be unified with expression vssCreate , because common superclass org.apache.tools.ant.taskdefs.optional.vss.MSVSS does not declare member(s) public void setAutoresponse(java.lang.String) |
3 | Expression vssCheckin.setWritable(true) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
4 | Expression vssCreate.setQuiet(true) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
5 | Expression vssCheckin.setWritable(true) is a void method call, and thus it cannot be parameterized |
6 | Expression vssCreate.setQuiet(true) is a void method call, and thus it cannot be parameterized |
7 | Clone fragment #1 returns variables , while Clone fragment #2 returns variables vssCreate |