int result = 0; // Check for required attributes if (getTypeKind() == null) { throw new BuildException("Required attribute TypeKind not specified"); } if (getTypeName() == null) { throw new BuildException("Required attribute TypeName not specified"); }
int result = 0; // Check for required attributes if (getTypeName() == null) { throw new BuildException("Required attribute TypeName not specified"); } if (getTypeValue() == null) { throw new BuildException("Required attribute TypeValue not specified"); }
Clone fragments detected by clone detection tool
File path: /apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/optional/clearcase/CCRmtype.java File path: /apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/optional/clearcase/CCMkattr.java
Method name: void execute() Method name: void execute()
Number of AST nodes: 5 Number of AST nodes: 5
1
int result = 0;
1
int result = 0;
2
        // Check for required attributes
2
        // Check for required attributes
3
        if (getTypeKind() == null) {
3
        if (getTypeName() == null) {
4
            throw new BuildException("Required attribute TypeKind not specified");
4
            throw new BuildException("Required attribute TypeName not specified");
5
        }
5
        }
6
        if (getTypeName() == null) {
6
        if (getTypeValue() == null) {
7
            throw new BuildException("Required attribute TypeName not specified");
7
            throw new BuildException("Required attribute TypeValue not specified");
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 different classes having the same super class
Number of node comparisons14
  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)14.7
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    2
    int result = 0;
    3
    int result = 0;
    3
    if (getTypeKind() == null)
    3
    if (getTypeKind() == null)
    4
    if (getTypeName() == null)
    Differences
    Expression1Expression2Difference
    getTypeKindgetTypeNameMETHOD_INVOCATION_NAME_MISMATCH
    4
    if (getTypeName() == null)
    4
    throw new BuildException("Required attribute TypeKind not specified");
    4
    throw new BuildException("Required attribute TypeKind not specified");
    5
    throw new BuildException("Required attribute TypeName not specified");
    Differences
    Expression1Expression2Difference
    "Required attribute TypeKind not specified""Required attribute TypeName not specified"LITERAL_VALUE_MISMATCH
    5
    throw new BuildException("Required attribute TypeName not specified");
    5
    if (getTypeName() == null)
    5
    if (getTypeName() == null)
    6
    if (getTypeValue() == null)
    Differences
    Expression1Expression2Difference
    getTypeNamegetTypeValueMETHOD_INVOCATION_NAME_MISMATCH
    6
    if (getTypeValue() == null)
    6
    throw new BuildException("Required attribute TypeName not specified");
    6
    throw new BuildException("Required attribute TypeName not specified");
    7
    throw new BuildException("Required attribute TypeValue not specified");
    Differences
    Expression1Expression2Difference
    "Required attribute TypeName not specified""Required attribute TypeValue not specified"LITERAL_VALUE_MISMATCH
    7
    throw new BuildException("Required attribute TypeValue not specified");
    Precondition Violations (0)
    Row Violation