Buggy code:
public class ClassFile implements CompilerModifiers , AttributeNamesConstants , TypeConstants , TypeIds { public SourceTypeBinding referenceBinding ; public ConstantPool constantPool ; public ClassFile enclosingClassFile ; public int produceDebugAttributes ; public ReferenceBinding [ ] innerClassesBindings ; public int numberOfInnerClasses ; public byte [ ] header ; public byte [ ] contents ; public int headerOffset ; public int contentsOffset ; public int constantPoolOffset ; public int methodCountOffset ; public int methodCount ; protected boolean creatingProblemType ; public static final int INITIAL_CONTENTS_SIZE = 1000 ; public static final int INITIAL_HEADER_SIZE = 1000 ; public static final int INCREMENT_SIZE = 1000 ; public static final int INNER_CLASSES_SIZE = 5 ; protected HashtableOfType nameUsage ; public CodeStream codeStream ; protected int problemLine ; public ClassFile ( ) { } public ClassFile ( SourceTypeBinding aType , ClassFile enclosingClassFile , boolean creatingProblemType ) { } public void addAbstractMethod ( AbstractMethodDeclaration method , MethodBinding methodBinding ) { } public void addAttributes ( ) { } public void addDefaultAbstractMethods ( ) { } public void addFieldInfo ( FieldBinding fieldBinding ) { } public void addFieldInfos ( ) { } public void addInnerClasses ( ReferenceBinding referenceBinding ) { } public void addProblemClinit ( IProblem [ ] problems ) { generateMethodInfoHeaderForClinit ( ) ; contentsOffset -= 2 ; int attributeOffset = contentsOffset ; contentsOffset += 2 ; int attributeNumber = 0 ; int codeAttributeOffset = contentsOffset ; generateCodeAttributeHeader ( ) ; codeStream . resetForProblemClinit ( this ) ; String problemString = "" ; if ( problems != null ) { int max = problems . length ; StringBuffer buffer = new StringBuffer ( 25 ) ; int count = 0 ; for ( int i = 0 ; i < max ; i ++ ) { IProblem problem = problems [ i ] ; if ( ( problem != null ) && ( problem . isError ( ) ) ) { buffer . append ( ( ( "\t" + ( problem . getMessage ( ) ) ) + "\n" ) ) ; count ++ ; if ( ( problemLine ) == 0 ) { problemLine = problem . getSourceLineNumber ( ) ; } problems [ i ] = null ; } } if ( count > 1 ) { buffer . insert ( 0 , org . eclipse . jdt . internal . compiler . util . Util . bind ( "compilation.unresolvedProblems" ) ) ; } else { buffer . insert ( 0 , org . eclipse . jdt . internal . compiler . util . Util . bind ( "compilation.unresolvedProblem" ) ) ; } problemString = buffer . toString ( ) ; } <START_BUG> int [ ] exceptionHandler = codeStream . generateCodeAttributeForProblemMethod ( referenceBinding . scope . problemReporter ( ) . options . runtimeExceptionNameForCompileError , problemString ) ; <END_BUG> attributeNumber ++ ; completeCodeAttributeForClinit ( codeAttributeOffset , exceptionHandler , referenceBinding . scope . referenceCompilationUnit ( ) . compilationResult . lineSeparatorPositions ) ; contents [ ( attributeOffset ++ ) ] = ( ( byte ) ( attributeNumber > > 8 ) ) ; contents [ attributeOffset ] = ( ( byte ) ( attributeNumber ) ) ; } public void addProblemConstructor ( AbstractMethodDeclaration method , MethodBinding methodBinding , IProblem [ ] problems ) { } public void addProblemConstructor ( AbstractMethodDeclaration method , MethodBinding methodBinding , IProblem [ ] problems , int savedOffset ) { } public void addProblemMethod ( AbstractMethodDeclaration method , MethodBinding methodBinding , IProblem [ ] problems ) { } public void addProblemMethod ( AbstractMethodDeclaration method , MethodBinding methodBinding , IProblem [ ] problems , int savedOffset ) { } public void addSpecialMethods ( ) { } public void addSyntheticConstructorAccessMethod ( SyntheticAccessMethodBinding methodBinding ) { } public void addSyntheticFieldReadAccessMethod ( SyntheticAccessMethodBinding methodBinding ) { } public void addSyntheticFieldWriteAccessMethod ( SyntheticAccessMethodBinding methodBinding ) { } public void addSyntheticMethodAccessMethod ( SyntheticAccessMethodBinding methodBinding ) { } public static String buildAllDirectoriesInto ( String outputPath , String relativeFileName ) throws IOException { } public void completeCodeAttribute ( int codeAttributeOffset ) { } public void completeCodeAttributeForClinit ( int codeAttributeOffset ) { } public void completeCodeAttributeForClinit ( int codeAttributeOffset , int [ ] exceptionHandler , int [ ] startLineIndexes ) { } public void completeCodeAttributeForProblemMethod ( AbstractMethodDeclaration method , MethodBinding binding , int codeAttributeOffset , int [ ] exceptionHandler , int [ ] startLineIndexes ) { } public void completeCodeAttributeForSyntheticAccessMethod ( SyntheticAccessMethodBinding binding , int codeAttributeOffset , int [ ] startLineIndexes ) { } public void completeMethodInfo ( int methodAttributeOffset , int attributeNumber ) { } public char [ ] computeConstantPoolName ( LocalTypeBinding localType ) { } public static void createProblemType ( TypeDeclaration typeDeclaration , CompilationResult unitResult ) { } public char [ ] fileName ( ) { } public void generateCodeAttributeHeader ( ) { } public int generateMethodInfoAttribute ( MethodBinding methodBinding ) { } public void generateMethodInfoHeader ( MethodBinding methodBinding ) { } public void generateMethodInfoHeaderForClinit ( ) { } public byte [ ] getBytes ( ) { } public char [ ] [ ] getCompoundName ( ) { } public byte [ ] getReducedBytes ( ) { } public ClassFile outerMostEnclosingClassFile ( ) { } public void recordEnclosingTypeAttributes ( ReferenceBinding binding ) { } public void recordNestedLocalAttribute ( ReferenceBinding binding ) { } public void recordNestedMemberAttribute ( ReferenceBinding binding ) { } public static final int searchLineNumber ( int [ ] startLineIndexes , int position ) { } public void setForMethodInfos ( ) { } public static void writeToDisk ( boolean generatePackagesStructure , String outputPath , String relativeFileName , byte [ ] contents ) throws IOException { } }

Fix:
int [ ] exceptionHandler = codeStream . generateCodeAttributeForProblemMethod ( referenceBinding . scope . environment ( ) . options . runtimeExceptionNameForCompileError , problemString ) ;