String toReturn = ccmDir; if (!toReturn.equals("") && !toReturn.endsWith("/")) { toReturn += "/"; } toReturn += CCM_EXE; return toReturn;
String toReturn = mClearToolDir; if (!toReturn.equals("") && !toReturn.endsWith("/")) { toReturn += "/"; } toReturn += CLEARTOOL_EXE; return toReturn;
Clone fragments detected by clone detection tool
File path: /apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/optional/ccm/Continuus.java File path: /apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/optional/clearcase/ClearCase.java
Method name: String getCcmCommand() Method name: String getClearToolCommand()
Number of AST nodes: 5 Number of AST nodes: 5
1
String toReturn = ccmDir;
1
String toReturn = mClearToolDir;
2
        if (!toReturn.equals("") && !toReturn.endsWith("/")) {
2
        if (!toReturn.equals("") && !toReturn.endsWith("/")) {
3
            toReturn += "/";
3
            toReturn += "/";
4
        }
4
        }
5
        toReturn += CCM_EXE;
5
        toReturn += CLEARTOOL_EXE;
6
        return toReturn;
6
        return toReturn;
Summary
Number of common nesting structure subtrees1
Number of refactorable cases1
Number of non-refactorable cases0
Time elapsed for finding largest common nesting structure subtrees (ms)0.2
Clones locationClones are in different classes having the same super class
Number of node comparisons13
  1. {Refactorable}
    Mapping Summary
    Number of mapped statements5
    Number of unmapped statements in the first code fragment0
    Number of unmapped statements in the second code fragment0
    Time elapsed for statement mapping (ms)0.6
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    1
    String toReturn = ccmDir;
    1
    String toReturn = ccmDir;
    1
    String toReturn = mClearToolDir;
    Differences
    Expression1Expression2Difference
    ccmDirmClearToolDirVARIABLE_NAME_MISMATCH
    1
    String toReturn = mClearToolDir;
    2
    if (!toReturn.equals("") && !toReturn.endsWith("/"))
    2
    if (!toReturn.equals("") && !toReturn.endsWith("/"))
    3
    toReturn += "/";
    3
    toReturn += "/";
    4
    toReturn += CCM_EXE;
    4
    toReturn += CCM_EXE;
    4
    toReturn += CLEARTOOL_EXE;
    Differences
    Expression1Expression2Difference
    CCM_EXECLEARTOOL_EXEVARIABLE_NAME_MISMATCH
    4
    toReturn += CLEARTOOL_EXE;
    5
    return toReturn;
    5
    return toReturn;
    Precondition Violations (0)
    Row Violation