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 lock [options...] // as specified in the CLEARTOOL.EXE help commandLine.setExecutable(getClearToolCommand()); commandLine.createArgument().setValue(COMMAND_UNLOCK); // Check the command line options checkOptions(commandLine);
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);
Clone fragments detected by clone detection tool
File path: /apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/optional/clearcase/CCUnlock.java File path: /apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/optional/clearcase/CCCheckin.java
Method name: void execute() Method name: void execute()
Number of AST nodes: 8 Number of AST nodes: 8
1
Commandline commandLine = new Commandline();
1
Commandline commandLine = new Commandline();
2
        Project aProj = getProject();
2
        Project aProj = getProject();
3
        int result = 0;
3
        int result = 0;
4
        // Default the viewpath to basedir if it is not specified
4
        // Default the viewpath to basedir if it is not specified
5
        if (getViewPath() == null) {
5
        if (getViewPath() == null) {
6
            setViewPath(aProj.getBaseDir().getPath());
6
            setViewPath(aProj.getBaseDir().getPath());
7
        }
7
        }
8
        // build the command line from what we got the format is
8
        // build the command line from what we got. the format is
9
        // cleartool lock [options...]
9
        // cleartool checkin [options...] [viewpath ...]
10
        // as specified in the CLEARTOOL.EXE help
10
        // as specified in the CLEARTOOL.EXE help
11
        commandLine.setExecutable(getClearToolCommand());
11
        commandLine.setExecutable(getClearToolCommand());
12
        commandLine.createArgument().setValue(COMMAND_UNLOCK);
12
        commandLine.createArgument().setValue(COMMAND_
13
        // Check the command line options
13
CHECKIN);
14
        checkOptions(commandLine);
14
        checkOptions(commandLine);
Summary
Number of common nesting structure subtrees1
Number of refactorable cases0
Number of non-refactorable cases1
Time elapsed for finding largest common nesting structure subtrees (ms)0.1
Clones locationClones are in different classes having the same super class
Number of node comparisons24
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements8
    Number of unmapped statements in the first code fragment0
    Number of unmapped statements in the second code fragment0
    Time elapsed for statement mapping (ms)15.9
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    1
    Commandline commandLine = new Commandline();
    1
    Commandline commandLine = new Commandline();
    2
    Project aProj = getProject();
    2
    Project aProj = getProject();
    3
    int result = 0;
    3
    int result = 0;
    4
    if (getViewPath() == null)
    4
    if (getViewPath() == null)
    5
    setViewPath(aProj.getBaseDir().getPath());
    5
    setViewPath(aProj.getBaseDir().getPath());
    6
    commandLine.setExecutable(getClearToolCommand());
    6
    commandLine.setExecutable(getClearToolCommand());
    7
    commandLine.createArgument().setValue(COMMAND_UNLOCK);
    7
    commandLine.createArgument().setValue(COMMAND_UNLOCK);
    7
    commandLine.createArgument().setValue(COMMAND_CHECKIN);
    Differences
    Expression1Expression2Difference
    COMMAND_UNLOCKCOMMAND_CHECKINVARIABLE_NAME_MISMATCH
    7
    commandLine.createArgument().setValue(COMMAND_CHECKIN);
    8
    checkOptions(commandLine);
    8
    checkOptions(commandLine);
    Precondition Violations (1)
    Row Violation
    1Clone fragment #1 returns variables commandLine, result , while Clone fragment #2 returns variables commandLine, result