Buggy code:
public class BcelWeaver implements IWeaver { private BcelWorld world ; private CrosscuttingMembersSet xcutSet ; private IProgressListener progressListener = null ; private double progressMade ; private double progressPerClassFile ; private boolean inReweavableMode = false ; public BcelWeaver ( BcelWorld world ) { } public BcelWeaver ( ) { } private List addedClasses = new ArrayList ( ) ; private List deletedTypenames = new ArrayList ( ) ; private Manifest manifest = null ; private boolean needToReweaveWorld = false ; private List shadowMungerList = null ; private List typeMungerList = null ; private List lateTypeMungerList = null ; private List declareParentsList = null ; private ZipOutputStream zipOutputStream ; public void setShadowMungers ( List l ) { } public ResolvedType addLibraryAspect ( String aspectName ) { } public void addLibraryJarFile ( File inFile ) throws IOException { } private List addAspectsFromJarFile ( File inFile ) throws FileNotFoundException , IOException { } private List addAspectsFromDirectory ( File dir ) throws FileNotFoundException , IOException { } private void addIfAspect ( byte [ ] bytes , String name , List toList ) throws IOException { } public List addDirectoryContents ( File inFile , File outDir ) throws IOException { } public List addJarFile ( File inFile , File outDir , boolean canBeDirectory ) { } public boolean needToReweaveWorld ( ) { } public void addClassFile ( UnwovenClassFile classFile ) { } public UnwovenClassFile addClassFile ( File classFile , File inPathDir , File outDir ) throws IOException { } public void deleteClassFile ( String typename ) { } public void prepareForWeave ( ) { <START_BUG> needToReweaveWorld = false ; <END_BUG> CflowPointcut . clearCaches ( ) ; for ( Iterator i = addedClasses . iterator ( ) ; i . hasNext ( ) ; ) { UnwovenClassFile jc = ( ( UnwovenClassFile ) ( i . next ( ) ) ) ; String name = jc . getClassName ( ) ; ResolvedType type = world . resolve ( name ) ; if ( type . isAspect ( ) ) { needToReweaveWorld |= xcutSet . addOrReplaceAspect ( type ) ; } } for ( Iterator i = deletedTypenames . iterator ( ) ; i . hasNext ( ) ; ) { String name = ( ( String ) ( i . next ( ) ) ) ; if ( xcutSet . deleteAspect ( UnresolvedType . forName ( name ) ) ) needToReweaveWorld = true ; } shadowMungerList = xcutSet . getShadowMungers ( ) ; rewritePointcuts ( shadowMungerList ) ; typeMungerList = xcutSet . getTypeMungers ( ) ; lateTypeMungerList = xcutSet . getLateTypeMungers ( ) ; declareParentsList = xcutSet . getDeclareParents ( ) ; Collections . sort ( shadowMungerList , new Comparator ( ) { public int compare ( Object o1 , Object o2 ) { ShadowMunger sm1 = ( ( ShadowMunger ) ( o1 ) ) ; ShadowMunger sm2 = ( ( ShadowMunger ) ( o2 ) ) ; if ( ( sm1 . getSourceLocation ( ) ) == null ) return ( sm2 . getSourceLocation ( ) ) == null ? 0 : 1 ; if ( ( sm2 . getSourceLocation ( ) ) == null ) return - 1 ; return ( sm2 . getSourceLocation ( ) . getOffset ( ) ) - ( sm1 . getSourceLocation ( ) . getOffset ( ) ) ; } } ) ; } private void rewritePointcuts ( List shadowMungers ) { } private Pointcut shareEntriesFromMap ( Pointcut p , Map pcMap ) { } private void validateBindings ( Pointcut dnfPointcut , Pointcut userPointcut , int numFormals , String [ ] names ) { } private void validateOrBranch ( OrPointcut pc , Pointcut userPointcut , int numFormals , String [ ] names , Pointcut [ ] leftBindings , Pointcut [ ] rightBindings ) { } private void validateSingleBranch ( Pointcut pc , Pointcut userPointcut , int numFormals , String [ ] names , Pointcut [ ] bindings ) { } private void validateSingleBranchRecursion ( Pointcut pc , Pointcut userPointcut , boolean [ ] foundFormals , String [ ] names , Pointcut [ ] bindings ) { } private boolean couldEverMatchSameJoinPoints ( Pointcut left , Pointcut right ) { } private Pointcut findFirstPointcutIn ( Pointcut toSearch , Class toLookFor ) { } private void raiseNegationBindingError ( Pointcut userPointcut ) { } private void raiseAmbiguousBindingError ( String name , Pointcut userPointcut ) { } private void raiseAmbiguityInDisjunctionError ( Pointcut userPointcut , List names ) { } private void raiseUnboundFormalError ( String name , Pointcut userPointcut ) { } public void addManifest ( Manifest newManifest ) { } public static final String MANIFEST_NAME = "META-INF//MANIFEST.MF" ; private static final String WEAVER_MANIFEST_VERSION = "1.0" ; private static final Attributes . Name CREATED_BY = new Attributes . Name ( "Created-By" ) ; private static final String WEAVER_CREATED_BY = "AspectJ<seq2seq4repair_space>Compiler" ; public Manifest getManifest ( boolean shouldCreate ) { } public Collection weave ( File file ) throws IOException { } public Collection weave ( IClassFileProvider input ) throws IOException { } private void warnOnUnmatchedAdvice ( ) { } private void weaveParentsFor ( List typesForWeaving , String typeToWeave ) { } public void prepareToProcessReweavableState ( ) { } public void processReweavableStateIfPresent ( String className , BcelObjectType classType ) { } private void weaveAndNotify ( UnwovenClassFile classFile , BcelObjectType classType , IWeaveRequestor requestor ) throws IOException { } public BcelObjectType getClassType ( String forClass ) { } public void addParentTypeMungers ( String typeName ) { } public void addNormalTypeMungers ( String typeName ) { } public UnwovenClassFile [ ] getClassFilesFor ( LazyClassGen clazz ) { } public void weaveParentTypeMungers ( ResolvedType onType ) { } private boolean applyDeclareAtType ( DeclareAnnotation decA , ResolvedType onType , boolean reportProblems ) { } private boolean verifyTargetIsOK ( DeclareAnnotation decA , ResolvedType onType , AnnotationX annoX , boolean outputProblems ) { } private boolean applyDeclareParents ( DeclareParents p , ResolvedType onType ) { } public void weaveNormalTypeMungers ( ResolvedType onType ) { } public LazyClassGen weaveWithoutDump ( UnwovenClassFile classFile , BcelObjectType classType ) throws IOException { }

Fix:
needToReweaveWorld = xcutSet . hasChangedSinceLastReset ( ) ;