(DS_VSS_PROJECT_PATH); sosCheckout.setFile(SRC_FILE); sosCheckout.setUsername(SOS_USERNAME); sosCheckout.setPassword(SOS_PASSWORD); sosCheckout.setLocalPath(new Path(project, LOCAL_PATH)); sosCheckout.setNoCache(true); sosCheckout.setNoCompress(true); sosCheckout.setVerbose(true); sosCheckout.setRecursive(true); commandline = sosCheckout.buildCmdLine(); checkCommandLines(sTestCmdLine, commandline.getCommandline()); } /** Test CheckOutProject option flags */ public void testCheckoutProjectFlags() { 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()}; // Set up a sosCheckout task SOSCheckout sosCheckout = new SOSCheckout(); sosCheckout.setProject(project); sosCheckout.setVssServerPath(VSS_SERVER_PATH); sosCheckout.setSosServerPath(SOS_SERVER_PATH); sosCheckout.setProjectPath(VSS_PROJECT_PATH); sosCheckout
(SRC_FILE); sosCheckin.setComment(SRC_COMMENT); sosCheckin.setUsername(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
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
(DS_VSS_PROJECT_PATH);
1
(SRC_FILE);
2
        sosCheckout.setFile(SRC_FILE);
2
        sosCheckin.setComment(SRC_COMMENT);
3
        sosCheckout.setUsername(SOS_USERNAME);
3
        sosCheckin.setUsername(SOS_USERNAME);
4
        sosCheckout.setPassword(SOS_PASSWORD);
4
        sosCheckin.setPassword(SOS_PASSWORD);
5
        sosCheckout.setLocalPath(new Path(project, LOCAL_PATH));
5
        sosCheckin.setLocalPath(new Path(project, LOCAL_PATH));
6
        sosCheckout.setNoCache(true);
6
        sosCheckin.setNoCache(true);
7
        sosCheckout.setNoCompress(true);
7
        sosCheckin.setNoCompress(true);
8
        sosCheckout.setVerbose(true);
8
        sosCheckin.setVerbose(true);
9
        sosCheckout.setRecursive(true);
9
        sosCheckin.setRecursive(true);
10
        commandline = sosCheckout.buildCmdLine();
10
        commandline = sosCheckin.buildCmdLine();
11
        checkCommandLines(sTestCmdLine, commandline.getCommandline());
11
        checkCommandLines(sTestCmdLine, commandline.getCommandline());
12
    }
12
    }
13
    /**  Test CheckOutProject option flags  */
13
    /**  Test CheckInProject option flags  */
14
    public void testCheckoutProjectFlags() {
14
    public void testCheckinProjectFlags() {
15
        String[] sTestCmdLine = {"soscmd", "-command", "CheckOutProject",
15
        String[] sTestCmdLine = {"soscmd", "-command", "CheckInProject",
16
                "-recursive", "-server", SOS_SERVER_PATH, "-name", SOS_USERNAME,
16
                "-recursive", "-server", SOS_SERVER_PATH, "-name", SOS_USERNAME,
17
                "-password", "", "-database", VSS_SERVER_PATH, "-project",
17
                "-password", "", "-database", VSS_SERVER_PATH, "-project",
18
                DS_VSS_PROJECT_PATH, "", "", "-soshome", SOS_HOME, "-workdir",
18
                DS_VSS_PROJECT_PATH, "", "", "-soshome", SOS_HOME, "-workdir",
19
                project.getBaseDir().getAbsolutePath()};
19
                project.getBaseDir().getAbsolutePath(), "-log", SRC_COMMENT,};
20
        // Set up a sosCheckout task
20
        // Set up a SOSCheckin task
21
        SOSCheckout sosCheckout = new SOSCheckout();
21
        SOSCheckin sosCheckin = new SOSCheckin();
22
        sosCheckout.setProject(project);
22
        sosCheckin.setProject(project);
23
        sosCheckout.setVssServerPath(VSS_SERVER_PATH);
23
        sosCheckin.setVssServerPath(VSS_SERVER_PATH);
24
        sosCheckout.setSosServerPath(SOS_SERVER_PATH);
24
        sosCheckin.setSosServerPath(SOS_SERVER_PATH);
25
        sosCheckout.setProjectPath(VSS_PROJECT_PATH);
25
        sosCheckin.setProjectPath(DS_VSS_PROJECT_PATH);
26
        sosCheckout
26
        sosCheckin
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