Type type = null; if ( operand instanceof SqlNode ) { type = ( ( SqlNode ) operand ).getDataType(); } if ( type == null && operand instanceof ExpectedTypeAwareNode ) { type = ( ( ExpectedTypeAwareNode ) operand ).getExpectedType(); } return type;
Type type = null; if ( operand instanceof SqlNode ) { type = ( ( SqlNode ) operand ).getDataType(); } if ( type == null && operand instanceof ExpectedTypeAwareNode ) { type = ( ( ExpectedTypeAwareNode ) operand ).getExpectedType(); } return type;
Clone fragments detected by clone detection tool
File path: /hibernate-distribution-3.3.2.GA/project/core/src/main/java/org/hibernate/hql/ast/tree/AbstractNullnessCheckNode.java File path: /hibernate-distribution-3.3.2.GA/project/core/src/main/java/org/hibernate/hql/ast/tree/BinaryLogicOperatorNode.java
Method name: Type extractDataType(Node) Method name: Type extractDataType(Node)
Number of AST nodes: 6 Number of AST nodes: 6
1
Type type = null;
1
Type type = null;
2
		if ( operand instanceof SqlNode ) {
2
		if ( operand instanceof SqlNode ) {
3
			type = ( ( SqlNode ) operand ).getDataType();
3
			type = ( ( SqlNode ) operand ).getDataType();
4
		}
4
		}
5
		if ( type == null && operand instanceof ExpectedTypeAwareNode ) {
5
		if ( type == null && operand instanceof ExpectedTypeAwareNode ) {
6
			type = ( ( ExpectedTypeAwareNode ) operand ).getExpectedType();
6
			type = ( ( ExpectedTypeAwareNode ) operand ).getExpectedType();
7
		}
7
		}
8
		return type;
8
		return type;
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 comparisons14
  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)1.3
    Clone typeType 1
    Mapped Statements
    ID Statement ID Statement
    1
    Type type = null;
    1
    Type type = null;
    2
    if (operand instanceof SqlNode)
    2
    if (operand instanceof SqlNode)
    3
    type = ((SqlNode)operand).getDataType();
    3
    type = ((SqlNode)operand).getDataType();
    4
    if (type == null && operand instanceof ExpectedTypeAwareNode)
    4
    if (type == null && operand instanceof ExpectedTypeAwareNode)
    5
    type = ((ExpectedTypeAwareNode)operand).getExpectedType();
    5
    type = ((ExpectedTypeAwareNode)operand).getExpectedType();
    6
    return type;
    6
    return type;
    Precondition Violations (0)
    Row Violation