Buggy code:
public abstract class ColumnType { protected boolean nullable = true ; public Object defaultValue ; public String toString ( ) { } public boolean isNullable ( ) { } public ColumnType setNullable ( boolean nullAble ) { } public ColumnType notNull ( ) { } public ColumnType defaultIs ( Object obj ) { } public Map < String , Object > toJpaAnnonation ( ) { } public void setDefault ( Object obj ) { } public List < ColumnChange > isEqualTo ( Column c , DatabaseDialect profile ) { } protected abstract boolean compare ( ColumnType type , DatabaseDialect profile ) ; protected abstract void putAnnonation ( Map < String , Object > map ) { } public abstract Class < ? > getDefaultJavaType ( ) { } public abstract int getSqlType ( ) { } public abstract ColumnMapping getMappingType ( Class < ? > fieldType ) { } public static final class Char extends ColumnType implements SqlTypeSized { protected int length ; public Char ( int length ) { } public int getLength ( ) { } public Class < ? > getDefaultJavaType ( ) { } @ Override protected void putAnnonation ( Map < String , Object > map ) { } @ Override protected boolean compare ( ColumnType type , DatabaseDialect profile ) { ColumnType . Char rhs = ( ( ColumnType . Char ) ( type ) ) ; return ( rhs . length ) == ( this . length ) ; } @ Override public ColumnMapping getMappingType ( Class < ? > fieldType ) { } @ Override public int getSqlType ( ) { } @ Override public int getPrecision ( ) { } @ Override public int getScale ( ) { } } public static class Varchar extends ColumnType implements SqlTypeSized { protected int length ; public Varchar ( int length ) { } public int getLength ( ) { } @ Override public Class < ? > getDefaultJavaType ( ) { } @ Override protected void putAnnonation ( Map < String , Object > map ) { } @ Override protected boolean compare ( ColumnType type , DatabaseDialect profile ) { <START_BUG> if ( type instanceof ColumnType . Varchar ) { <END_BUG> return false ; } ColumnType . Varchar rhs = ( ( ColumnType . Varchar ) ( type ) ) ; return ( rhs . length ) == ( this . length ) ; } @ Override public ColumnMapping getMappingType ( Class < ? > fieldType ) { } @ Override public int getSqlType ( ) { } @ Override public int getPrecision ( ) { } @ Override public int getScale ( ) { } } public static final class Boolean extends ColumnType { @ Override public Class < ? > getDefaultJavaType ( ) { } @ Override protected void putAnnonation ( Map < String , Object > map ) { } @ Override protected boolean compare ( ColumnType type , DatabaseDialect profile ) { return true ; } @ Override public ColumnMapping getMappingType ( Class < ? > fieldType ) { } @ Override public int getSqlType ( ) { } } public static final class Double extends ColumnType implements SqlTypeSized { int precision = 16 ; int scale = 6 ; public Double ( int precision , int scale ) { } public Class < ? > getDefaultJavaType ( ) { } @ Override protected void putAnnonation ( Map < String , Object > map ) { } @ Override protected boolean compare ( ColumnType type , DatabaseDialect profile ) { ColumnType . Double rhs = ( ( ColumnType . Double ) ( type ) ) ; if ( ( profile . getName ( ) ) == ( RDBMS . oracle ) ) { return ( ( rhs . precision ) == ( this . precision ) ) && ( ( rhs . scale ) == ( this . scale ) ) ; } else { int p1 = Math . abs ( ( ( rhs . precision ) - ( this . precision ) ) ) ; int p2 = Math . abs ( ( ( rhs . scale ) - ( this . scale ) ) ) ; return ( p1 < 3 ) && ( p2 < 3 ) ; } } @ Override public ColumnMapping getMappingType ( Class < ? > fieldType ) { } @ Override public int getSqlType ( ) { } @ Override public int getLength ( ) { } @ Override public int getPrecision ( ) { } @ Override public int getScale ( ) { } } public static class Int extends ColumnType implements SqlTypeSized { int precision = 8 ; public Int ( int precision ) { } public Class < ? > getDefaultJavaType ( ) { } @ Override protected void putAnnonation ( Map < String , Object > map ) { } public int getPrecision ( ) { } @ Override protected boolean compare ( ColumnType type , DatabaseDialect profile ) { ColumnType . Int rhs = ( ( ColumnType . Int ) ( type ) ) ; if ( ( profile . getName ( ) ) == ( RDBMS . oracle ) ) { return ( rhs . precision ) == ( this . precision ) ; } else { return ( Math . abs ( ( ( rhs . precision ) - ( this . precision ) ) ) ) < 3 ; } } @ Override public ColumnMapping getMappingType ( Class < ? > fieldType ) { } @ Override public int getSqlType ( ) { } @ Override public int getLength ( ) { } @ Override public int getScale ( ) { } } public static final class Date extends ColumnType implements SqlTypeDateTimeGenerated { private int generateType ; public int getGenerateType ( ) { } public ColumnType setGenerateType ( int generateType ) { } public Class < ? > getDefaultJavaType ( ) { }

Fix:
if ( ! ( type instanceof ColumnType . Varchar ) ) {