String typenm = getTypeName(); if (typenm != null) { cmd.createArgument().setValue(typenm); }
String anonSchema = getNoNamespaceSchemaURL(); if (anonSchema != null) { setProperty(property, anonSchema); }
Clone fragments detected by clone detection tool
File path: /apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/optional/clearcase/CCMkattr.java File path: /apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/optional/SchemaValidate.java
Method name: void getTypeCommand(Commandline) Method name: void setNoNamespaceSchemaProperty(String)
Number of AST nodes: 3 Number of AST nodes: 3
1
String typenm = getTypeName();
1
String anonSchema = getNoNamespaceSchemaURL();
2
        if (typenm != null) {
2
        if (anonSchema != null) {
3
            cmd.createArgument().setValue(typenm);
3
            setProperty(property, anonSchema);
4
        }
4
        }
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 comparisons5
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements3
    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 typenm = getTypeName();
    1
    String typenm = getTypeName();
    1
    String anonSchema = getNoNamespaceSchemaURL();
    Differences
    Expression1Expression2Difference
    typenmanonSchemaVARIABLE_NAME_MISMATCH
    getTypeNamegetNoNamespaceSchemaURLMETHOD_INVOCATION_NAME_MISMATCH
    1
    String anonSchema = getNoNamespaceSchemaURL();
    2
    if (typenm != null)
    2
    if (typenm != null)
    2
    if (anonSchema != null)
    Differences
    Expression1Expression2Difference
    typenmanonSchemaVARIABLE_NAME_MISMATCH
    2
    if (anonSchema != null)
    3
    cmd.createArgument().setValue(typenm);
    3
    cmd.createArgument().setValue(typenm);
    3
    setProperty(property, anonSchema);
    Differences
    Expression1Expression2Difference
    setValuesetPropertyMETHOD_INVOCATION_NAME_MISMATCH
    cmd.createArgument().setValue(typenm)setProperty(property,anonSchema)ARGUMENT_NUMBER_MISMATCH
    cmd.createArgument()MISSING_METHOD_INVOCATION_EXPRESSION
    Preondition Violations
    Expression cmd.createArgument().setValue(typenm) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression setProperty(property,anonSchema) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression cmd.createArgument().setValue(typenm) is a void method call, and thus it cannot be parameterized
    Expression setProperty(property,anonSchema) is a void method call, and thus it cannot be parameterized
    Expression cmd.createArgument().setValue(typenm) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression setProperty(property,anonSchema) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression cmd.createArgument().setValue(typenm) is a void method call, and thus it cannot be parameterized
    Expression setProperty(property,anonSchema) is a void method call, and thus it cannot be parameterized
    3
    setProperty(property, anonSchema);
    Precondition Violations (8)
    Row Violation
    1Expression cmd.createArgument().setValue(typenm) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    2Expression setProperty(property,anonSchema) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    3Expression cmd.createArgument().setValue(typenm) is a void method call, and thus it cannot be parameterized
    4Expression setProperty(property,anonSchema) is a void method call, and thus it cannot be parameterized
    5Expression cmd.createArgument().setValue(typenm) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    6Expression setProperty(property,anonSchema) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    7Expression cmd.createArgument().setValue(typenm) is a void method call, and thus it cannot be parameterized
    8Expression setProperty(property,anonSchema) is a void method call, and thus it cannot be parameterized