(SOS_USERNAME); sosCheckin.setPassword(SOS_PASSWORD); sosCheckin.setLocalPath(new Path(project, LOCAL_PATH)); sosCheckin.setNoCache(true); sosCheckin.setNoCompress(true); sosCheckin.setVerbose(true); sosCheckin.setRecursive(true); commandline = sosCheckin.buildCmdLine(); checkCommandLines(sTestCmdLine, commandline.getCommandline()); } /** Test CheckInProject option flags */ public void testCheckinProjectFlags() { 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,}; // Set up a SOSCheckin task SOSCheckin sosCheckin = new SOSCheckin(); sosCheckin.setProject(project); sosCheckin.setVssServerPath(VSS_SERVER_PATH); sosCheckin.setSosServerPath(SOS_SERVER_PATH); sosCheckin.setProjectPath(DS_VSS_PROJECT_PATH); sosCheckin.setCommen
(SOS_PASSWORD); sosGet.setVersion(VERSION); sosGet.setLocalPath(new Path(project, LOCAL_PATH)); sosGet.setNoCache(true); sosGet.setNoCompress(true); sosGet.setVerbose(true); sosGet.setRecursive(true); commandline = sosGet.buildCmdLine(); checkCommandLines(sTestCmdLine, commandline.getCommandline()); } /** Test SOSGetProject flags & commandline generation */ public void testGetProjectFlags() { 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()}; // Set up a SOSGet task SOSGet sosGet = new SOSGet(); sosGet.setProject(project); sosGet.setVssServerPath(VSS_SERVER_PATH); sosGet.setSosServerPath(SOS_SERVER_PATH); sosGet.setProjectPath(DS_VSS_PROJECT_PATH); sosGet.setLabe
Clone fragments detected by clone detection tool
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: Method name:
Number of AST nodes: 0 Number of AST nodes: 0
1
(SOS_USERNAME);
1
(SOS_PASSWORD);
2
        sosCheckin.setPassword(SOS_PASSWORD);
2
        sosGet.setVersion(VERSION);
3
        sosCheckin.setLocalPath(new Path(project, LOCAL_PATH));
3
        sosGet.setLocalPath(new Path(project, LOCAL_PATH));
4
        sosCheckin.setNoCache(true);
4
        sosGet.setNoCache(true);
5
        sosCheckin.setNoCompress(true);
5
        sosGet.setNoCompress(true);
6
        sosCheckin.setVerbose(true);
6
        sosGet.setVerbose(true);
7
        sosCheckin.setRecursive(true);
7
        sosGet.setRecursive(true);
8
        commandline = sosCheckin.buildCmdLine();
8
        commandline = sosGet.buildCmdLine();
9
        checkCommandLines(sTestCmdLine, commandline.getCommandline());
9
        checkCommandLines(sTestCmdLine, commandline.getCommandline());
10
    }
10
    }
11
    /**  Test CheckInProject option flags  */
11
    /**  Test SOSGetProject flags & commandline generation  */
12
    public void testCheckinProjectFlags() {
12
    public void testGetProjectFlags() {
13
        String[] sTestCmdLine = {"soscmd", "-command", "CheckInProject",
13
        String[] sTestCmdLine = {"soscmd", "-command", "GetProject", "-recursive",
14
                "-recursive", "-server", SOS_SERVER_PATH, "-name", SOS_USERNAME,
14
                "-label", SRC_LABEL, "-server", SOS_SERVER_PATH, "-name", SOS_USERNAME,
15
                "-password", "", "-database", VSS_SERVER_PATH, "-project",
15
                "-password", "", "-database", VSS_SERVER_PATH, "-project",
16
                DS_VSS_PROJECT_PATH, "", "", "-soshome", SOS_HOME, "-workdir",
16
                DS_VSS_PROJECT_PATH, "", "", "-soshome", SOS_HOME, "-workdir",
17
                project.getBaseDir().getAbsolutePath(), "-log", SRC_COMMENT,};
17
                project.getBaseDir().getAbsolutePath()};
18
        // Set up a SOSCheckin task
18
        // Set up a SOSGet task
19
        SOSCheckin sosCheckin = new SOSCheckin();
19
        SOSGet sosGet = new SOSGet();
20
        sosCheckin.setProject(project);
20
        sosGet.setProject(project);
21
        sosCheckin.setVssServerPath(VSS_SERVER_PATH);
21
        sosGet.setVssServerPath(VSS_SERVER_PATH);
22
        sosCheckin.setSosServerPath(SOS_SERVER_PATH);
22
        sosGet.setSosServerPath(SOS_SERVER_PATH);
23
        sosCheckin.setProjectPath(DS_VSS_PROJECT_PATH);
23
        sosGet.setProjectPath(DS_VSS_PROJECT_PATH);
24
        sosCheckin.setCommen
24
        sosGet.setLabe
Summary
Number of common nesting structure subtrees0
Number of refactorable cases0
Number of non-refactorable cases0
Time elapsed for finding largest common nesting structure subtrees (ms)0.0
Clones location
Number of node comparisons0