if (getSubSystem() != null) { cmd.createArgument().setValue(FLAG_SUBSYSTEM); cmd.createArgument().setValue("\"" + getSubSystem() + "\""); } // end of if () if (getRelease() != null) { cmd.createArgument().setValue(FLAG_RELEASE); cmd.createArgument().setValue(getRelease()); }
if (getComment() != null) { cmd.createArgument().setValue(FLAG_COMMENT); cmd.createArgument().setValue("\"" + getComment() + "\""); } if (getPlatform() != null) { cmd.createArgument().setValue(FLAG_PLATFORM); cmd.createArgument().setValue(getPlatform()); }
Clone fragments detected by clone detection tool
File path: /apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/optional/ccm/CCMCreateTask.java File path: /apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/optional/ccm/CCMCreateTask.java
Method name: void checkOptions(Commandline) Method name: void checkOptions(Commandline)
Number of AST nodes: 6 Number of AST nodes: 6
1
if (getSubSystem() != null) {
1
if (getComment() != null) {
2
            cmd.createArgument().setValue(FLAG_SUBSYSTEM);
2
            cmd.createArgument().setValue(FLAG_COMMENT);
3
            cmd.createArgument().setValue("\"" + getSubSystem() + "\"");
3
            cmd.createArgument().setValue("\"" + getComment() + "\"");
4
        } // end of if ()
4
        }
5
        if (getRelease() != null) {
5
        if (getPlatform() != null) {
6
            cmd.createArgument().setValue(FLAG_RELEASE);
6
            cmd.createArgument().setValue(FLAG_PLATFORM);
7
            cmd.createArgument().setValue(getRelease());
7
            cmd.createArgument().setValue(getPlatform());
8
        }
8
        }
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.3
Clones locationClones are in the same method
Number of node comparisons28
  1. {Refactorable}
    Mapping Summary
    Number of mapped statements6
    Number of unmapped statements in the first code fragment0
    Number of unmapped statements in the second code fragment0
    Time elapsed for statement mapping (ms)6.3
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    10
    if (getSubSystem() != null)
    10
    if (getSubSystem() != null)
    1
    if (getComment() != null)
    Differences
    Expression1Expression2Difference
    getSubSystemgetCommentMETHOD_INVOCATION_NAME_MISMATCH
    1
    if (getComment() != null)
    11
    cmd.createArgument().setValue(FLAG_SUBSYSTEM);
    11
    cmd.createArgument().setValue(FLAG_SUBSYSTEM);
    2
    cmd.createArgument().setValue(FLAG_COMMENT);
    Differences
    Expression1Expression2Difference
    FLAG_SUBSYSTEMFLAG_COMMENTVARIABLE_NAME_MISMATCH
    2
    cmd.createArgument().setValue(FLAG_COMMENT);
    12
    cmd.createArgument().setValue("\"" + getSubSystem() + "\"");
    12
    cmd.createArgument().setValue("\"" + getSubSystem() + "\"");
    3
    cmd.createArgument().setValue("\"" + getComment() + "\"");
    Differences
    Expression1Expression2Difference
    getSubSystemgetCommentMETHOD_INVOCATION_NAME_MISMATCH
    3
    cmd.createArgument().setValue("\"" + getComment() + "\"");
    13
    if (getRelease() != null)
    13
    if (getRelease() != null)
    4
    if (getPlatform() != null)
    Differences
    Expression1Expression2Difference
    getReleasegetPlatformMETHOD_INVOCATION_NAME_MISMATCH
    4
    if (getPlatform() != null)
    14
    cmd.createArgument().setValue(FLAG_RELEASE);
    14
    cmd.createArgument().setValue(FLAG_RELEASE);
    5
    cmd.createArgument().setValue(FLAG_PLATFORM);
    Differences
    Expression1Expression2Difference
    FLAG_RELEASEFLAG_PLATFORMVARIABLE_NAME_MISMATCH
    5
    cmd.createArgument().setValue(FLAG_PLATFORM);
    15
    cmd.createArgument().setValue(getRelease());
    15
    cmd.createArgument().setValue(getRelease());
    6
    cmd.createArgument().setValue(getPlatform());
    Differences
    Expression1Expression2Difference
    getReleasegetPlatformMETHOD_INVOCATION_NAME_MISMATCH
    6
    cmd.createArgument().setValue(getPlatform());
    Precondition Violations (0)
    Row Violation