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 testLabelFlags()
|
|||
Number of AST nodes: 12 | Number of AST nodes: 12 | |||
1 | String[] sTestCmdLine = {"soscmd", "-command", "GetProject", "-recursive",↵ | 1 | String[] sTestCmdLine = {"soscmd", "-command", "AddLabel", "-server",↵ | |
2 | "-label", SRC_LABEL, "-server", SOS_SERVER_PATH, "-name", SOS_USERNAME,↵ | 2 | SOS_SERVER_PATH, "-name", SOS_USERNAME,↵ | |
3 | "-password", "", "-database",↵ | 3 | "-password", "", "-database",↵ | |
4 | VSS_SERVER_PATH, "-project",↵ | 4 | VSS_SERVER_PATH, "-project",↵ | |
5 | DS_VSS_PROJECT_PATH, "", "", "-soshome", SOS_HOME, "-workdir",↵ | 5 | DS_VSS_PROJECT_PATH, "↵ | |
6 | project.getBaseDir().getAbsolutePath()↵ | 6 | -label",↵ | |
7 | };↵ | 7 | SRC_LABEL, "-verbose", "-log", SRC_COMMENT};↵ | |
8 | // Set up a SOSGet task↵ | 8 | // Set up a sosCheckout task↵ | |
9 | SOSGet sosGet = new SOSGet();↵ | 9 | SOS↵ | |
10 | sosGet.setProject(project);↵ | 10 | Label sosLabel = new SOSLabel();↵ | |
11 | sosGet.setVssServerPath(VSS_SERVER_PATH);↵ | 11 | sosLabel.setVssServerPath(VSS_SERVER_PATH);↵ | |
12 | sosGet.setSosServerPath(SOS_SERVER_PATH);↵ | 12 | sosLabel.setSosServerPath(SOS_SERVER_PATH);↵ | |
13 | sosGet.setProjectPath(DS_VSS_PROJECT_PATH);↵ | 13 | sosLabel.setProjectPath(DS_VSS_PROJECT_PATH);↵ | |
14 | sosGet.setLabel(SRC_LABEL);↵ | 14 | sosLabel.setUsername(SOS_USERNAME);↵ | |
15 | sosGet.setUsername(SOS_USERNAME);↵ | 15 | sosLabel.setSosHome(SOS_HOME);↵ | |
16 | sosGet.setSosHome(SOS_HOME);↵ | 16 | sos↵ | |
17 | sosGet↵ | 17 | Label.setComment(SRC_COMMENT);↵ | |
18 | sosLabel.setLabel(SRC_LABEL);↵ | |||
18 | .setNoCache(true);↵ | 19 | sosLabel.setNoCache(true);↵ | |
19 | sosGet.setNoCompress(false);↵ | 20 | sosLabel.setNoCompress(false);↵ | |
20 | sosGet.setVerbose(false); | 21 | sosLabel.setVerbose(true); | |
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 | 124 |
Number of mapped statements | 10 |
Number of unmapped statements in the first code fragment | 2 |
Number of unmapped statements in the second code fragment | 2 |
Time elapsed for statement mapping (ms) | 0.0 |
Clone type | Type 2 |
ID | Statement | ID | Statement | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 1 | String[] sTestCmdLine = {"soscmd", "-command", "AddLabel", "-server", SOS_SERVER_PATH, "-name", SOS_USERNAME, "-password", "", "-database", VSS_SERVER_PATH, "-project", DS_VSS_PROJECT_PATH, "-label", SRC_LABEL, "-verbose", "-log", SRC_COMMENT}; | |||||||||||||||||||||
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 | SOSLabel sosLabel = new SOSLabel(); | |||||||||||||||||||
3 | sosGet.setProject(project); | | |||||||||||||||||||||
4 | sosGet.setVssServerPath(VSS_SERVER_PATH); |
| 3 | sosLabel.setVssServerPath(VSS_SERVER_PATH); | |||||||||||||||||||
5 | sosGet.setSosServerPath(SOS_SERVER_PATH); |
| 4 | sosLabel.setSosServerPath(SOS_SERVER_PATH); | |||||||||||||||||||
6 | sosGet.setProjectPath(DS_VSS_PROJECT_PATH); |
| 5 | sosLabel.setProjectPath(DS_VSS_PROJECT_PATH); | |||||||||||||||||||
7 | sosGet.setLabel(SRC_LABEL); |
| 9 | sosLabel.setLabel(SRC_LABEL); | |||||||||||||||||||
8 | sosGet.setUsername(SOS_USERNAME); |
| 6 | sosLabel.setUsername(SOS_USERNAME); | |||||||||||||||||||
9 | sosGet.setSosHome(SOS_HOME); |
| 7 | sosLabel.setSosHome(SOS_HOME); | |||||||||||||||||||
| 8 | sosLabel.setComment(SRC_COMMENT); | |||||||||||||||||||||
10 | sosGet.setNoCache(true); |
| 10 | sosLabel.setNoCache(true); | |||||||||||||||||||
11 | sosGet.setNoCompress(false); |
| 11 | sosLabel.setNoCompress(false); | |||||||||||||||||||
12 | sosGet.setVerbose(false); |
| 12 | sosLabel.setVerbose(true); |
Row | Violation |
---|---|
1 | Expression sosGet cannot be unified with expression sosLabel , because common superclass org.apache.tools.ant.taskdefs.optional.sos.SOS does not declare member(s) public void setLabel(java.lang.String) |
2 | Clone fragment #1 returns variable sosGet with type org.apache.tools.ant.taskdefs.optional.sos.SOSGet , while Clone fragment #2 returns variable sosLabel with type org.apache.tools.ant.taskdefs.optional.sos.SOSLabel |