Buggy code:
public class AjBuildManager { static final boolean FAIL_IF_RUNTIME_NOT_FOUND = false ; private IProgressListener progressListener = null ; private int compiledCount ; private int sourceFileCount ; private IHierarchy structureModel ; public AjBuildConfig buildConfig ; AjState state = new AjState ( this ) ; BcelWeaver bcelWeaver ; public BcelWorld bcelWorld ; public CountingMessageHandler handler ; public AjBuildManager ( IMessageHandler holder ) { } public boolean doGenerateModel ( ) { } public boolean batchBuild ( AjBuildConfig buildConfig , IMessageHandler baseHandler ) throws IOException , AbortException { } public boolean incrementalBuild ( AjBuildConfig buildConfig , IMessageHandler baseHandler ) throws IOException , AbortException { } protected boolean doBuild ( AjBuildConfig buildConfig , IMessageHandler baseHandler , boolean batch ) throws IOException , AbortException { } private void setupModel ( ) { } private void initBcelWorld ( IMessageHandler handler ) throws IOException { } public World getWorld ( ) { } void addAspectClassFilesToWeaver ( List addedClassFiles ) throws IOException { } public boolean weaveAndGenerateClassFiles ( ) throws IOException { } public FileSystem getLibraryAccess ( String [ ] classpaths , String [ ] filenames ) { } public IProblemFactory getProblemFactory ( ) { } public CompilationUnit [ ] getCompilationUnits ( String [ ] filenames , String [ ] encodings ) { } public String extractDestinationPathFromSourceFile ( CompilationResult result ) { } public void performCompilation ( List files ) { if ( ( progressListener ) != null ) { compiledCount = 0 ; sourceFileCount = files . size ( ) ; progressListener . setText ( "compiling<seq2seq4repair_space>source<seq2seq4repair_space>files" ) ; } String [ ] filenames = new String [ files . size ( ) ] ; String [ ] encodings = new String [ files . size ( ) ] ; for ( int i = 0 ; i < ( files . size ( ) ) ; i ++ ) { filenames [ i ] = ( ( File ) ( files . get ( i ) ) ) . getPath ( ) ; } List cps = buildConfig . getFullClasspath ( ) ; String [ ] classpaths = new String [ cps . size ( ) ] ; for ( int i = 0 ; i < ( cps . size ( ) ) ; i ++ ) { classpaths [ i ] = ( ( String ) ( cps . get ( i ) ) ) ; } INameEnvironment environment = getLibraryAccess ( classpaths , filenames ) ; if ( ! ( state . classesFromName . isEmpty ( ) ) ) { environment = new StatefulNameEnvironment ( environment , state . classesFromName ) ; } AjCompiler compiler = new AjCompiler ( environment , DefaultErrorHandlingPolicies . proceedWithAllProblems ( ) , buildConfig . getJavaOptions ( ) , getBatchRequestor ( ) , getProblemFactory ( ) ) ; AjProblemReporter pr = new AjProblemReporter ( DefaultErrorHandlingPolicies . proceedWithAllProblems ( ) , compiler . options , getProblemFactory ( ) ) ; compiler . problemReporter = pr ; AjLookupEnvironment le = new AjLookupEnvironment ( compiler , compiler . options , pr , environment ) ; EclipseFactory factory = new EclipseFactory ( le ) ; le . factory = factory ; <START_BUG> pr . world = factory ; <END_BUG> le . factory . buildManager = this ; compiler . lookupEnvironment = le ; compiler . parser = new org . aspectj . ajdt . internal . compiler . parser . AjParser ( pr , compiler . options . parseLiteralExpressionsAsConstants ) ; CompilerOptions options = compiler . options ; options . produceReferenceInfo ( true ) ; compiler . compile ( getCompilationUnits ( filenames , encodings ) ) ; environment . cleanup ( ) ; } public ICompilerRequestor getBatchRequestor ( ) { } private boolean proceedOnError ( ) { } public void outputClassFiles ( CompilationResult unitResult ) { } private void setBuildConfig ( AjBuildConfig buildConfig ) { } String makeClasspathString ( ) { } public String checkRtJar ( AjBuildConfig buildConfig ) { } public String toString ( ) { } public void setStructureModel ( IHierarchy structureModel ) { } public IHierarchy getStructureModel ( ) { } public IProgressListener getProgressListener ( ) { } public void setProgressListener ( IProgressListener progressListener ) { } }

Fix:
pr . factory = factory ;