Buggy code:
public class ConstructorDeclaration extends AbstractMethodDeclaration { public ExplicitConstructorCall constructorCall ; public static final char [ ] ConstantPoolName = "<init>" . toCharArray ( ) ; public boolean isDefaultConstructor = false ; public ConstructorDeclaration ( CompilationResult compilationResult ) { } public void analyseCode ( ClassScope classScope , InitializationFlowContext initializerFlowContext , FlowInfo flowInfo ) { } public void generateCode ( ClassScope classScope , ClassFile classFile ) { int problemResetPC = 0 ; if ( ignoreFurtherInvestigation ) { if ( ( this . binding ) == null ) return ; int problemsLength ; <START_BUG> IProblem [ ] problems = scope . referenceCompilationUnit ( ) . compilationResult . getAllProblems ( ) ; <END_BUG> IProblem [ ] problemsCopy = new IProblem [ problemsLength = problems . length ] ; System . arraycopy ( problems , 0 , problemsCopy , 0 , problemsLength ) ; classFile . addProblemConstructor ( this , binding , problemsCopy ) ; return ; } try { problemResetPC = classFile . contentsOffset ; this . internalGenerateCode ( classScope , classFile ) ; } catch ( org . eclipse . jdt . internal . compiler . problem . AbortMethod e ) { if ( ( e . compilationResult ) == ( CodeStream . RESTART_IN_WIDE_MODE ) ) { try { if ( ( statements ) != null ) { for ( int i = 0 , max = statements . length ; i < max ; i ++ ) statements [ i ] . resetStateForCodeGeneration ( ) ; } classFile . contentsOffset = problemResetPC ; ( classFile . methodCount ) -- ; classFile . codeStream . wideMode = true ; this . internalGenerateCode ( classScope , classFile ) ; } catch ( org . eclipse . jdt . internal . compiler . problem . AbortMethod e2 ) { int problemsLength ; IProblem [ ] problems = scope . referenceCompilationUnit ( ) . compilationResult . getAllProblems ( ) ; IProblem [ ] problemsCopy = new IProblem [ problemsLength = problems . length ] ; System . arraycopy ( problems , 0 , problemsCopy , 0 , problemsLength ) ; classFile . addProblemConstructor ( this , binding , problemsCopy , problemResetPC ) ; } } else { int problemsLength ; IProblem [ ] problems = scope . referenceCompilationUnit ( ) . compilationResult . getAllProblems ( ) ; IProblem [ ] problemsCopy = new IProblem [ problemsLength = problems . length ] ; System . arraycopy ( problems , 0 , problemsCopy , 0 , problemsLength ) ; classFile . addProblemConstructor ( this , binding , problemsCopy , problemResetPC ) ; } } } public void generateSyntheticFieldInitializationsIfNecessary ( MethodScope scope , CodeStream codeStream , ReferenceBinding declaringClass ) { } private void internalGenerateCode ( ClassScope classScope , ClassFile classFile ) { } public boolean isConstructor ( ) { } public boolean isDefaultConstructor ( ) { } public boolean isInitializationMethod ( ) { } public boolean isRecursive ( ArrayList visited ) { } public void parseStatements ( Parser parser , CompilationUnitDeclaration unit ) { } public void resolveStatements ( ClassScope upperScope ) { } public String toStringStatements ( int tab ) { } public void traverse ( IAbstractSyntaxTreeVisitor visitor , ClassScope classScope ) { } }

Fix:
IProblem [ ] problems = scope . referenceCompilationUnit ( ) . compilationResult . getProblems ( ) ;