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 ; static final String ProblemMarkerTag = IJavaModelMarker . JAVA_MODEL_PROBLEM_MARKER ; protected AbstractImageBuilder ( JavaBuilder javaBuilder ) { } public void acceptResult ( CompilationResult result ) { } protected void cleanUp ( ) { } protected void compile ( String [ ] filenames , String [ ] initialTypeNames ) { int toDo = filenames . length ; if ( this . compiledAllAtOnce = toDo <= ( AbstractImageBuilder . MAX_AT_ONCE ) ) { SourceFile [ ] toCompile = new SourceFile [ toDo ] ; for ( int i = 0 ; i < toDo ; i ++ ) { String filename = filenames [ i ] ; if ( JavaBuilder . DEBUG ) System . out . println ( ( "About<seq2seq4repair_space>to<seq2seq4repair_space>compile<seq2seq4repair_space>" + filename ) ) ; String typeName = initialTypeNames [ i ] ; char [ ] typeNameChars = typeName . toCharArray ( ) ; <START_BUG> toCompile [ i ] = new SourceFile ( filename , CharOperation . splitOn ( '//' , typeNameChars , ( ( typeNameChars [ 0 ] ) == '//' ? 1 : 0 ) , ( ( typeName . lastIndexOf ( '//' ) ) - 1 ) ) ) ; <END_BUG> } compile ( toCompile , initialTypeNames , null ) ; } else { int i = 0 ; boolean compilingFirstGroup = true ; while ( i < toDo ) { int doNow = ( toDo < ( AbstractImageBuilder . MAX_AT_ONCE ) ) ? toDo : AbstractImageBuilder . MAX_AT_ONCE ; int index = 0 ; SourceFile [ ] toCompile = new SourceFile [ doNow ] ; String [ ] initialNamesInLoop = new String [ doNow ] ; while ( ( i < toDo ) && ( index < doNow ) ) { String filename = filenames [ i ] ; if ( compilingFirstGroup || ( workQueue . isWaiting ( filename ) ) ) { if ( JavaBuilder . DEBUG ) System . out . println ( ( "About<seq2seq4repair_space>to<seq2seq4repair_space>compile<seq2seq4repair_space>" + filename ) ) ; String typeName = initialTypeNames [ i ] ; initialNamesInLoop [ ( index ++ ) ] = typeName ; toCompile [ index ] = new SourceFile ( filename , CharOperation . splitOn ( '//' , typeName . toCharArray ( ) , 0 , ( ( typeName . lastIndexOf ( '//' ) ) - 1 ) ) ) ; } i ++ ; } if ( index < doNow ) { System . arraycopy ( toCompile , 0 , ( toCompile = new SourceFile [ index ] ) , 0 , index ) ; System . arraycopy ( initialNamesInLoop , 0 , ( initialNamesInLoop = new String [ index ] ) , 0 , index ) ; } String [ ] additionalFilenames = new String [ toDo - i ] ; System . arraycopy ( filenames , i , additionalFilenames , 0 , additionalFilenames . length ) ; compilingFirstGroup = false ; compile ( toCompile , initialNamesInLoop , additionalFilenames ) ; } } } void compile ( SourceFile [ ] units , String [ ] initialTypeNames , String [ ] additionalFilenames ) { } protected void finishedWith ( String location , CompilationResult result , char [ ] [ ] additionalTypeNames ) throws CoreException { } protected RuntimeException internalException ( Throwable t ) { } protected Compiler newCompiler ( ) { } protected IMarker [ ] getProblemsFor ( IResource resource ) { } protected void removeProblemsFor ( IResource resource ) { } protected void storeProblemsFor ( IResource resource , IProblem [ ] problems ) { } protected void updateProblemsFor ( CompilationResult result ) { } protected IContainer getOutputFolder ( IPath packagePath ) throws CoreException { } protected boolean isClassFileChanged ( IFile file , String fileName , byte [ ] bytes , boolean isSecondaryType ) throws CoreException { } protected char [ ] writeClassFile ( ClassFile classFile , boolean isSecondaryType ) throws CoreException { } }

Fix:
toCompile [ i ] = new SourceFile ( filename , CharOperation . splitOn ( '//' , typeNameChars , 0 , ( ( typeName . lastIndexOf ( '//' ) ) - 1 ) ) ) ;