Buggy code:
public abstract class AbstractImageBuilder implements ICompilerRequestor { protected JavaBuilder javaBuilder ; protected State newState ; protected IContainer outputFolder ; protected IContainer [ ] sourceFolders ; protected BuildNotifier notifier ; protected boolean hasSeparateOutputFolder ; protected NameEnvironment nameEnvironment ; protected Compiler compiler ; protected WorkQueue workQueue ; protected ArrayList problemTypeLocations ; protected boolean compiledAllAtOnce ; private boolean inCompiler ; public static int MAX_AT_ONCE = 1000 ; protected AbstractImageBuilder ( JavaBuilder javaBuilder ) { } public void acceptResult ( CompilationResult result ) { String sourceLocation = new String ( result . getFileName ( ) ) ; if ( ! ( workQueue . isCompiled ( sourceLocation ) ) ) { try { workQueue . finished ( sourceLocation ) ; updateProblemsFor ( sourceLocation , result ) ; ICompilationUnit compilationUnit = result . getCompilationUnit ( ) ; ClassFile [ ] classFiles = result . getClassFiles ( ) ; int length = classFiles . length ; ArrayList duplicateTypeNames = null ; ArrayList definedTypeNames = new ArrayList ( length ) ; for ( int i = 0 ; i < length ; i ++ ) { ClassFile classFile = classFiles [ i ] ; char [ ] [ ] compoundName = classFile . getCompoundName ( ) ; char [ ] typeName = compoundName [ ( ( compoundName . length ) - 1 ) ] ; boolean isNestedType = CharOperation . contains ( '$' , typeName ) ; if ( isNestedType ) { String qualifiedTypeName = new String ( classFile . outerMostEnclosingClassFile ( ) . fileName ( ) ) ; if ( newState . isDuplicateLocation ( qualifiedTypeName , sourceLocation ) ) continue ; } else { String qualifiedTypeName = new String ( classFile . fileName ( ) ) ; if ( newState . isDuplicateLocation ( qualifiedTypeName , sourceLocation ) ) { if ( duplicateTypeNames == null ) duplicateTypeNames = new ArrayList ( ) ; duplicateTypeNames . add ( compoundName ) ; createErrorFor ( resourceForLocation ( sourceLocation ) , Util . bind ( "build.duplicateClassFile" , new String ( typeName ) ) ) ; continue ; } <START_BUG> newState . locationForType ( qualifiedTypeName , sourceLocation ) ; <END_BUG> } definedTypeNames . add ( writeClassFile ( classFile , ( ! isNestedType ) ) ) ; } finishedWith ( sourceLocation , result , compilationUnit . getMainTypeName ( ) , definedTypeNames , duplicateTypeNames ) ; notifier . compiled ( compilationUnit ) ; } catch ( CoreException e ) { createErrorFor ( resourceForLocation ( sourceLocation ) , Util . bind ( "build.inconsistentClassFile" ) ) ; } } } protected void cleanUp ( ) { } protected void compile ( String [ ] filenames , String [ ] initialTypeNames ) { } void compile ( SourceFile [ ] units , String [ ] initialTypeNames , String [ ] additionalFilenames ) { } protected void createErrorFor ( IResource resource , String message ) { } protected String extractTypeNameFrom ( String sourceLocation ) { } protected void finishedWith ( String sourceLocation , CompilationResult result , char [ ] mainTypeName , ArrayList definedTypeNames , ArrayList duplicateTypeNames ) throws CoreException { } protected IContainer getOutputFolder ( IPath packagePath ) throws CoreException { } protected RuntimeException internalException ( CoreException t ) { } protected Compiler newCompiler ( ) { } protected IResource resourceForLocation ( String sourceLocation ) { } protected void storeProblemsFor ( IResource resource , IProblem [ ] problems ) throws CoreException { } protected void updateProblemsFor ( String sourceLocation , CompilationResult result ) throws CoreException { } protected char [ ] writeClassFile ( ClassFile classFile , boolean isSecondaryType ) throws CoreException { } protected boolean writeClassFileCheck ( IFile file , String fileName , byte [ ] bytes , boolean isSecondaryType ) throws CoreException { } }

Fix:
newState . recordLocationForType ( qualifiedTypeName , sourceLocation ) ;