Buggy code:
private int generateGroups ( final StringBuilder sb , final String parentMessageClassName , final List < Token > tokens , int index , final String indent ) throws IOException { } private void generateGroupClassHeader ( final StringBuilder sb , final String groupName , final String parentMessageClassName , final List < Token > tokens , final int index , final String indent ) { } private void generateClassDeclaration ( final StringBuilder sb , final String groupName , final String parentMessageClassName , final String indent , final String dimensionsClassName , final int dimensionHeaderSize ) { } private CharSequence generateGroupProperty ( final String groupName , final Token token , final String indent ) { } private CharSequence generateVarData ( final List < Token > tokens ) { } private void generateVarDataMethods ( final StringBuilder sb , final Token token , final String propertyName , final int sizeOfLengthField , final String lengthJavaType , final String lengthTypePrefix , final String byteOrderStr , final String characterEncoding ) { } private void generateBitSet ( final List < Token > tokens ) throws IOException { } private void generateEnum ( final List < Token > tokens ) throws IOException { } private void generateComposite ( final List < Token > tokens ) throws IOException { } private CharSequence generateChoiceClear ( final String bitSetClassName , final Token token ) { } private CharSequence generateChoices ( final String bitSetClassName , final List < Token > tokens ) { } private CharSequence generateEnumValues ( final List < Token > tokens ) { } private CharSequence generateEnumBody ( final Token token , final String enumName ) { } private CharSequence generateEnumLookupMethod ( final List < Token > tokens , final String enumName ) { } private CharSequence generateFileHeader ( final String packageName ) { } private CharSequence generateEnumFileHeader ( final String packageName ) { } private void generateAnnotations ( final String className , final List < Token > tokens , final Appendable out , int index ) throws IOException { } private CharSequence generateClassDeclaration ( final String className ) { } private void generateMetaAttributeEnum ( ) throws IOException { } private CharSequence generateEnumDeclaration ( final String name ) { } private CharSequence generatePrimitivePropertyEncodings ( final String containingClassName , final List < Token > tokens , final String indent ) { } private CharSequence generatePrimitiveProperty ( final String containingClassName , final String propertyName , final Token token , final String indent ) { } private CharSequence generatePrimitivePropertyMethods ( final String containingClassName , final String propertyName , final Token token , final String indent ) { } private CharSequence generatePrimitiveFieldMetaData ( final String propertyName , final Token token , final String indent ) { } private CharSequence generateSingleValueProperty ( final String containingClassName , final String propertyName , final Token token , final String indent ) { } private CharSequence generateFieldNotPresentCondition ( final int sinceVersion , final Encoding encoding , final String indent ) { } private CharSequence generateArrayFieldNotPresentCondition ( final int sinceVersion , final String indent ) { } private CharSequence generateStringNotPresentCondition ( final int sinceVersion , final String indent ) { } private CharSequence generateTypeFieldNotPresentCondition ( final int sinceVersion , final String indent ) { } private CharSequence generateArrayProperty ( final String containingClassName , final String propertyName , final Token token , final String indent ) { } private void generateCharacterEncodingMethod ( final StringBuilder sb , final String propertyName , final String encoding , final String indent ) { } private CharSequence generateConstPropertyMethods ( final String propertyName , final Token token , final String indent ) { } private CharSequence generateByteLiteralList ( final byte [ ] bytes ) { } private CharSequence generateFixedFlyweightCode ( final String className , final int size ) { } private CharSequence generateMessageFlyweightCode ( final String className , final Token token ) { } private CharSequence generateFields ( final String containingClassName , final List < Token > tokens , final String indent ) { } private void generateFieldIdMethod ( final StringBuilder sb , final Token token , final String indent ) { } private void generateFieldMetaAttributeMethod ( final StringBuilder sb , final Token token , final String indent ) { } private CharSequence generateEnumProperty ( final String containingClassName , final String propertyName , final Token token , final String indent ) { <START_BUG> final String enumName = token . name ( ) ; <END_BUG> final Encoding encoding = token . encoding ( ) ; final String typePrefix = encoding . primitiveType ( ) . primitiveName ( ) ; final int offset = token . offset ( ) ; final ByteOrder byteOrder = encoding . byteOrder ( ) ; final String byteOrderStr = ( ( encoding . primitiveType ( ) . size ( ) ) == 1 ) ? "" : ",<seq2seq4repair_space>java.nio.ByteOrder." + byteOrder ; final StringBuilder sb = new StringBuilder ( ) ; sb . append ( String . format ( ( ( ( ( ( ( ( ( ( "\n" + indent ) + "<seq2seq4repair_space>public<seq2seq4repair_space>%s<seq2seq4repair_space>%s()\n" ) + indent ) + "<seq2seq4repair_space>{\n" ) + "%s" ) + indent ) + "<seq2seq4repair_space>return<seq2seq4repair_space>%s.get(CodecUtil.%sGet(buffer,<seq2seq4repair_space>offset<seq2seq4repair_space>+<seq2seq4repair_space>%d%s));\n" ) + indent ) + "<seq2seq4repair_space>}\n\n" ) , enumName , propertyName , generateTypeFieldNotPresentCondition ( token . version ( ) , indent ) , enumName , typePrefix , offset , byteOrderStr ) ) ; sb . append ( String . format ( ( ( ( ( ( ( ( ( ( indent + "<seq2seq4repair_space>public<seq2seq4repair_space>%s<seq2seq4repair_space>%s(final<seq2seq4repair_space>%s<seq2seq4repair_space>value)\n" ) + indent ) + "<seq2seq4repair_space>{\n" ) + indent ) + "<seq2seq4repair_space>CodecUtil.%sPut(buffer,<seq2seq4repair_space>offset<seq2seq4repair_space>+<seq2seq4repair_space>%d,<seq2seq4repair_space>value.value()%s);\n" ) + indent ) + "<seq2seq4repair_space>return<seq2seq4repair_space>this;\n" ) + indent ) + "<seq2seq4repair_space>}\n" ) , formatClassName ( containingClassName ) , propertyName , enumName , typePrefix , offset , byteOrderStr ) ) ; return sb ; } private Object generateBitSetProperty ( final String propertyName , final Token token , final String indent ) { } private Object generateCompositeProperty ( final String propertyName , final Token token , final String indent ) { } private String generateLiteral ( final PrimitiveType type , final String value ) { } }

Fix:
final String enumName = formatClassName ( token . name ( ) ) ;