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