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 testCheckoutFileFlags()
|
|||
Number of AST nodes: 17 | Number of AST nodes: 16 | |||
1 | String[] sTestCmdLine = {"soscmd", "-command", "GetFile", "-file",↵ | 1 | String[] sTestCmdLine = {"soscmd", "-command", "CheckOutFile", "-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,↵ | |
4 | ↵ | 4 | "-project",↵ | |
5 | "-project", DS_VSS_PROJECT_PATH, "-verbose", "-nocompress",↵ | 5 | DS_VSS_PROJECT_PATH, "-verbose", "-nocompress", "-nocache",↵ | |
6 | "-nocache", "-workdir", project.getBaseDir().getAbsolutePath()↵ | 6 | "-workdir", project.getBaseDir().getAbsolutePath()↵ | |
7 | + File.separator + LOCAL_PATH};↵ | 7 | + File.separator + LOCAL_PATH};↵ | |
8 | // Set up a SOSGet task↵ | 8 | // Set up a SOSCheckout task↵ | |
9 | SOSGet sosGet = new SOSGet();↵ | 9 | SOSCheckout sosCheckout = new SOSCheckout();↵ | |
10 | sosGet.setProject(project);↵ | 10 | sosCheckout.setProject(project);↵ | |
11 | sosGet.setVssServerPath(VSS_SERVER_PATH);↵ | 11 | sosCheckout.setVssServerPath(VSS_SERVER_PATH);↵ | |
12 | sosGet.setSosServerPath(SOS_SERVER_PATH);↵ | 12 | sosCheckout.setSosServerPath(SOS_SERVER_PATH);↵ | |
13 | sosGet.setProjectPath(VSS_PROJECT_PATH);↵ | 13 | sosCheckout.setProjectPath(DS_VSS_PROJECT_PATH);↵ | |
14 | sosGet.setFile(SRC_FILE);↵ | 14 | sosCheckout.setFile(SRC_FILE);↵ | |
15 | sosGet.setUsername(SOS_USERNAME);↵ | 15 | sosCheckout.setUsername(SOS_USERNAME);↵ | |
16 | sosGet.setPassword(SOS_PASSWORD);↵ | 16 | sosCheckout.setPassword(SOS_PASSWORD);↵ | |
17 | sosGet.setVersion(VERSION);↵ | 17 | sos↵ | |
18 | sosGet.setLocalPath(new Path(project, LOCAL_PATH));↵ | 18 | Checkout.setLocalPath(new Path(project, LOCAL_PATH));↵ | |
19 | sosGet.setNoCache(true);↵ | 19 | sosCheckout.setNoCache(true);↵ | |
20 | sosGet.setNoCompress(true);↵ | 20 | sosCheckout.setNoCompress(true);↵ | |
21 | sosGet.setVerbose(true);↵ | 21 | sosCheckout.setVerbose(true);↵ | |
22 | sosGet.setRecursive(true);↵ | 22 | sosCheckout.setRecursive(true);↵ | |
23 | commandline = sosGet.buildCmdLine();↵ | 23 | commandline = sosCheckout.buildCmdLine();↵ | |
24 | checkCommandLines(sTestCmdLine, commandline.getCommandline()); | 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.0 |
Clones location | Clones are declared in the same class |
Number of node comparisons | 216 |
Number of mapped statements | 15 |
Number of unmapped statements in the first code fragment | 2 |
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 = {"soscmd", "-command", "CheckOutFile", "-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}; | |||||||||||||||||||||
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}; | | |||||||||||||||||||||
2 | SOSGet sosGet = new SOSGet(); |
| 2 | SOSCheckout sosCheckout = new SOSCheckout(); | |||||||||||||||||||
3 | sosGet.setProject(project); |
| 3 | sosCheckout.setProject(project); | |||||||||||||||||||
4 | sosGet.setVssServerPath(VSS_SERVER_PATH); |
| 4 | sosCheckout.setVssServerPath(VSS_SERVER_PATH); | |||||||||||||||||||
5 | sosGet.setSosServerPath(SOS_SERVER_PATH); |
| 5 | sosCheckout.setSosServerPath(SOS_SERVER_PATH); | |||||||||||||||||||
6 | sosGet.setProjectPath(VSS_PROJECT_PATH); |
| 6 | sosCheckout.setProjectPath(DS_VSS_PROJECT_PATH); | |||||||||||||||||||
7 | sosGet.setFile(SRC_FILE); |
| 7 | sosCheckout.setFile(SRC_FILE); | |||||||||||||||||||
8 | sosGet.setUsername(SOS_USERNAME); |
| 8 | sosCheckout.setUsername(SOS_USERNAME); | |||||||||||||||||||
9 | sosGet.setPassword(SOS_PASSWORD); |
| 9 | sosCheckout.setPassword(SOS_PASSWORD); | |||||||||||||||||||
10 | sosGet.setVersion(VERSION); | | |||||||||||||||||||||
11 | sosGet.setLocalPath(new Path(project, LOCAL_PATH)); |
| 10 | sosCheckout.setLocalPath(new Path(project, LOCAL_PATH)); | |||||||||||||||||||
12 | sosGet.setNoCache(true); |
| 11 | sosCheckout.setNoCache(true); | |||||||||||||||||||
13 | sosGet.setNoCompress(true); |
| 12 | sosCheckout.setNoCompress(true); | |||||||||||||||||||
14 | sosGet.setVerbose(true); |
| 13 | sosCheckout.setVerbose(true); | |||||||||||||||||||
15 | sosGet.setRecursive(true); |
| 14 | sosCheckout.setRecursive(true); | |||||||||||||||||||
16 | commandline = sosGet.buildCmdLine(); |
| 15 | commandline = sosCheckout.buildCmdLine(); | |||||||||||||||||||
17 | checkCommandLines(sTestCmdLine, commandline.getCommandline()); | 16 | checkCommandLines(sTestCmdLine, commandline.getCommandline()); |
Row | Violation |
---|---|
1 | Expression sosGet cannot be unified with expression sosCheckout , 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 cannot be unified with expression sosCheckout , because common superclass org.apache.tools.ant.taskdefs.optional.sos.SOS does not declare member(s) public void setRecursive(boolean) |
3 | Clone fragment #1 returns variables sosGet , while Clone fragment #2 returns variables |