File path: /apache-ant-1.7.0/src/tests/junit/org/apache/tools/ant/taskdefs/optional/sos/SOSTest.java | File path: /apache-ant-1.7.0/src/tests/junit/org/apache/tools/ant/taskdefs/optional/sos/SOSTest.java | |||
Method name: void testGetFileFlags()
|
Method name: void testCheckinFileFlags()
|
|||
Number of AST nodes: 17 | Number of AST nodes: 17 | |||
1 | String[] sTestCmdLine = {"soscmd", "-command", "GetFile", "-file",↵ | 1 | String[] sTestCmdLine = {"soscmd", "-command", "CheckInFile", "-file",↵ | |
2 | SRC_FILE, "-revision", "007", "-server", SOS_SERVER_PATH, "-name",↵ | 2 | SRC_FILE, "-server", SOS_SERVER_PATH, "-name", SOS_USERNAME,↵ | |
3 | SOS_USERNAME, "-password", SOS_PASSWORD, "-database", VSS_SERVER_PATH,↵ | 3 | "-password", SOS_PASSWORD, "-database", VSS_SERVER_PATH, "-project",↵ | |
4 | "-project", DS_VSS_PROJECT_PATH, "-verbose", "-nocompress",↵ | 4 | DS_VSS_PROJECT_PATH, "-verbose", "-nocompress",↵ | |
5 | ↵ | 5 | "-nocache",↵ | |
6 | "-nocache", "-workdir", project.getBaseDir().getAbsolutePath()↵ | 6 | "-workdir", project.getBaseDir().getAbsolutePath()↵ | |
7 | + File.separator + LOCAL_PATH↵ | 7 | + File.separator↵ | |
8 | };↵ | 8 | + LOCAL_PATH, "-log", SRC_COMMENT};↵ | |
9 | // Set up a SOSGet task↵ | 9 | // Set up a SOSCheckin task↵ | |
10 | SOSGet sosGet = new SOSGet();↵ | 10 | SOSCheckin sosCheckin = new SOSCheckin();↵ | |
11 | sosGet.setProject(project);↵ | 11 | sosCheckin.setProject(project);↵ | |
12 | sosGet.setVssServerPath(VSS_SERVER_PATH);↵ | 12 | sosCheckin.setVssServerPath(VSS_SERVER_PATH);↵ | |
13 | sosGet.setSosServerPath(SOS_SERVER_PATH);↵ | 13 | sosCheckin.setSosServerPath(SOS_SERVER_PATH);↵ | |
14 | sosGet.setProjectPath(VSS_PROJECT_PATH);↵ | 14 | sosCheckin.setProjectPath(VSS_PROJECT_PATH);↵ | |
15 | sosGet.setFile(SRC_FILE);↵ | 15 | sosCheckin.setFile(SRC_FILE);↵ | |
16 | sosGet↵ | 16 | sosCheckin.setComment(SRC_COMMENT);↵ | |
17 | .setUsername(SOS_USERNAME);↵ | 17 | sosCheckin.setUsername(SOS_USERNAME);↵ | |
18 | sosGet.setPassword(SOS_PASSWORD);↵ | 18 | sosCheckin.setPassword(SOS_PASSWORD);↵ | |
19 | sosGet.setVersion(VERSION);↵ | 19 | sos↵ | |
20 | sosGet.setLocalPath(new Path(project, LOCAL_PATH));↵ | 20 | Checkin.setLocalPath(new Path(project, LOCAL_PATH));↵ | |
21 | sosGet.setNoCache(true);↵ | 21 | sosCheckin.setNoCache(true);↵ | |
22 | sosGet.setNoCompress(true);↵ | 22 | sosCheckin.setNoCompress(true);↵ | |
23 | sosGet.setVerbose(true);↵ | 23 | sosCheckin.setVerbose(true);↵ | |
24 | sosGet.setRecursive(true);↵ | 24 | sosCheckin.setRecursive(true);↵ | |
25 | commandline = sosGet.buildCmdLine();↵ | 25 | commandline = sosCheckin.buildCmdLine();↵ | |
26 | checkCommandLines(sTestCmdLine, commandline.getCommandline()); | 26 |
| |
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 | 229 |
Number of mapped statements | 17 |
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) | 0.0 |
Clone type | Type 2 |
ID | Statement | ID | Statement | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | String[] sTestCmdLine = {"soscmd", "-command", "GetFile", "-file", SRC_FILE, "-revision", "007", "-server", SOS_SERVER_PATH, "-name", SOS_USERNAME, "-password", SOS_PASSWORD, "-database", VSS_SERVER_PATH, "-project", DS_VSS_PROJECT_PATH, "-verbose", "-nocompress", "-nocache", "-workdir", project.getBaseDir().getAbsolutePath() + File.separator + LOCAL_PATH}; |
| 1 | String[] sTestCmdLine = {"soscmd", "-command", "CheckInFile", "-file", SRC_FILE, "-server", SOS_SERVER_PATH, "-name", SOS_USERNAME, "-password", SOS_PASSWORD, "-database", VSS_SERVER_PATH, "-project", DS_VSS_PROJECT_PATH, "-verbose", "-nocompress", "-nocache", "-workdir", project.getBaseDir().getAbsolutePath() + File.separator + LOCAL_PATH, "-log", SRC_COMMENT}; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2 | SOSGet sosGet = new SOSGet(); |
| 2 | SOSCheckin sosCheckin = new SOSCheckin(); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3 | sosGet.setProject(project); |
| 3 | sosCheckin.setProject(project); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4 | sosGet.setVssServerPath(VSS_SERVER_PATH); |
| 4 | sosCheckin.setVssServerPath(VSS_SERVER_PATH); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5 | sosGet.setSosServerPath(SOS_SERVER_PATH); |
| 5 | sosCheckin.setSosServerPath(SOS_SERVER_PATH); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
6 | sosGet.setProjectPath(VSS_PROJECT_PATH); |
| 6 | sosCheckin.setProjectPath(VSS_PROJECT_PATH); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
7 | sosGet.setFile(SRC_FILE); |
| 7 | sosCheckin.setFile(SRC_FILE); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
8 | sosGet.setUsername(SOS_USERNAME); |
| 9 | sosCheckin.setUsername(SOS_USERNAME); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
9 | sosGet.setPassword(SOS_PASSWORD); |
| 10 | sosCheckin.setPassword(SOS_PASSWORD); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
10 | sosGet.setVersion(VERSION); |
| 8 | sosCheckin.setComment(SRC_COMMENT); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
11 | sosGet.setLocalPath(new Path(project, LOCAL_PATH)); |
| 11 | sosCheckin.setLocalPath(new Path(project, LOCAL_PATH)); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
12 | sosGet.setNoCache(true); |
| 12 | sosCheckin.setNoCache(true); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
13 | sosGet.setNoCompress(true); |
| 13 | sosCheckin.setNoCompress(true); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
14 | sosGet.setVerbose(true); |
| 14 | sosCheckin.setVerbose(true); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
15 | sosGet.setRecursive(true); |
| 15 | sosCheckin.setRecursive(true); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
16 | commandline = sosGet.buildCmdLine(); |
| 16 | commandline = sosCheckin.buildCmdLine(); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
17 | checkCommandLines(sTestCmdLine, commandline.getCommandline()); | 17 | checkCommandLines(sTestCmdLine, commandline.getCommandline()); |
Row | Violation |
---|---|
1 | Expression sosGet cannot be unified with expression sosCheckin , because common superclass org.apache.tools.ant.taskdefs.optional.sos.SOS does not declare member(s) public final void setFile(java.lang.String) |
2 | Expression sosGet.setVersion(VERSION) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
3 | Expression sosCheckin.setComment(SRC_COMMENT) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
4 | Expression sosGet.setVersion(VERSION) is a void method call, and thus it cannot be parameterized |
5 | Expression sosCheckin.setComment(SRC_COMMENT) is a void method call, and thus it cannot be parameterized |
6 | Expression sosGet cannot be unified with expression sosCheckin , because common superclass org.apache.tools.ant.taskdefs.optional.sos.SOS does not declare member(s) public void setRecursive(boolean) |