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 testGetProjectFlags()
|
Method name: void testCheckoutProjectFlags()
|
|||
Number of AST nodes: 15 | Number of AST nodes: 14 | |||
1 | String[] sTestCmdLine = {"soscmd", "-command", "GetProject", "-recursive",↵ | 1 | String[] sTestCmdLine = {"soscmd", "-command", "CheckOutProject",↵ | |
2 | "-label", SRC_LABEL, "-server", SOS_SERVER_PATH, "-name", SOS_USERNAME,↵ | 2 | "-recursive", "-server", SOS_SERVER_PATH, "-name", SOS_USERNAME,↵ | |
3 | "-password", "", "-database", VSS_SERVER_PATH, "-project",↵ | 3 | "-password", "", "-database", VSS_SERVER_PATH, "-project",↵ | |
4 | DS_VSS_PROJECT_PATH, "", "", "-soshome", SOS_HOME, "-workdir",↵ | 4 | DS_VSS_PROJECT_PATH, "", "", "-soshome", SOS_HOME, "-workdir",↵ | |
5 | project.getBaseDir().getAbsolutePath()};↵ | 5 | project.getBaseDir().getAbsolutePath()};↵ | |
6 | // Set up a SOSGet task↵ | 6 | // Set up a sosCheckout task↵ | |
7 | SOSGet sosGet = new SOSGet();↵ | 7 | SOSCheckout sosCheckout = new SOSCheckout();↵ | |
8 | sosGet.setProject(project);↵ | 8 | sosCheckout.setProject(project);↵ | |
9 | sosGet.setVssServerPath(VSS_SERVER_PATH);↵ | 9 | sosCheckout.setVssServerPath(VSS_SERVER_PATH);↵ | |
10 | sosGet.setSosServerPath(SOS_SERVER_PATH);↵ | 10 | sosCheckout.setSosServerPath(SOS_SERVER_PATH);↵ | |
11 | sosGet.setProjectPath(DS_VSS_PROJECT_PATH);↵ | 11 | sosCheckout.setProjectPath(VSS_PROJECT_PATH);↵ | |
12 | sosGet.setLabel(SRC_LABEL);↵ | 12 | sos↵ | |
13 | sosGet.setUsername(SOS_USERNAME);↵ | 13 | Checkout.setUsername(SOS_USERNAME);↵ | |
14 | sosGet.setSosHome(SOS_HOME);↵ | 14 | sosCheckout.setSosHome(SOS_HOME);↵ | |
15 | sosGet.setNoCache(true);↵ | 15 | sosCheckout.setNoCache(true);↵ | |
16 | sosGet.setNoCompress(false);↵ | 16 | sosCheckout.setNoCompress(false);↵ | |
17 | sosGet.setVerbose(false);↵ | 17 | sosCheckout.setVerbose(false);↵ | |
18 | sosGet.setRecursive(true);↵ | 18 | sosCheckout.setRecursive(true);↵ | |
19 | commandline = sosGet.buildCmdLine();↵ | 19 | commandline = sosCheckout.buildCmdLine();↵ | |
20 | checkCommandLines(sTestCmdLine, commandline.getCommandline()); | 20 |
| |
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 | 162 |
Number of mapped statements | 13 |
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", "CheckOutProject", "-recursive", "-server", SOS_SERVER_PATH, "-name", SOS_USERNAME, "-password", "", "-database", VSS_SERVER_PATH, "-project", DS_VSS_PROJECT_PATH, "", "", "-soshome", SOS_HOME, "-workdir", project.getBaseDir().getAbsolutePath()}; | |||||||||||||||||||||
1 | String[] sTestCmdLine = {"soscmd", "-command", "GetProject", "-recursive", "-label", SRC_LABEL, "-server", SOS_SERVER_PATH, "-name", SOS_USERNAME, "-password", "", "-database", VSS_SERVER_PATH, "-project", DS_VSS_PROJECT_PATH, "", "", "-soshome", SOS_HOME, "-workdir", project.getBaseDir().getAbsolutePath()}; | | |||||||||||||||||||||
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(DS_VSS_PROJECT_PATH); |
| 6 | sosCheckout.setProjectPath(VSS_PROJECT_PATH); | |||||||||||||||||||
7 | sosGet.setLabel(SRC_LABEL); | | |||||||||||||||||||||
8 | sosGet.setUsername(SOS_USERNAME); |
| 7 | sosCheckout.setUsername(SOS_USERNAME); | |||||||||||||||||||
9 | sosGet.setSosHome(SOS_HOME); |
| 8 | sosCheckout.setSosHome(SOS_HOME); | |||||||||||||||||||
10 | sosGet.setNoCache(true); |
| 9 | sosCheckout.setNoCache(true); | |||||||||||||||||||
11 | sosGet.setNoCompress(false); |
| 10 | sosCheckout.setNoCompress(false); | |||||||||||||||||||
12 | sosGet.setVerbose(false); |
| 11 | sosCheckout.setVerbose(false); | |||||||||||||||||||
13 | sosGet.setRecursive(true); |
| 12 | sosCheckout.setRecursive(true); | |||||||||||||||||||
14 | commandline = sosGet.buildCmdLine(); |
| 13 | commandline = sosCheckout.buildCmdLine(); | |||||||||||||||||||
15 | checkCommandLines(sTestCmdLine, commandline.getCommandline()); | 14 | 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 void setRecursive(boolean) |
2 | Clone fragment #1 returns variables sosGet , while Clone fragment #2 returns variables |