String result = hibernateTypeNames.get( code ); if ( result == null ) { throw new HibernateException( "No Hibernate type mapping for java.sql.Types code: " + code ); } return result;
String result = typeNames.get( code ); if ( result == null ) { throw new HibernateException( "No default type mapping for (java.sql.Types) " + code ); } return result;
Clone fragments detected by clone detection tool
File path: /hibernate-distribution-3.3.2.GA/project/core/src/main/java/org/hibernate/dialect/Dialect.java File path: /hibernate-distribution-3.3.2.GA/project/core/src/main/java/org/hibernate/dialect/Dialect.java
Method name: String getHibernateTypeName(int) Method name: String getTypeName(int)
Number of AST nodes: 4 Number of AST nodes: 4
1
String result = hibernateTypeNames.get( code );
1
String result = typeNames.get( code );
2
		if ( result == null ) {
2
		if ( result == null ) {
3
			throw new HibernateException( "No Hibernate type mapping for java.sql.Types code: " + code );
3
			throw new HibernateException( "No default type mapping for (java.sql.Types) " + code );
4
		}
4
		}
5
		return result;
5
		return result;
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.1
Clones locationClones are declared in the same class
Number of node comparisons8
  1. {Refactorable}
    Mapping Summary
    Number of mapped statements4
    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.7
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    1
    String result = hibernateTypeNames.get(code);
    1
    String result = hibernateTypeNames.get(code);
    1
    String result = typeNames.get(code);
    Differences
    Expression1Expression2Difference
    hibernateTypeNamestypeNamesVARIABLE_NAME_MISMATCH
    1
    String result = typeNames.get(code);
    2
    if (result == null)
    2
    if (result == null)
    3
    throw new HibernateException("No Hibernate type mapping for java.sql.Types code: " + code);
    3
    throw new HibernateException("No Hibernate type mapping for java.sql.Types code: " + code);
    3
    throw new HibernateException("No default type mapping for (java.sql.Types) " + code);
    Differences
    Expression1Expression2Difference
    "No Hibernate type mapping for java.sql.Types code: ""No default type mapping for (java.sql.Types) "LITERAL_VALUE_MISMATCH
    3
    throw new HibernateException("No default type mapping for (java.sql.Types) " + code);
    4
    return result;
    4
    return result;
    Precondition Violations (0)
    Row Violation