public void execute() throws BuildException { Commandline commandLine = new Commandline(); Project aProj = getProject(); int result = 0; // Default the viewpath to basedir if it is not specified if (getViewPath() == null) { setViewPath(aProj.getBaseDir().getPath()); } // build the command line from what we got. the format is // cleartool checkin [options...] [viewpath ...] // as specified in the CLEARTOOL.EXE help commandLine.setExecutable(getClearToolCommand()); commandLine.createArgument().setValue(COMMAND_CHECKIN); checkOptions(commandLine); if (!getFailOnErr()) { getProject().log("Ignoring any errors that occur for: " + getViewPathBasename(), Project.MSG_VERBOSE); } result = run(commandLine); if (Execute.isFailure(result) && getFailOnErr()) { String msg = "Failed executing: " + commandLine.toString(); throw new BuildException(msg, getLocation());
public void execute() throws BuildException { Commandline commandLine = new Commandline(); Project aProj = getProject(); int result = 0; // Default the viewpath to basedir if it is not specified if (getViewPath() == null) { setViewPath(aProj.getBaseDir().getPath()); } // build the command line from what we got the format is // cleartool uncheckout [options...] [viewpath ...] // as specified in the CLEARTOOL.EXE help commandLine.setExecutable(getClearToolCommand()); commandLine.createArgument().setValue(COMMAND_UNCHECKOUT); checkOptions(commandLine); if (!getFailOnErr()) { getProject().log("Ignoring any errors that occur for: " + getViewPathBasename(), Project.MSG_VERBOSE); } result = run(commandLine); if (Execute.isFailure(result) && getFailOnErr()) { String msg = "Failed executing: " + commandLine.toString(); throw new BuildException(msg, getLocation());
Clone fragments detected by clone detection tool
File path: /apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/optional/clearcase/CCCheckin.java File path: /apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/optional/clearcase/CCUnCheckout.java
Method name: Method name:
Number of AST nodes: 0 Number of AST nodes: 0
1
public void execute() throws BuildException {
1
public void execute() throws BuildException {
2
        Commandline commandLine = new Commandline();
2
        Commandline commandLine = new Commandline();
3
        Project aProj = getProject();
3
        Project aProj = getProject();
4
        int result = 0;
4
        int result = 0;
5
        // Default the viewpath to basedir if it is not specified
5
        // Default the viewpath to basedir if it is not specified
6
        if (getViewPath() == null) {
6
        if (getViewPath() == null) {
7
            setViewPath(aProj.getBaseDir().getPath());
7
            setViewPath(aProj.getBaseDir().getPath());
8
        }
8
        }
9
        // build the command line from what we got. the format is
9
        // build the command line from what we got the format is
10
        // cleartool checkin [options...] [viewpath ...]
10
        // cleartool uncheckout [options...] [viewpath ...]
11
        // as specified in the CLEARTOOL.EXE help
11
        // as specified in the CLEARTOOL.EXE help
12
        commandLine.setExecutable(getClearToolCommand());
12
        commandLine.setExecutable(getClearToolCommand());
13
        commandLine.createArgument().setValue(COMMAND_CHECKIN);
13
        commandLine.createArgument().setValue(COMMAND_UNCHECKOUT);
14
        checkOptions(commandLine);
14
        checkOptions(commandLine);
15
        if (!getFailOnErr()) {
15
        if (!getFailOnErr()) {
16
            getProject().log("Ignoring any errors that occur for: "
16
            getProject().log("Ignoring any errors that occur for: "
17
                    + getViewPathBasename(), Project.MSG_VERBOSE);
17
                    + getViewPathBasename(), Project.MSG_VERBOSE);
18
        }
18
        }
19
        result = run(commandLine);
19
        result = run(commandLine);
20
        if (Execute.isFailure(result) && getFailOnErr()) {
20
        if (Execute.isFailure(result) && getFailOnErr()) {
21
            String msg = "Failed executing: " + commandLine.toString();
21
            String msg = "Failed executing: " + commandLine.toString();
22
            throw new BuildException(msg, getLocation());
22
            throw new BuildException(msg, getLocation());
23
        
23
        
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