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 testCheckinProjectFlags()
|
|||
Number of AST nodes: 12 | Number of AST nodes: 12 | |||
1 | String[] sTestCmdLine = {"soscmd", "-command", "GetProject", "-recursive",↵ | 1 | String[] sTestCmdLine = {"soscmd", "-command", "CheckInProject",↵ | |
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(), "-log", SRC_COMMENT,};↵ | |
6 | // Set up a SOSGet task↵ | 6 | // Set up a SOSCheckin task↵ | |
7 | SOSGet sosGet = new SOSGet();↵ | 7 | SOSCheckin sosCheckin = new SOSCheckin();↵ | |
8 | sosGet.setProject(project);↵ | 8 | sosCheckin.setProject(project);↵ | |
9 | sosGet.setVssServerPath(VSS_SERVER_PATH);↵ | 9 | sosCheckin.setVssServerPath(VSS_SERVER_PATH);↵ | |
10 | sosGet.setSosServerPath(SOS_SERVER_PATH);↵ | 10 | sosCheckin.setSosServerPath(SOS_SERVER_PATH);↵ | |
11 | sosGet.setProjectPath(DS_VSS_PROJECT_PATH);↵ | 11 | sosCheckin.setProjectPath(DS_VSS_PROJECT_PATH);↵ | |
12 | sosGet.setLabel(SRC_LABEL);↵ | 12 | sosCheckin.setComment(SRC_COMMENT);↵ | |
13 | sosGet.setUsername(SOS_USERNAME);↵ | 13 | sosCheckin.setUsername(SOS_USERNAME);↵ | |
14 | sosGet.setSosHome(SOS_HOME);↵ | 14 | sosCheckin.setSosHome(SOS_HOME);↵ | |
15 | sosGet.setNoCache(true);↵ | 15 | sosCheckin.setNoCache(true);↵ | |
16 | sosGet.setNoCompress(false);↵ | 16 | sosCheckin.setNoCompress(false);↵ | |
17 | sosGet.setVerbose(false); | 17 | sosCheckin.setVerbose(false); | |
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 | 122 |
Number of mapped statements | 12 |
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", "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()}; |
| 1 | String[] sTestCmdLine = {"soscmd", "-command", "CheckInProject", "-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(), "-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(DS_VSS_PROJECT_PATH); |
| 6 | sosCheckin.setProjectPath(DS_VSS_PROJECT_PATH); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
7 | sosGet.setLabel(SRC_LABEL); |
| 7 | sosCheckin.setComment(SRC_COMMENT); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
8 | sosGet.setUsername(SOS_USERNAME); |
| 8 | sosCheckin.setUsername(SOS_USERNAME); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
9 | sosGet.setSosHome(SOS_HOME); |
| 9 | sosCheckin.setSosHome(SOS_HOME); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
10 | sosGet.setNoCache(true); |
| 10 | sosCheckin.setNoCache(true); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
11 | sosGet.setNoCompress(false); |
| 11 | sosCheckin.setNoCompress(false); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
12 | sosGet.setVerbose(false); |
| 12 | sosCheckin.setVerbose(false); |
Row | Violation |
---|---|
1 | Expression project.getBaseDir().getAbsolutePath() cannot be parameterized, because it has dependencies to/from statements that will be extracted |
2 | Expression project.getBaseDir().getAbsolutePath() cannot be parameterized, because it has dependencies to/from statements that will be extracted |
3 | Expression sosGet.setLabel(SRC_LABEL) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
4 | Expression sosCheckin.setComment(SRC_COMMENT) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
5 | Expression sosGet.setLabel(SRC_LABEL) is a void method call, and thus it cannot be parameterized |
6 | Expression sosCheckin.setComment(SRC_COMMENT) is a void method call, and thus it cannot be parameterized |
7 | 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 setLabel(java.lang.String) , public void setComment(java.lang.String) |
8 | Clone fragment #1 returns variables sosGet, sTestCmdLine , while Clone fragment #2 returns variables sosCheckin, sTestCmdLine |