Buggy code:
public class AjBuildManager { public static final IProject DEFAULT_PROJECT = new SimpleProject ( new Path ( "" ) , "DefaultProject" ) ; private JavaBuilder javaBuilder ; private StructureModel structureModel ; private BuildNotifier buildNotifier = null ; public AjBuildConfig buildConfig ; private BcelWeaver bcelWeaver ; public BcelWorld bcelWorld ; private IMessageHandler currentHandler ; ClassFileCache classFileCache ; Set addedFiles ; Set deletedFiles ; public AjBuildManager ( IMessageHandler holder ) { } public boolean doGenerateModel ( ) { } public boolean batchBuild ( AjBuildConfig buildConfig , IMessageHandler handler ) throws IOException , AbortException { } AjBuildManager . IncrementalBuilder getIncrementalBuilder ( IMessageHandler handler ) { } private void setupModel ( ) { } public boolean incrementalBuild ( AjBuildConfig buildConfig , IMessageHandler messageHandler ) throws IOException , CoreException { <START_BUG> if ( ( ( javaBuilder ) == null ) || ( ( javaBuilder . currentProject ) == null ) ) { <END_BUG> return batchBuild ( buildConfig , messageHandler ) ; } final CountingMessageHandler counter = new CountingMessageHandler ( messageHandler ) ; try { currentHandler = counter ; AjBuildManager . IncrementalBuilder builder = getIncrementalBuilder ( messageHandler ) ; IContainer [ ] sourceFolders = new IContainer [ buildConfig . getSourceRoots ( ) . size ( ) ] ; int count = 0 ; for ( Iterator i = buildConfig . getSourceRoots ( ) . iterator ( ) ; i . hasNext ( ) ; count ++ ) { sourceFolders [ count ] = new FilesystemFolder ( ( ( File ) ( i . next ( ) ) ) . getAbsolutePath ( ) ) ; } builder . setSourceFolders ( sourceFolders ) ; getJavaBuilder ( ) . binaryResources = new SimpleLookupTable ( ) ; SimpleLookupTable deltas = getDeltas ( buildConfig ) ; boolean succeeded = builder . build ( deltas ) ; if ( counter . hasErrors ( ) ) { return false ; } if ( succeeded ) { return weaveAndGenerateClassFiles ( builder . getNewState ( ) ) ; } else { return batchBuild ( buildConfig , messageHandler ) ; } } finally { currentHandler = null ; } } SimpleLookupTable getDeltas ( AjBuildConfig newBuildConfig ) { } void makeDeltas ( SimpleLookupTable deltas , Collection modifiedAndAdded , Collection deletedFiles , String sourcePath ) { } void updateBuildConfig ( AjBuildConfig newBuildConfig ) { } private void initBcelWorld ( IMessageHandler handler ) throws IOException { } private void initJavaBuilder ( IMessageHandler handler ) { } public static String [ ] getFilenames ( List files ) { } public static String [ ] getInitialTypeNames ( List files ) { } void addAspectClassFilesToWeaver ( ) throws IOException { } public boolean weaveAndGenerateClassFiles ( State newState ) throws IOException , CoreException { } JavaBuilder getJavaBuilder ( ) { } private void setBuildConfig ( AjBuildConfig buildConfig ) { } private Collection getModifiedFiles ( ) { } Collection getModifiedFiles ( long lastBuildTime ) { } ClasspathLocation makeClasspathLocation ( String entry ) { } ClasspathLocation makeUnwovenClassfileLocation ( IContainer container ) { } ClasspathLocation [ ] makeClasspathLocations ( ) { } String makeClasspathString ( ) { } public String checkRtJar ( AjBuildConfig buildConfig ) { } Compiler makeCompiler ( final AbstractImageBuilder builder , NameEnvironment nameEnvironment , IMessageHandler handler ) { } public String toString ( ) { } public void setStructureModel ( StructureModel structureModel ) { } public StructureModel getStructureModel ( ) { } public void setBuildNotifier ( BuildNotifier notifier ) { } private boolean handleProblem ( ICompilationUnit unit , IProblem problem ) { } boolean testInit ( IMessageHandler handler ) { } void testSetHandler ( IMessageHandler handler ) { } private class BatchBuilder extends BatchImageBuilder { boolean initialized ; boolean running ; public BatchBuilder ( JavaBuilder builder , IMessageHandler handler ) { } public State run ( ) throws IOException , CoreException { } protected IResource resourceForLocation ( String sourceLocation ) { } protected void createErrorFor ( IResource resource , String message ) { } protected void updateProblemsFor ( String sourceLocation , CompilationResult result ) throws CoreException { } protected Compiler newCompiler ( ) { } protected SourceFile makeSourceFile ( String filename , String initialTypeName ) { } } class IncrementalBuilder extends IncrementalImageBuilder { public IncrementalBuilder ( JavaBuilder builder , IMessageHandler handler ) { } List getLocations ( ) { } public State getNewState ( ) { } public boolean build ( SimpleLookupTable deltas ) { } public boolean build ( Collection changedFiles , Collection deletedFiles ) { } public void setSourceFolders ( IContainer [ ] sourceFolders ) { } public IContainer [ ] getSourceFolders ( ) { } private boolean addFileLocations ( Collection changedFiles , Collection deletedFiles ) { } private String getSourceLocation ( File file ) { } private void addDeletedFiles ( Collection deletedFiles ) { } protected IResource resourceForLocation ( String sourceLocation ) { } protected void createErrorFor ( IResource resource , String message ) { } protected void updateProblemsFor ( String sourceLocation , CompilationResult result ) throws CoreException { } protected String extractTypeNameFrom ( String sourceLocation ) { } protected Compiler newCompiler ( ) { } protected SourceFile makeSourceFile ( String filename , String initialTypeName ) { } } }

Fix:
if ( ( ( ( javaBuilder ) == null ) || ( ( javaBuilder . currentProject ) == null ) ) || ( ( javaBuilder . lastState ) == null ) ) {