Buggy code:
public class SourceElementParser extends Parser { ISourceElementRequestor requestor ; private int fieldCount ; private int localIntPtr ; private int lastFieldEndPosition ; private ISourceType sourceType ; private boolean reportReferenceInfo ; private char [ ] [ ] typeNames ; private char [ ] [ ] superTypeNames ; private int nestedTypeIndex ; private static final char [ ] JAVA_LANG_OBJECT = "java.lang.Object" . toCharArray ( ) ; private NameReference [ ] unknownRefs ; private int unknownRefsCounter ; private SourceElementParser . LocalDeclarationVisitor localDeclarationVisitor = null ; private CompilerOptions options ; public class LocalDeclarationVisitor extends AbstractSyntaxTreeVisitorAdapter { public boolean visit ( AnonymousLocalTypeDeclaration anonymousTypeDeclaration , BlockScope scope ) { } public boolean visit ( LocalTypeDeclaration typeDeclaration , BlockScope scope ) { } public boolean visit ( MemberTypeDeclaration typeDeclaration , ClassScope scope ) { } } public SourceElementParser ( final ISourceElementRequestor requestor , IProblemFactory problemFactory , CompilerOptions options ) { } public SourceElementParser ( final ISourceElementRequestor requestor , IProblemFactory problemFactory ) { } public SourceElementParser ( final ISourceElementRequestor requestor , IProblemFactory problemFactory , CompilerOptions options , boolean reportLocalDeclarations ) { } public void checkAnnotation ( ) { } protected void classInstanceCreation ( boolean alwaysQualified ) { } protected void consumeConstructorHeaderName ( ) { } protected void consumeExitVariableWithInitialization ( ) { } protected void consumeExitVariableWithoutInitialization ( ) { } protected void consumeFieldAccess ( boolean isSuperAccess ) { } protected void consumeMethodHeaderName ( ) { } protected void consumeMethodInvocationName ( ) { } protected void consumeMethodInvocationPrimary ( ) { } protected void consumeMethodInvocationSuper ( ) { } protected void consumeSingleTypeImportDeclarationName ( ) { } protected void consumeTypeImportOnDemandDeclarationName ( ) { } protected FieldDeclaration createFieldDeclaration ( Expression initialization , char [ ] name , int sourceStart , int sourceEnd ) { } protected CompilationUnitDeclaration endParse ( int act ) { } public int flushAnnotationsDefinedPriorTo ( int position ) { } public TypeReference getTypeReference ( int dim ) { } public NameReference getUnspecifiedReference ( ) { } public NameReference getUnspecifiedReferenceOptimized ( ) { } private boolean isLocalDeclaration ( ) { } public void notifySourceElementRequestor ( CompilationUnitDeclaration parsedUnit ) { } private void notifyAllUnknownReferences ( ) { } public void notifySourceElementRequestor ( AbstractMethodDeclaration methodDeclaration ) { } public void notifySourceElementRequestor ( FieldDeclaration fieldDeclaration ) { } public void notifySourceElementRequestor ( ImportReference importReference , boolean isPackage ) { } public void notifySourceElementRequestor ( TypeDeclaration typeDeclaration , boolean notifyTypePresence ) { } public void parseCompilationUnit ( ICompilationUnit unit , int start , int end , boolean needReferenceInfo ) { } public void parseCompilationUnit ( ICompilationUnit unit , boolean needReferenceInfo ) { } public void parseTypeMemberDeclarations ( ISourceType sourceType , ICompilationUnit sourceUnit , int start , int end , boolean needReferenceInfo ) { } public void parseTypeMemberDeclarations ( char [ ] contents , int start , int end ) { boolean old = diet ; try { diet = true ; initialize ( ) ; goForClassBodyDeclarations ( ) ; scanner . setSource ( contents ) ; scanner . recordLineSeparator = false ; <START_BUG> scanner . toDoTag = null ; <END_BUG> scanner . resetTo ( start , end ) ; referenceContext = null ; parse ( ) ; notifySourceElementRequestor ( ( ( CompilationUnitDeclaration ) ( null ) ) ) ; } catch ( AbortCompilation e ) { } finally { diet = old ; } } private static void quickSort ( AstNode [ ] sortedCollection , int left , int right ) { } private char [ ] returnTypeName ( TypeReference type ) { } public void addUnknownRef ( NameReference nameRef ) { } private TypeReference typeReference ( int dim , int localIdentifierPtr , int localIdentifierLengthPtr ) { } private void visitIfNeeded ( AbstractMethodDeclaration method ) { } private void visitIfNeeded ( FieldDeclaration field ) { } private void visitIfNeeded ( Initializer initializer ) { } protected void reportSyntaxError ( int act , int currentKind , int stateStackTop ) { } }

Fix:
scanner . taskTags = null ;