Buggy code:
protected Comment [ ] commentsTable ; char [ ] compilationUnitSource ; protected DocCommentParser docParser ; protected boolean insideComments ; protected IProgressMonitor monitor ; protected Set pendingNameScopeResolution ; protected Set pendingThisExpressionScopeResolution ; protected boolean resolveBindings ; Scanner scanner ; private DefaultCommentMapper commentMapper ; public ASTConverter ( Map options , boolean resolveBindings , IProgressMonitor monitor ) { } protected void adjustSourcePositionsForParent ( Expression expression ) { } protected void buildBodyDeclarations ( EnumConstant enumConstant , EnumConstantDeclaration enumConstantDeclaration ) { } protected void buildBodyDeclarations ( org . eclipse . jdt . internal . compiler . ast . AnnotationTypeDeclaration typeDeclaration , AnnotationTypeDeclaration typeDecl ) { } protected void buildBodyDeclarations ( org . eclipse . jdt . internal . compiler . ast . EnumDeclaration enumDeclaration2 , EnumDeclaration enumDeclaration ) { TypeDeclaration [ ] members = enumDeclaration2 . memberTypes ; FieldDeclaration [ ] fields = enumDeclaration2 . fields ; AbstractMethodDeclaration [ ] methods = enumDeclaration2 . methods ; org . eclipse . jdt . internal . compiler . ast . EnumConstant [ ] enumConstants = enumDeclaration2 . enumConstants ; int fieldsLength = ( fields == null ) ? 0 : fields . length ; int methodsLength = ( methods == null ) ? 0 : methods . length ; int membersLength = ( members == null ) ? 0 : members . length ; int enumConstantsLength = ( enumConstants == null ) ? 0 : enumConstants . length ; int fieldsIndex = 0 ; int methodsIndex = 0 ; int membersIndex = 0 ; int enumConstantsIndex = 0 ; while ( ( ( ( fieldsIndex < fieldsLength ) || ( membersIndex < membersLength ) ) || ( methodsIndex < methodsLength ) ) || ( enumConstantsIndex < enumConstantsLength ) ) { FieldDeclaration nextFieldDeclaration = null ; AbstractMethodDeclaration nextMethodDeclaration = null ; TypeDeclaration nextMemberDeclaration = null ; org . eclipse . jdt . internal . compiler . ast . EnumConstant nextEnumConstant = null ; int position = Integer . MAX_VALUE ; int nextDeclarationType = - 1 ; if ( fieldsIndex < fieldsLength ) { nextFieldDeclaration = fields [ fieldsIndex ] ; if ( ( nextFieldDeclaration . declarationSourceStart ) < position ) { position = nextFieldDeclaration . declarationSourceStart ; nextDeclarationType = 0 ; } } if ( methodsIndex < methodsLength ) { nextMethodDeclaration = methods [ methodsIndex ] ; if ( ( nextMethodDeclaration . declarationSourceStart ) < position ) { position = nextMethodDeclaration . declarationSourceStart ; nextDeclarationType = 1 ; } } if ( membersIndex < membersLength ) { nextMemberDeclaration = members [ membersIndex ] ; if ( ( nextMemberDeclaration . declarationSourceStart ) < position ) { position = nextMemberDeclaration . declarationSourceStart ; nextDeclarationType = 2 ; } } if ( enumConstantsIndex < enumConstantsLength ) { nextEnumConstant = enumConstants [ enumConstantsIndex ] ; if ( ( nextEnumConstant . declarationSourceStart ) < position ) { position = nextEnumConstant . declarationSourceStart ; nextDeclarationType = 3 ; } } switch ( nextDeclarationType ) { case 0 : checkAndAddMultipleFieldDeclaration ( fields , fieldsIndex , enumDeclaration . bodyDeclarations ( ) ) ; fieldsIndex ++ ; break ; case 1 : methodsIndex ++ ; if ( ( ! ( nextMethodDeclaration . isDefaultConstructor ( ) ) ) && ( ! ( nextMethodDeclaration . isClinit ( ) ) ) ) { enumDeclaration . bodyDeclarations ( ) . add ( convert ( nextMethodDeclaration ) ) ; } break ; case 2 : membersIndex ++ ; enumDeclaration . bodyDeclarations ( ) . add ( convert ( nextMemberDeclaration ) ) ; break ; case 3 : enumConstantsIndex ++ ; <START_BUG> enumDeclaration . bodyDeclarations ( ) . add ( convert ( nextEnumConstant ) ) ; <END_BUG> } } convert ( enumDeclaration2 . javadoc , enumDeclaration ) ; } protected void buildBodyDeclarations ( TypeDeclaration expression , AnonymousClassDeclaration anonymousClassDeclaration ) { } protected void buildBodyDeclarations ( TypeDeclaration typeDeclaration , TypeDeclaration typeDecl ) { } void buildCommentsTable ( CompilationUnit compilationUnit , int [ ] [ ] comments ) { } protected void checkAndAddMultipleFieldDeclaration ( FieldDeclaration [ ] fields , int index , List bodyDeclarations ) { } protected void checkAndAddMultipleLocalDeclaration ( Statement [ ] stmts , int index , List blockStatements ) { } protected void checkCanceled ( ) { } protected void completeRecord ( ArrayType arrayType , ASTNode astNode ) { } public ASTNode convert ( AbstractMethodDeclaration methodDeclaration ) { } public ClassInstanceCreation convert ( AllocationExpression expression ) { } public Expression convert ( AND_AND_Expression expression ) { } public AnnotationTypeDeclaration convert ( org . eclipse . jdt . internal . compiler . ast . AnnotationTypeDeclaration typeDeclaration ) { } public ASTNode convert ( org . eclipse . jdt . internal . compiler . ast . AnnotationTypeMemberDeclaration annotationTypeMemberDeclaration ) { } public SingleVariableDeclaration convert ( Argument argument ) { } public Annotation convert ( org . eclipse . jdt . internal . compiler . ast . Annotation annotation ) { } public ArrayCreation convert ( ArrayAllocationExpression expression ) { } public ArrayInitializer convert ( org . eclipse . jdt . internal . compiler . ast . ArrayInitializer expression ) { } public ArrayAccess convert ( ArrayReference reference ) { } public AssertStatement convert ( org . eclipse . jdt . internal . compiler . ast . AssertStatement statement ) { } public Assignment convert ( org . eclipse . jdt . internal . compiler . ast . Assignment expression ) { } public TypeDeclaration convert ( ASTNode [ ] nodes ) { } public Expression convert ( BinaryExpression expression ) { } public Block convert ( org . eclipse . jdt . internal . compiler . ast . Block statement ) { } public BreakStatement convert ( org . eclipse . jdt . internal . compiler . ast . BreakStatement statement ) { } public SwitchCase convert ( CaseStatement statement ) { } public CastExpression convert ( org . eclipse . jdt . internal . compiler . ast . CastExpression expression ) { } public CharacterLiteral convert ( CharLiteral expression ) { } public Expression convert ( ClassLiteralAccess expression ) { }

Fix:
enumDeclaration . enumConstants ( ) . add ( convert ( nextEnumConstant ) ) ;