Buggy code:
private static final String FIELD_NAME_FOREIGN_COLLECTION_EAGER = "foreignCollectionEager" ; private static final String FIELD_NAME_MAX_EAGER_FOREIGN_COLLECTION_LEVEL_OLD = "maxEagerForeignCollectionLevel" ; private static final String FIELD_NAME_MAX_EAGER_FOREIGN_COLLECTION_LEVEL = "foreignCollectionMaxEagerLevel" ; private static final String FIELD_NAME_FOREIGN_COLLECTION_COLUMN_NAME = "foreignCollectionColumnName" ; private static final String FIELD_NAME_FOREIGN_COLLECTION_ORDER_COLUMN_NAME_OLD = "foreignCollectionOrderColumn" ; private static final String FIELD_NAME_FOREIGN_COLLECTION_ORDER_COLUMN_NAME = "foreignCollectionOrderColumnName" ; private static final String FIELD_NAME_FOREIGN_COLLECTION_ORDER_ASCENDING = "foreignCollectionOrderAscending" ; private static final String FIELD_NAME_FOREIGN_COLLECTION_FOREIGN_FIELD_NAME_OLD = "foreignCollectionForeignColumnName" ; private static final String FIELD_NAME_FOREIGN_COLLECTION_FOREIGN_FIELD_NAME = "foreignCollectionForeignFieldName" ; public static void writeConfig ( BufferedWriter writer , DatabaseFieldConfig config , String tableName ) throws IOException { writer . append ( DatabaseFieldConfigLoader . CONFIG_FILE_START_MARKER ) ; writer . newLine ( ) ; if ( ( config . getFieldName ( ) ) != null ) { writer . append ( DatabaseFieldConfigLoader . FIELD_NAME_FIELD_NAME ) . append ( '=' ) . append ( config . getFieldName ( ) ) ; writer . newLine ( ) ; } if ( ( config . getColumnName ( ) ) != null ) { writer . append ( DatabaseFieldConfigLoader . FIELD_NAME_COLUMN_NAME ) . append ( '=' ) . append ( config . getColumnName ( ) ) ; writer . newLine ( ) ; } if ( ( config . getDataPersister ( ) ) != ( DatabaseFieldConfigLoader . DEFAULT_DATA_PERSISTER ) ) { boolean found = false ; for ( DataType dataType : DataType . values ( ) ) { if ( ( dataType . getDataPersister ( ) ) == ( config . getDataPersister ( ) ) ) { writer . append ( DatabaseFieldConfigLoader . FIELD_NAME_DATA_PERSISTER ) . append ( '=' ) . append ( dataType . name ( ) ) ; writer . newLine ( ) ; found = true ; break ; } } if ( ! found ) { throw new IllegalArgumentException ( ( "Unknown<seq2seq4repair_space>data<seq2seq4repair_space>persister<seq2seq4repair_space>field:<seq2seq4repair_space>" + ( config . getDataPersister ( ) ) ) ) ; } } if ( ( config . getDefaultValue ( ) ) != null ) { writer . append ( DatabaseFieldConfigLoader . FIELD_NAME_DEFAULT_VALUE ) . append ( '=' ) . append ( config . getDefaultValue ( ) ) ; writer . newLine ( ) ; } if ( ( config . getWidth ( ) ) != 0 ) { writer . append ( DatabaseFieldConfigLoader . FIELD_NAME_WIDTH ) . append ( '=' ) . append ( Integer . toString ( config . getWidth ( ) ) ) ; writer . newLine ( ) ; } if ( ( config . isCanBeNull ( ) ) != ( DatabaseFieldConfig . DEFAULT_CAN_BE_NULL ) ) { writer . append ( DatabaseFieldConfigLoader . FIELD_NAME_CAN_BE_NULL ) . append ( '=' ) . append ( Boolean . toString ( config . isCanBeNull ( ) ) ) ; writer . newLine ( ) ; } if ( config . isId ( ) ) { writer . append ( DatabaseFieldConfigLoader . FIELD_NAME_ID ) . append ( '=' ) . append ( "true" ) ; writer . newLine ( ) ; } if ( config . isGeneratedId ( ) ) { writer . append ( DatabaseFieldConfigLoader . FIELD_NAME_GENERATED_ID ) . append ( '=' ) . append ( "true" ) ; writer . newLine ( ) ; } if ( ( config . getGeneratedIdSequence ( ) ) != null ) { writer . append ( DatabaseFieldConfigLoader . FIELD_NAME_GENERATED_ID_SEQUENCE ) . append ( '=' ) . append ( config . getGeneratedIdSequence ( ) ) ; writer . newLine ( ) ; } if ( config . isForeign ( ) ) { writer . append ( DatabaseFieldConfigLoader . FIELD_NAME_FOREIGN ) . append ( '=' ) . append ( "true" ) ; writer . newLine ( ) ; } if ( config . isUseGetSet ( ) ) { writer . append ( DatabaseFieldConfigLoader . FIELD_NAME_USE_GET_SET ) . append ( '=' ) . append ( "true" ) ; writer . newLine ( ) ; } if ( ( config . getUnknownEnumValue ( ) ) != null ) { <START_BUG> writer . append ( DatabaseFieldConfigLoader . FIELD_NAME_UNKNOWN_ENUM_VALUE ) . append ( '=' ) . append ( config . getUnknownEnumValue ( ) . getClass ( ) . getName ( ) ) . append ( "#" ) . append ( config . getUnknownEnumValue ( ) . name ( ) ) ; <END_BUG> writer . newLine ( ) ; } if ( config . isThrowIfNull ( ) ) { writer . append ( DatabaseFieldConfigLoader . FIELD_NAME_THROW_IF_NULL ) . append ( '=' ) . append ( "true" ) ; writer . newLine ( ) ; } if ( ( config . getFormat ( ) ) != null ) { writer . append ( DatabaseFieldConfigLoader . FIELD_NAME_FORMAT ) . append ( '=' ) . append ( config . getFormat ( ) ) ; writer . newLine ( ) ; } if ( config . isUnique ( ) ) { writer . append ( DatabaseFieldConfigLoader . FIELD_NAME_UNIQUE ) . append ( '=' ) . append ( "true" ) ; writer . newLine ( ) ; } if ( config . isUniqueCombo ( ) ) { writer . append ( DatabaseFieldConfigLoader . FIELD_NAME_UNIQUE_COMBO ) . append ( '=' ) . append ( "true" ) ; writer . newLine ( ) ; } String indexName = config . getIndexName ( tableName ) ; if ( indexName != null ) { writer . append ( DatabaseFieldConfigLoader . FIELD_NAME_INDEX_NAME ) . append ( '=' ) . append ( indexName ) ; writer . newLine ( ) ; } String uniqueIndexName = config . getUniqueIndexName ( tableName ) ; if ( uniqueIndexName != null ) { writer . append ( DatabaseFieldConfigLoader . FIELD_NAME_UNIQUE_INDEX_NAME ) . append ( '=' ) . append ( uniqueIndexName ) ; writer . newLine ( ) ; } if ( config . isForeignAutoRefresh ( ) ) { writer . append ( DatabaseFieldConfigLoader . FIELD_NAME_FOREIGN_AUTO_REFRESH ) . append ( '=' ) . append ( "true" ) ; writer . newLine ( ) ; }

Fix:
writer . append ( DatabaseFieldConfigLoader . FIELD_NAME_UNKNOWN_ENUM_VALUE ) . append ( '=' ) . append ( config . getUnknownEnumValue ( ) . getDeclaringClass ( ) . getName ( ) ) . append ( "#" ) . append ( config . getUnknownEnumValue ( ) . name ( ) ) ;