Buggy code:
public class JavaBuilder extends IncrementalProjectBuilder { IProject currentProject ; JavaProject javaProject ; IWorkspaceRoot workspaceRoot ; NameEnvironment nameEnvironment ; SimpleLookupTable binaryLocationsPerProject ; State lastState ; BuildNotifier notifier ; char [ ] [ ] extraResourceFileFilters ; String [ ] extraResourceFolderFilters ; public static boolean DEBUG = false ; static ArrayList builtProjects = null ; public static IMarker [ ] getProblemsFor ( IResource resource ) { } public static IMarker [ ] getTasksFor ( IResource resource ) { } public static void finishedBuilding ( IResourceChangeEvent event ) { } public static void removeProblemsFor ( IResource resource ) { } public static void removeTasksFor ( IResource resource ) { } public static void removeProblemsAndTasksFor ( IResource resource ) { } public static State readState ( IProject project , DataInputStream in ) throws IOException { } public static void writeState ( Object state , DataOutputStream out ) throws IOException { } public JavaBuilder ( ) { } protected IProject [ ] build ( int kind , Map ignored , IProgressMonitor monitor ) throws CoreException { } private void buildAll ( ) { } private void buildDeltas ( SimpleLookupTable deltas ) { } private void cleanup ( ) { } private void clearLastState ( ) { } boolean filterExtraResource ( IResource resource ) { } private SimpleLookupTable findDeltas ( ) { } private State getLastState ( IProject project ) { } private IProject [ ] getRequiredProjects ( boolean includeBinaryPrerequisites ) { } private boolean hasClasspathChanged ( ) { } private boolean hasStructuralDelta ( ) { } private void initializeBuilder ( ) throws CoreException { } private boolean isClasspathBroken ( IClasspathEntry [ ] classpath , IProject p ) throws CoreException { } private boolean isWorthBuilding ( ) throws CoreException { boolean abortBuilds = JavaCore . ABORT . equals ( javaProject . getOption ( JavaCore . CORE_JAVA_BUILD_INVALID_CLASSPATH , true ) ) ; if ( ! abortBuilds ) return true ; if ( isClasspathBroken ( javaProject . getRawClasspath ( ) , currentProject ) ) { if ( JavaBuilder . DEBUG ) System . out . println ( "Aborted<seq2seq4repair_space>build<seq2seq4repair_space>because<seq2seq4repair_space>project<seq2seq4repair_space>has<seq2seq4repair_space>classpath<seq2seq4repair_space>errors<seq2seq4repair_space>(incomplete<seq2seq4repair_space>or<seq2seq4repair_space>involved<seq2seq4repair_space>in<seq2seq4repair_space>cycle)" ) ; <START_BUG> JavaModelManager . getJavaModelManager ( ) . deltaProcessor . addForRefresh ( javaProject ) ; <END_BUG> JavaBuilder . removeProblemsAndTasksFor ( currentProject ) ; IMarker marker = currentProject . createMarker ( IJavaModelMarker . JAVA_MODEL_PROBLEM_MARKER ) ; marker . setAttribute ( IMarker . MESSAGE , Util . bind ( "build.abortDueToClasspathProblems" ) ) ; marker . setAttribute ( IMarker . SEVERITY , IMarker . SEVERITY_ERROR ) ; return false ; } IProject [ ] requiredProjects = getRequiredProjects ( false ) ; next : for ( int i = 0 , l = requiredProjects . length ; i < l ; i ++ ) { IProject p = requiredProjects [ i ] ; if ( ( getLastState ( p ) ) == null ) { JavaProject prereq = ( ( JavaProject ) ( JavaCore . create ( p ) ) ) ; if ( ( prereq . hasCycleMarker ( ) ) && ( JavaCore . WARNING . equals ( javaProject . getOption ( JavaCore . CORE_CIRCULAR_CLASSPATH , true ) ) ) ) continue ; if ( JavaBuilder . DEBUG ) System . out . println ( ( ( "Aborted<seq2seq4repair_space>build<seq2seq4repair_space>because<seq2seq4repair_space>prereq<seq2seq4repair_space>project<seq2seq4repair_space>" + ( p . getName ( ) ) ) + "<seq2seq4repair_space>was<seq2seq4repair_space>not<seq2seq4repair_space>built" ) ) ; JavaBuilder . removeProblemsAndTasksFor ( currentProject ) ; IMarker marker = currentProject . createMarker ( IJavaModelMarker . JAVA_MODEL_PROBLEM_MARKER ) ; marker . setAttribute ( IMarker . MESSAGE , ( isClasspathBroken ( prereq . getRawClasspath ( ) , p ) ? Util . bind ( "build.prereqProjectHasClasspathProblems" , p . getName ( ) ) : Util . bind ( "build.prereqProjectMustBeRebuilt" , p . getName ( ) ) ) ) ; marker . setAttribute ( IMarker . SEVERITY , IMarker . SEVERITY_ERROR ) ; return false ; } } return true ; } void mustPropagateStructuralChanges ( ) { } private void recordNewState ( State state ) { } public String toString ( ) { } }

Fix:
org . eclipse . jdt . internal . core . JavaModelManager . getJavaModelManager ( ) . getDeltaProcessor ( ) . addForRefresh ( javaProject ) ;