Buggy code:
public class SourceElementParser extends CommentRecorderParser { ISourceElementRequestor requestor ; int fieldCount ; ISourceType sourceType ; boolean reportReferenceInfo ; char [ ] [ ] typeNames ; char [ ] [ ] superTypeNames ; int nestedTypeIndex ; NameReference [ ] unknownRefs ; int unknownRefsCounter ; SourceElementParser . LocalDeclarationVisitor localDeclarationVisitor = null ; CompilerOptions options ; HashtableOfObjectToInt sourceEnds = new HashtableOfObjectToInt ( ) ; public class LocalDeclarationVisitor extends ASTVisitor { ArrayList declaringTypes ; public void pushDeclaringType ( TypeDeclaration declaringType ) { } public void popDeclaringType ( ) { } public TypeDeclaration peekDeclaringType ( ) { } public boolean visit ( TypeDeclaration typeDeclaration , BlockScope scope ) { } public boolean visit ( TypeDeclaration typeDeclaration , ClassScope scope ) { } } public SourceElementParser ( final ISourceElementRequestor requestor , IProblemFactory problemFactory , CompilerOptions options ) { } public SourceElementParser ( final ISourceElementRequestor requestor , IProblemFactory problemFactory , CompilerOptions options , boolean reportLocalDeclarations ) { } public void checkComment ( ) { } private void acceptJavadocTypeReference ( Expression expression ) { } protected void classInstanceCreation ( boolean alwaysQualified ) { } protected void consumeAnnotationTypeMemberDeclarationHeader ( ) { } protected void consumeAnnotationTypeMemberDeclarationHeaderWithTypeParameters ( ) { } protected void consumeConstructorHeaderName ( ) { } protected void consumeConstructorHeaderNameWithTypeParameters ( ) { } protected void consumeEnumConstantWithClassBody ( ) { } protected void consumeEnumConstantNoClassBody ( ) { } protected void consumeExitVariableWithInitialization ( ) { } protected void consumeExitVariableWithoutInitialization ( ) { } protected void consumeFieldAccess ( boolean isSuperAccess ) { } protected void consumeMethodHeaderName ( ) { } protected void consumeMethodHeaderNameWithTypeParameters ( ) { } protected void consumeMethodInvocationName ( ) { } protected void consumeMethodInvocationNameWithTypeArguments ( ) { } protected void consumeMethodInvocationPrimary ( ) { } protected void consumeMethodInvocationPrimaryWithTypeArguments ( ) { } protected void consumeMethodInvocationSuper ( ) { } protected void consumeMethodInvocationSuperWithTypeArguments ( ) { } protected void consumeSingleStaticImportDeclarationName ( ) { } protected void consumeSingleTypeImportDeclarationName ( ) { } protected void consumeStaticImportOnDemandDeclarationName ( ) { } protected void consumeTypeImportOnDemandDeclarationName ( ) { } public MethodDeclaration convertToMethodDeclaration ( ConstructorDeclaration c , CompilationResult compilationResult ) { } protected CompilationUnitDeclaration endParse ( int act ) { } public TypeReference getTypeReference ( int dim ) { } public NameReference getUnspecifiedReference ( ) { } public NameReference getUnspecifiedReferenceOptimized ( ) { } public void notifySourceElementRequestor ( CompilationUnitDeclaration parsedUnit ) { } private void notifyAllUnknownReferences ( ) { } public void notifySourceElementRequestor ( AbstractMethodDeclaration methodDeclaration ) { } private ISourceElementRequestor . TypeParameterInfo [ ] getTypeParameterInfos ( TypeParameter [ ] typeParameters ) { } public void notifySourceElementRequestor ( FieldDeclaration fieldDeclaration , TypeDeclaration declaringType ) { boolean isInRange = ( ( scanner . initialPosition ) <= ( fieldDeclaration . declarationSourceStart ) ) && ( ( scanner . eofPosition ) >= ( fieldDeclaration . declarationSourceEnd ) ) ; switch ( fieldDeclaration . getKind ( ) ) { case AbstractVariableDeclaration . ENUM_CONSTANT : if ( ( fieldDeclaration . initialization ) instanceof AllocationExpression ) { AllocationExpression alloc = ( ( AllocationExpression ) ( fieldDeclaration . initialization ) ) ; requestor . acceptConstructorReference ( declaringType . name , ( ( alloc . arguments ) == null ? 0 : alloc . arguments . length ) , alloc . sourceStart ) ; } case AbstractVariableDeclaration . FIELD : int fieldEndPosition = this . sourceEnds . get ( fieldDeclaration ) ; <START_BUG> if ( fieldEndPosition == 0 ) { <END_BUG> fieldEndPosition = fieldDeclaration . declarationSourceEnd ; } if ( isInRange ) { int currentModifiers = fieldDeclaration . modifiers ; boolean deprecated = ( currentModifiers & ( AccDeprecated ) ) != 0 ; char [ ] typeName = null ; if ( ( fieldDeclaration . type ) == null ) { typeName = declaringType . name ; currentModifiers |= AccEnum ; } else { typeName = CharOperation . concatWith ( fieldDeclaration . type . getParameterizedTypeName ( ) , '.' ) ; } ISourceElementRequestor . FieldInfo fieldInfo = new ISourceElementRequestor . FieldInfo ( ) ; fieldInfo . declarationStart = fieldDeclaration . declarationSourceStart ; fieldInfo . name = fieldDeclaration . name ; fieldInfo . modifiers = ( deprecated ) ? ( currentModifiers & ( AccJustFlag ) ) | ( AccDeprecated ) : currentModifiers & ( AccJustFlag ) ; fieldInfo . type = typeName ; fieldInfo . nameSourceStart = fieldDeclaration . sourceStart ; fieldInfo . nameSourceEnd = fieldDeclaration . sourceEnd ; requestor . enterField ( fieldInfo ) ; } this . visitIfNeeded ( fieldDeclaration , declaringType ) ; if ( isInRange ) { requestor . exitField ( ( ( ( ( ( ( ( ( ( ( fieldDeclaration . initialization ) == null ) || ( ( fieldDeclaration . initialization ) instanceof ArrayInitializer ) ) || ( ( fieldDeclaration . initialization ) instanceof AllocationExpression ) ) || ( ( fieldDeclaration . initialization ) instanceof ArrayAllocationExpression ) ) || ( ( fieldDeclaration . initialization ) instanceof Assignment ) ) || ( ( fieldDeclaration . initialization ) instanceof ClassLiteralAccess ) ) || ( ( fieldDeclaration . initialization ) instanceof MessageSend ) ) || ( ( fieldDeclaration . initialization ) instanceof ArrayReference ) ) || ( ( fieldDeclaration . initialization ) instanceof ThisReference ) ? - 1 : fieldDeclaration . initialization . sourceStart ) , fieldEndPosition , fieldDeclaration . declarationSourceEnd ) ; } break ; case AbstractVariableDeclaration . INITIALIZER : if ( isInRange ) { requestor . enterInitializer ( fieldDeclaration . declarationSourceStart , fieldDeclaration . modifiers ) ; } this . visitIfNeeded ( ( ( Initializer ) ( fieldDeclaration ) ) ) ; if ( isInRange ) { requestor . exitInitializer ( fieldDeclaration . declarationSourceEnd ) ; } break ; } } public void notifySourceElementRequestor ( ImportReference importReference , boolean isPackage ) { } public void notifySourceElementRequestor ( TypeDeclaration typeDeclaration , boolean notifyTypePresence , TypeDeclaration declaringType ) { } private int sourceEnd ( TypeDeclaration typeDeclaration ) { } public void parseCompilationUnit ( ICompilationUnit unit , int start , int end , boolean fullParse ) { } public CompilationUnitDeclaration parseCompilationUnit ( ICompilationUnit unit , boolean fullParse ) { } public void parseTypeMemberDeclarations ( ISourceType type , ICompilationUnit sourceUnit , int start , int end , boolean needReferenceInfo ) { }

Fix:
if ( fieldEndPosition == ( - 1 ) ) {