nus-yam/ex-repair huggingface dataset:
Program: 9319
Project: 9319
Buggy source:
static void defineClass(ClassLoader loader,String name,byte[] bytes){
  try {
    Method defineClass=ClassLoader.class.getDeclaredMethod("String_Node_Str",new Class[]{String.class,bytes.getClass(),int.class,int.class});
    defineClass.setAccessible(true);
    defineClass.invoke(loader,new Object[]{name,bytes,new Integer(0),new Integer(bytes.length)});
  }
 catch (  Throwable t) {
    t.printStackTrace();
  }
}

Fixed version (ground truth):
static void defineClass(ClassLoader loader,String name,byte[] bytes){
  try {
    Method defineClass=ClassLoader.class.getDeclaredMethod("String_Node_Str",new Class[]{String.class,bytes.getClass(),int.class,int.class});
    defineClass.setAccessible(true);
    defineClass.invoke(loader,new Object[]{name,bytes,new Integer(0),new Integer(bytes.length)});
  }
 catch (  InvocationTargetException e) {
    if (e.getTargetException() instanceof LinkageError) {
      ;
    }
 else {
      e.printStackTrace();
    }
  }
catch (  Exception e) {
    e.printStackTrace();
  }
}
Program: 9323
Project: 9323
Buggy source:
Collection getModifiedFiles(long lastBuildTime){
  List ret=new ArrayList();
  for (Iterator i=buildConfig.getFiles().iterator(); i.hasNext(); ) {
    File file=(File)i.next();
    if (!file.exists())     continue;
    long modTime=file.lastModified();
    if (modTime + 1000 >= lastBuildTime) {
      ret.add(file);
    }
  }
  return ret;
}

Fixed version (ground truth):
Collection getModifiedFiles(long lastBuildTime){
  List ret=new ArrayList();
  for (Iterator i=buildConfig.getFiles().iterator(); i.hasNext(); ) {
    File file=(File)i.next();
    if (!file.exists())     continue;
    long modTime=file.lastModified();
    if (modTime + 1000 > lastBuildTime) {
      ret.add(file);
    }
  }
  return ret;
}
Program: 9325
Project: 9325
Buggy source:
public static TypeX fromBinding(TypeBinding binding){
  if (binding instanceof HelperInterfaceBinding) {
    return ((HelperInterfaceBinding)binding).getTypeX();
  }
  if (binding == null || binding.qualifiedSourceName() == null) {
    return ResolvedTypeX.MISSING;
  }
  if (binding instanceof TypeVariableBinding) {
    TypeVariableBinding tvb=(TypeVariableBinding)binding;
    return TypeX.forName(getName(tvb.firstBound));
  }
  if (binding instanceof ParameterizedTypeBinding) {
    ParameterizedTypeBinding ptb=(ParameterizedTypeBinding)binding;
    String[] arguments=new String[ptb.arguments.length];
    for (int i=0; i < arguments.length; i++) {
      if (ptb.arguments[i] instanceof WildcardBinding) {
        WildcardBinding wcb=(WildcardBinding)ptb.arguments[i];
        arguments[i]=getName(((TypeVariableBinding)wcb.typeVariable()).firstBound);
      }
 else {
        arguments[i]=getName(ptb.arguments[i]);
      }
    }
    return TypeX.forParameterizedTypeNames(getName(binding),arguments);
  }
  return TypeX.forName(getName(binding));
}

Fixed version (ground truth):
public static TypeX fromBinding(TypeBinding binding){
  if (binding instanceof HelperInterfaceBinding) {
    return ((HelperInterfaceBinding)binding).getTypeX();
  }
  if (binding == null || binding.qualifiedSourceName() == null) {
    return ResolvedTypeX.MISSING;
  }
  if (binding instanceof TypeVariableBinding) {
    TypeVariableBinding tvb=(TypeVariableBinding)binding;
    return TypeX.forName(getName(tvb.firstBound));
  }
  if (binding instanceof ParameterizedTypeBinding && !(binding instanceof RawTypeBinding)) {
    ParameterizedTypeBinding ptb=(ParameterizedTypeBinding)binding;
    String[] arguments=new String[ptb.arguments.length];
    for (int i=0; i < arguments.length; i++) {
      if (ptb.arguments[i] instanceof WildcardBinding) {
        WildcardBinding wcb=(WildcardBinding)ptb.arguments[i];
        arguments[i]=getName(((TypeVariableBinding)wcb.typeVariable()).firstBound);
      }
 else {
        arguments[i]=getName(ptb.arguments[i]);
      }
    }
    return TypeX.forParameterizedTypeNames(getName(binding),arguments);
  }
  return TypeX.forName(getName(binding));
}
Program: 9326
Project: 9326
Buggy source:
/** 
 * delete not just this file, but any files in the same directory that were generated as a result of weaving it (e.g. for an around closure). 
 */
public void deleteRealFile() throws IOException {
  File victim=new File(filename);
  String namePrefix=victim.getName();
  namePrefix=namePrefix.substring(0,namePrefix.lastIndexOf('.'));
  final String targetPrefix=namePrefix + "String_Node_Str";
  File dir=victim.getParentFile();
  if (dir != null) {
    File[] weaverGenerated=dir.listFiles(new FilenameFilter(){
      public boolean accept(      File dir,      String name){
        return name.startsWith(targetPrefix);
      }
    }
);
    for (int i=0; i < weaverGenerated.length; i++) {
      weaverGenerated[i].delete();
    }
  }
  victim.delete();
}

Fixed version (ground truth):
/** 
 * delete not just this file, but any files in the same directory that were generated as a result of weaving it (e.g. for an around closure). 
 */
public void deleteRealFile() throws IOException {
  File victim=new File(filename);
  String namePrefix=victim.getName();
  namePrefix=namePrefix.substring(0,namePrefix.lastIndexOf('.'));
  final String targetPrefix=namePrefix + "String_Node_Str";
  File dir=victim.getParentFile();
  if (dir != null) {
    File[] weaverGenerated=dir.listFiles(new FilenameFilter(){
      public boolean accept(      File dir,      String name){
        return name.startsWith(targetPrefix);
      }
    }
);
    if (weaverGenerated != null) {
      for (int i=0; i < weaverGenerated.length; i++) {
        weaverGenerated[i].delete();
      }
    }
  }
  victim.delete();
}
Program: 9327
Project: 9327
Buggy source:
public void postParse(TypeDeclaration typeDec){
  super.postParse(typeDec);
  ((DeclareAnnotation)declareDecl).setAnnotationMethod(new String(selector));
}

Fixed version (ground truth):
public void postParse(TypeDeclaration typeDec){
  super.postParse(typeDec);
  if (declareDecl != null) {
    ((DeclareAnnotation)declareDecl).setAnnotationMethod(new String(selector));
  }
}
Program: 9328
Project: 9328
Buggy source:
public static TypeX fromBinding(TypeBinding binding){
  if (binding instanceof HelperInterfaceBinding) {
    return ((HelperInterfaceBinding)binding).getTypeX();
  }
  if (binding == null || binding.qualifiedSourceName() == null) {
    return ResolvedTypeX.MISSING;
  }
  return TypeX.forName(getName(binding));
}

Fixed version (ground truth):
public static TypeX fromBinding(TypeBinding binding){
  if (binding instanceof HelperInterfaceBinding) {
    return ((HelperInterfaceBinding)binding).getTypeX();
  }
  if (binding == null || binding.qualifiedSourceName() == null) {
    return ResolvedTypeX.MISSING;
  }
  if (binding instanceof TypeVariableBinding) {
    TypeVariableBinding tvb=(TypeVariableBinding)binding;
    return TypeX.forName(getName(tvb.firstBound));
  }
  return TypeX.forName(getName(binding));
}
Program: 9329
Project: 9329
Buggy source:
public ISourceLocation getSourceLocation(){
  int sourceLine=getSourceLine();
  if (sourceLine == 0 || sourceLine == -1) {
    return getEnclosingClass().getType().getSourceLocation();
  }
 else {
    return getEnclosingClass().getType().getSourceContext().makeSourceLocation(sourceLine);
  }
}

Fixed version (ground truth):
public ISourceLocation getSourceLocation(){
  int sourceLine=getSourceLine();
  if (sourceLine == 0 || sourceLine == -1) {
    return getEnclosingClass().getType().getSourceLocation();
  }
 else {
    if (getKind() == Shadow.StaticInitialization && getEnclosingClass().getType().getSourceLocation().getOffset() != 0)     return getEnclosingClass().getType().getSourceLocation();
 else     return getEnclosingClass().getType().getSourceContext().makeSourceLocation(sourceLine);
  }
}
Program: 9330
Project: 9330
Buggy source:
private boolean classFileChangedInDirSinceLastBuild(File dir){
  File[] classFiles=FileUtil.listFiles(dir,new FileFilter(){
    public boolean accept(    File pathname){
      return pathname.getName().endsWith("String_Node_Str");
    }
  }
);
  for (int i=0; i < classFiles.length; i++) {
    long modTime=classFiles[i].lastModified();
    if (modTime + 1000 >= lastSuccessfulBuildTime)     return true;
  }
  return false;
}

Fixed version (ground truth):
private boolean classFileChangedInDirSinceLastBuild(File dir){
  File[] classFiles=FileUtil.listFiles(dir,new FileFilter(){
    public boolean accept(    File pathname){
      return pathname.getName().endsWith("String_Node_Str");
    }
  }
);
  for (int i=0; i < classFiles.length; i++) {
    long modTime=classFiles[i].lastModified();
    if (modTime + 1000 >= lastSuccessfulBuildTime) {
      return true;
    }
  }
  return false;
}
Program: 9331
Project: 9331
Buggy source:
/** 
 * Returns false if a batch build is needed.
 */
boolean prepareForNextBuild(AjBuildConfig newBuildConfig){
  currentBuildTime=System.currentTimeMillis();
  addedClassFiles=new ArrayList();
  if (lastSuccessfulBuildTime == -1 || buildConfig == null) {
    return false;
  }
  if (newBuildConfig.getOutputJar() != null)   return false;
  if (pathChange(buildConfig,newBuildConfig)) {
    removeAllResultsOfLastBuild();
    return false;
  }
  simpleStrings=new ArrayList();
  qualifiedStrings=new ArrayList();
  Set oldFiles=new HashSet(buildConfig.getFiles());
  Set newFiles=new HashSet(newBuildConfig.getFiles());
  addedFiles=new HashSet(newFiles);
  addedFiles.removeAll(oldFiles);
  deletedFiles=new HashSet(oldFiles);
  deletedFiles.removeAll(newFiles);
  Set oldBinaryFiles=new HashSet(buildConfig.getBinaryFiles());
  Set newBinaryFiles=new HashSet(newBuildConfig.getBinaryFiles());
  addedBinaryFiles=new HashSet(newBinaryFiles);
  addedBinaryFiles.removeAll(oldBinaryFiles);
  deletedBinaryFiles=new HashSet(oldBinaryFiles);
  deletedBinaryFiles.removeAll(newBinaryFiles);
  this.newBuildConfig=newBuildConfig;
  return true;
}

Fixed version (ground truth):
/** 
 * Returns false if a batch build is needed.
 */
boolean prepareForNextBuild(AjBuildConfig newBuildConfig){
  currentBuildTime=System.currentTimeMillis();
  addedClassFiles=new ArrayList();
  if (lastSuccessfulBuildTime == -1 || buildConfig == null) {
    return false;
  }
  if (newBuildConfig.getOutputJar() != null)   return false;
  if (pathChange(buildConfig,newBuildConfig)) {
    removeAllResultsOfLastBuild();
    if (stateListener != null)     stateListener.pathChangeDetected();
    return false;
  }
  simpleStrings=new ArrayList();
  qualifiedStrings=new ArrayList();
  Set oldFiles=new HashSet(buildConfig.getFiles());
  Set newFiles=new HashSet(newBuildConfig.getFiles());
  addedFiles=new HashSet(newFiles);
  addedFiles.removeAll(oldFiles);
  deletedFiles=new HashSet(oldFiles);
  deletedFiles.removeAll(newFiles);
  Set oldBinaryFiles=new HashSet(buildConfig.getBinaryFiles());
  Set newBinaryFiles=new HashSet(newBuildConfig.getBinaryFiles());
  addedBinaryFiles=new HashSet(newBinaryFiles);
  addedBinaryFiles.removeAll(oldBinaryFiles);
  deletedBinaryFiles=new HashSet(oldBinaryFiles);
  deletedBinaryFiles.removeAll(newBinaryFiles);
  this.newBuildConfig=newBuildConfig;
  return true;
}
Program: 9332
Project: 9332
Buggy source:
private boolean pathChange(AjBuildConfig oldConfig,AjBuildConfig newConfig){
  boolean changed=false;
  List oldClasspath=oldConfig.getClasspath();
  List newClasspath=newConfig.getClasspath();
  if (changed(oldClasspath,newClasspath,true))   return true;
  List oldAspectpath=oldConfig.getAspectpath();
  List newAspectpath=newConfig.getAspectpath();
  if (changed(oldAspectpath,newAspectpath,true))   return true;
  List oldInJars=oldConfig.getInJars();
  List newInJars=newConfig.getInJars();
  if (changed(oldInJars,newInJars,false))   return true;
  List oldInPath=oldConfig.getInpath();
  List newInPath=newConfig.getInpath();
  if (changed(oldInPath,newInPath,false))   return true;
  return changed;
}

Fixed version (ground truth):
private boolean pathChange(AjBuildConfig oldConfig,AjBuildConfig newConfig){
  boolean changed=false;
  List oldClasspath=oldConfig.getClasspath();
  List newClasspath=newConfig.getClasspath();
  if (stateListener != null)   stateListener.aboutToCompareClasspaths(oldClasspath,newClasspath);
  if (changed(oldClasspath,newClasspath,true,oldConfig.getOutputDir()))   return true;
  List oldAspectpath=oldConfig.getAspectpath();
  List newAspectpath=newConfig.getAspectpath();
  if (changed(oldAspectpath,newAspectpath,true,oldConfig.getOutputDir()))   return true;
  List oldInJars=oldConfig.getInJars();
  List newInJars=newConfig.getInJars();
  if (changed(oldInJars,newInJars,false,oldConfig.getOutputDir()))   return true;
  List oldInPath=oldConfig.getInpath();
  List newInPath=newConfig.getInpath();
  if (changed(oldInPath,newInPath,false,oldConfig.getOutputDir()))   return true;
  return changed;
}
Program: 9333
Project: 9333
Buggy source:
private boolean changed(List oldPath,List newPath,boolean checkClassFiles){
  if (oldPath == null)   oldPath=new ArrayList();
  if (newPath == null)   newPath=new ArrayList();
  if (oldPath.size() != newPath.size()) {
    return true;
  }
  for (int i=0; i < oldPath.size(); i++) {
    if (!oldPath.get(i).equals(newPath.get(i))) {
      return true;
    }
    Object o=oldPath.get(i);
    File f=null;
    if (o instanceof String) {
      f=new File((String)o);
    }
 else {
      f=(File)o;
    }
    if (f.exists() && !f.isDirectory() && (f.lastModified() >= lastSuccessfulBuildTime)) {
      return true;
    }
    if (f.exists() && f.isDirectory() && checkClassFiles) {
      return classFileChangedInDirSinceLastBuild(f);
    }
  }
  return false;
}

Fixed version (ground truth):
private boolean changed(List oldPath,List newPath,boolean checkClassFiles,File oldOutputLocation){
  if (oldPath == null)   oldPath=new ArrayList();
  if (newPath == null)   newPath=new ArrayList();
  if (oldPath.size() != newPath.size()) {
    return true;
  }
  for (int i=0; i < oldPath.size(); i++) {
    if (!oldPath.get(i).equals(newPath.get(i))) {
      return true;
    }
    Object o=oldPath.get(i);
    File f=null;
    if (o instanceof String) {
      f=new File((String)o);
    }
 else {
      f=(File)o;
    }
    if (f.exists() && !f.isDirectory() && (f.lastModified() >= lastSuccessfulBuildTime)) {
      return true;
    }
    if (f.exists() && f.isDirectory() && checkClassFiles&& !(f.equals(oldOutputLocation))) {
      boolean b=classFileChangedInDirSinceLastBuild(f);
      if (b && stateListener != null)       stateListener.detectedClassChangeInThisDir(f);
      if (b)       return true;
    }
  }
  return false;
}
Program: 9334
Project: 9334
Buggy source:
private ResolvedMember getPointcutDeclaration(ReferencePointcut rp,MethodDeclaration declaration){
  World world=((AjLookupEnvironment)declaration.scope.environment()).factory.getWorld();
  TypeX onType=rp.onType;
  if (onType == null) {
    Member member=EclipseFactory.makeResolvedMember(declaration.binding);
    onType=member.getDeclaringType();
  }
  ResolvedMember[] members=onType.getDeclaredPointcuts(world);
  if (members != null) {
    for (int i=0; i < members.length; i++) {
      if (members[i].getName().equals(rp.name)) {
        return members[i];
      }
    }
  }
  return null;
}

Fixed version (ground truth):
private ResolvedMember getPointcutDeclaration(ReferencePointcut rp,MethodDeclaration declaration){
  World world=((AjLookupEnvironment)declaration.scope.environment()).factory.getWorld();
  TypeX onType=rp.onType;
  if (onType == null) {
    if (declaration.binding != null) {
      Member member=EclipseFactory.makeResolvedMember(declaration.binding);
      onType=member.getDeclaringType();
    }
 else {
      return null;
    }
  }
  ResolvedMember[] members=onType.getDeclaredPointcuts(world);
  if (members != null) {
    for (int i=0; i < members.length; i++) {
      if (members[i].getName().equals(rp.name)) {
        return members[i];
      }
    }
  }
  return null;
}
Program: 9336
Project: 9336
Buggy source:
/** 
 * @param targetTypeName
 * @return
 */
private boolean matchesExactlyByName(String targetTypeName){
  if (knownMatches == null && importedPrefixes == null) {
    return innerMatchesExactly(targetTypeName);
  }
  if (isStar()) {
    int numDimensionsInTargetType=0;
    if (dim > 0) {
      int index;
      while ((index=targetTypeName.indexOf('[')) != -1) {
        numDimensionsInTargetType++;
        targetTypeName=targetTypeName.substring(index + 1);
      }
      if (numDimensionsInTargetType == dim) {
        return true;
      }
 else {
        return false;
      }
    }
  }
  if (namePatterns.length == 1) {
    for (int i=0, len=knownMatches.length; i < len; i++) {
      if (knownMatches[i].equals(targetTypeName))       return true;
    }
  }
 else {
    for (int i=0, len=knownMatches.length; i < len; i++) {
      String knownPrefix=knownMatches[i] + "String_Node_Str";
      if (targetTypeName.startsWith(knownPrefix)) {
        int pos=lastIndexOfDotOrDollar(knownMatches[i]);
        if (innerMatchesExactly(targetTypeName.substring(pos + 1))) {
          return true;
        }
      }
    }
  }
  for (int i=0, len=importedPrefixes.length; i < len; i++) {
    String prefix=importedPrefixes[i];
    if (targetTypeName.startsWith(prefix)) {
      if (innerMatchesExactly(targetTypeName.substring(prefix.length()))) {
        return true;
      }
    }
  }
  return innerMatchesExactly(targetTypeName);
}

Fixed version (ground truth):
/** 
 * @param targetTypeName
 * @return
 */
private boolean matchesExactlyByName(String targetTypeName){
  if (knownMatches == null && importedPrefixes == null) {
    return innerMatchesExactly(targetTypeName);
  }
  if (isNamePatternStar()) {
    int numDimensionsInTargetType=0;
    if (dim > 0) {
      int index;
      while ((index=targetTypeName.indexOf('[')) != -1) {
        numDimensionsInTargetType++;
        targetTypeName=targetTypeName.substring(index + 1);
      }
      if (numDimensionsInTargetType == dim) {
        return true;
      }
 else {
        return false;
      }
    }
  }
  if (namePatterns.length == 1) {
    for (int i=0, len=knownMatches.length; i < len; i++) {
      if (knownMatches[i].equals(targetTypeName))       return true;
    }
  }
 else {
    for (int i=0, len=knownMatches.length; i < len; i++) {
      String knownPrefix=knownMatches[i] + "String_Node_Str";
      if (targetTypeName.startsWith(knownPrefix)) {
        int pos=lastIndexOfDotOrDollar(knownMatches[i]);
        if (innerMatchesExactly(targetTypeName.substring(pos + 1))) {
          return true;
        }
      }
    }
  }
  for (int i=0, len=importedPrefixes.length; i < len; i++) {
    String prefix=importedPrefixes[i];
    if (targetTypeName.startsWith(prefix)) {
      if (innerMatchesExactly(targetTypeName.substring(prefix.length()))) {
        return true;
      }
    }
  }
  return innerMatchesExactly(targetTypeName);
}
Program: 9337
Project: 9337
Buggy source:
public boolean isStar(){
  return namePatterns.length == 1 && namePatterns[0].isAny();
}

Fixed version (ground truth):
public boolean isStar(){
  boolean annPatternStar=annotationPattern == AnnotationTypePattern.ANY;
  return (isNamePatternStar() && annPatternStar);
}
Program: 9338
Project: 9338
Buggy source:
public FuzzyBoolean matches(ResolvedTypeX[] someArgs){
  int numArgsMatchedByEllipsis=(someArgs.length + ellipsisCount) - typePatterns.length;
  if (numArgsMatchedByEllipsis < 0)   return FuzzyBoolean.NO;
  if ((numArgsMatchedByEllipsis > 0) && (ellipsisCount == 0)) {
    return FuzzyBoolean.NO;
  }
  FuzzyBoolean ret=FuzzyBoolean.YES;
  int argsIndex=0;
  for (int i=0; i < typePatterns.length; i++) {
    if (typePatterns[i] == AnnotationTypePattern.ELLIPSIS) {
      argsIndex+=numArgsMatchedByEllipsis;
    }
 else     if (typePatterns[i] == AnnotationTypePattern.ANY) {
      argsIndex++;
    }
 else {
      ExactAnnotationTypePattern ap=(ExactAnnotationTypePattern)typePatterns[i];
      FuzzyBoolean matches=ap.matches(someArgs[argsIndex]);
      if (matches == FuzzyBoolean.NO) {
        return FuzzyBoolean.MAYBE;
      }
 else {
        argsIndex++;
        ret=ret.and(matches);
      }
    }
  }
  return ret;
}

Fixed version (ground truth):
public FuzzyBoolean matches(ResolvedTypeX[] someArgs){
  int numArgsMatchedByEllipsis=(someArgs.length + ellipsisCount) - typePatterns.length;
  if (numArgsMatchedByEllipsis < 0)   return FuzzyBoolean.NO;
  if ((numArgsMatchedByEllipsis > 0) && (ellipsisCount == 0)) {
    return FuzzyBoolean.NO;
  }
  FuzzyBoolean ret=FuzzyBoolean.YES;
  int argsIndex=0;
  for (int i=0; i < typePatterns.length; i++) {
    if (typePatterns[i] == AnnotationTypePattern.ELLIPSIS) {
      argsIndex+=numArgsMatchedByEllipsis;
    }
 else     if (typePatterns[i] == AnnotationTypePattern.ANY) {
      argsIndex++;
    }
 else {
      ExactAnnotationTypePattern ap=(ExactAnnotationTypePattern)typePatterns[i];
      FuzzyBoolean matches=ap.matchesRuntimeType(someArgs[argsIndex]);
      if (matches == FuzzyBoolean.NO) {
        return FuzzyBoolean.MAYBE;
      }
 else {
        argsIndex++;
        ret=ret.and(matches);
      }
    }
  }
  return ret;
}
Program: 9339
Project: 9339
Buggy source:
protected FuzzyBoolean matchInternal(Shadow shadow){
  if (!couldMatch(shadow))   return FuzzyBoolean.NO;
  ResolvedTypeX toMatchAgainst=(isThis ? shadow.getThisType() : shadow.getTargetType()).resolve(shadow.getIWorld());
  annotationTypePattern.resolve(shadow.getIWorld());
  if (annotationTypePattern.matches(toMatchAgainst).alwaysTrue()) {
    return FuzzyBoolean.YES;
  }
 else {
    return FuzzyBoolean.MAYBE;
  }
}

Fixed version (ground truth):
protected FuzzyBoolean matchInternal(Shadow shadow){
  if (!couldMatch(shadow))   return FuzzyBoolean.NO;
  ResolvedTypeX toMatchAgainst=(isThis ? shadow.getThisType() : shadow.getTargetType()).resolve(shadow.getIWorld());
  annotationTypePattern.resolve(shadow.getIWorld());
  if (annotationTypePattern.matchesRuntimeType(toMatchAgainst).alwaysTrue()) {
    return FuzzyBoolean.YES;
  }
 else {
    return FuzzyBoolean.MAYBE;
  }
}
Program: 9340
Project: 9340
Buggy source:
/** 
 * Causes the aspect instance to be *set* for later retrievable through localAspectof()/aspectOf()
 */
public void weavePerTypeWithinAspectInitialization(final BcelAdvice munger,TypeX t){
  final InstructionFactory fact=getFactory();
  InstructionList entryInstructions=new InstructionList();
  InstructionList entrySuccessInstructions=new InstructionList();
  BcelObjectType aspectType=BcelWorld.getBcelObjectType(munger.getConcreteAspect());
  String aspectname=munger.getConcreteAspect().getName();
  String ptwField=NameMangler.perTypeWithinFieldForTarget(munger.getConcreteAspect());
  entrySuccessInstructions.append(new PUSH(fact.getConstantPool(),t.getName()));
  entrySuccessInstructions.append(fact.createInvoke(aspectname,"String_Node_Str",new ObjectType(aspectname),new Type[]{new ObjectType("String_Node_Str")},Constants.INVOKESTATIC));
  entrySuccessInstructions.append(fact.createPutStatic(t.getName(),ptwField,new ObjectType(aspectname)));
  entryInstructions.append(entrySuccessInstructions);
  range.insert(entryInstructions,Range.InsideBefore);
}

Fixed version (ground truth):
/** 
 * Causes the aspect instance to be *set* for later retrievable through localAspectof()/aspectOf()
 */
public void weavePerTypeWithinAspectInitialization(final BcelAdvice munger,TypeX t){
  if (t.isInterface(world))   return;
  final InstructionFactory fact=getFactory();
  InstructionList entryInstructions=new InstructionList();
  InstructionList entrySuccessInstructions=new InstructionList();
  BcelObjectType aspectType=BcelWorld.getBcelObjectType(munger.getConcreteAspect());
  String aspectname=munger.getConcreteAspect().getName();
  String ptwField=NameMangler.perTypeWithinFieldForTarget(munger.getConcreteAspect());
  entrySuccessInstructions.append(new PUSH(fact.getConstantPool(),t.getName()));
  entrySuccessInstructions.append(fact.createInvoke(aspectname,"String_Node_Str",new ObjectType(aspectname),new Type[]{new ObjectType("String_Node_Str")},Constants.INVOKESTATIC));
  entrySuccessInstructions.append(fact.createPutStatic(t.getName(),ptwField,new ObjectType(aspectname)));
  entryInstructions.append(entrySuccessInstructions);
  range.insert(entryInstructions,Range.InsideBefore);
}
Program: 9342
Project: 9342
Buggy source:
public void saveOptions() throws IOException {
  AjdeUIManager.getDefault().getBuildOptions().setSourceOnePointFourMode(assertions_checkBox.isSelected());
  AjdeUIManager.getDefault().getBuildOptions().setPreprocessMode(preprocess_checkBox.isSelected());
  AjdeUIManager.getDefault().getBuildOptions().setUseJavacMode(useJavac_checkBox.isSelected());
  AjdeUIManager.getDefault().getBuildOptions().setIncrementalMode(incremental_checkBox.isSelected());
  AjdeUIManager.getDefault().getBuildOptions().setNonStandardOptions(nonStandard_field.getText());
  AjdeUIManager.getDefault().getBuildOptions().setWorkingDir(workingDir_field.getText());
}

Fixed version (ground truth):
public void saveOptions() throws IOException {
  if (oneFive_checkBox.isSelected()) {
    AjdeUIManager.getDefault().getBuildOptions().setSourceCompatibilityLevel(CompilerOptions.VERSION_1_5);
  }
 else   if (assertions_checkBox.isSelected()) {
    AjdeUIManager.getDefault().getBuildOptions().setSourceOnePointFourMode(true);
    AjdeUIManager.getDefault().getBuildOptions().setSourceCompatibilityLevel(CompilerOptions.VERSION_1_4);
  }
 else {
    AjdeUIManager.getDefault().getBuildOptions().setSourceCompatibilityLevel(CompilerOptions.VERSION_1_3);
  }
  AjdeUIManager.getDefault().getBuildOptions().setPreprocessMode(preprocess_checkBox.isSelected());
  AjdeUIManager.getDefault().getBuildOptions().setUseJavacMode(useJavac_checkBox.isSelected());
  AjdeUIManager.getDefault().getBuildOptions().setIncrementalMode(incremental_checkBox.isSelected());
  AjdeUIManager.getDefault().getBuildOptions().setNonStandardOptions(nonStandard_field.getText());
  AjdeUIManager.getDefault().getBuildOptions().setWorkingDir(workingDir_field.getText());
}
Program: 9344
Project: 9344
Buggy source:
public void loadOptions() throws IOException {
  assertions_checkBox.setSelected(Ajde.getDefault().getBuildManager().getBuildOptions().getSourceOnePointFourMode());
  preprocess_checkBox.setSelected(Ajde.getDefault().getBuildManager().getBuildOptions().getPreprocessMode());
  useJavac_checkBox.setSelected(Ajde.getDefault().getBuildManager().getBuildOptions().getUseJavacMode());
  incremental_checkBox.setSelected(Ajde.getDefault().getBuildManager().getBuildOptions().getIncrementalMode());
  nonStandard_field.setText(Ajde.getDefault().getBuildManager().getBuildOptions().getNonStandardOptions());
  workingDir_field.setText(Ajde.getDefault().getBuildManager().getBuildOptions().getWorkingOutputPath());
}

Fixed version (ground truth):
public void loadOptions() throws IOException {
  if (Ajde.getDefault().getBuildManager().getBuildOptions().getSourceCompatibilityLevel() != null) {
    oneFive_checkBox.setSelected(Ajde.getDefault().getBuildManager().getBuildOptions().getSourceCompatibilityLevel().equals(CompilerOptions.VERSION_1_5));
  }
  if (Ajde.getDefault().getBuildManager().getBuildOptions().getSourceCompatibilityLevel() != null) {
    assertions_checkBox.setSelected(Ajde.getDefault().getBuildManager().getBuildOptions().getSourceCompatibilityLevel().equals(CompilerOptions.VERSION_1_4));
  }
  preprocess_checkBox.setSelected(Ajde.getDefault().getBuildManager().getBuildOptions().getPreprocessMode());
  useJavac_checkBox.setSelected(Ajde.getDefault().getBuildManager().getBuildOptions().getUseJavacMode());
  incremental_checkBox.setSelected(Ajde.getDefault().getBuildManager().getBuildOptions().getIncrementalMode());
  nonStandard_field.setText(Ajde.getDefault().getBuildManager().getBuildOptions().getNonStandardOptions());
  workingDir_field.setText(Ajde.getDefault().getBuildManager().getBuildOptions().getWorkingOutputPath());
}
Program: 9345
Project: 9345
Buggy source:
public boolean matches(ResolvedTypeX matchType,ResolvedTypeX aspectType){
  return isWithinType(matchType).alwaysTrue();
}

Fixed version (ground truth):
public boolean matches(ResolvedTypeX matchType,ResolvedTypeX aspectType){
  return isWithinType(matchType).alwaysTrue() && !matchType.isInterface();
}
Program: 9346
Project: 9346
Buggy source:
public boolean matches(ResolvedTypeX matchType,ResolvedTypeX aspectType){
  return testPointcut.getTypePattern().matches(matchType,TypePattern.STATIC).alwaysTrue();
}

Fixed version (ground truth):
public boolean matches(ResolvedTypeX matchType,ResolvedTypeX aspectType){
  return isWithinType(matchType).alwaysTrue();
}
Program: 9347
Project: 9347
Buggy source:
public PerClause concretize(ResolvedTypeX inAspect){
  PerTypeWithin ret=new PerTypeWithin(typePattern);
  ret.copyLocationFrom(this);
  ret.inAspect=inAspect;
  if (inAspect.isAbstract())   return ret;
  World world=inAspect.getWorld();
  SignaturePattern sigpat=new SignaturePattern(Member.STATIC_INITIALIZATION,ModifiersPattern.ANY,TypePattern.ANY,typePattern,NamePattern.ANY,TypePatternList.ANY,ThrowsPattern.ANY,AnnotationTypePattern.ANY);
  Pointcut testPc=new KindedPointcut(Shadow.StaticInitialization,sigpat);
  Pointcut testPc2=new WithinPointcut(typePattern);
  inAspect.crosscuttingMembers.addConcreteShadowMunger(Advice.makePerTypeWithinEntry(world,testPc,inAspect));
  ResolvedTypeMunger munger=new PerTypeWithinTargetTypeMunger(inAspect,ret);
  inAspect.crosscuttingMembers.addTypeMunger(world.concreteTypeMunger(munger,inAspect));
  return ret;
}

Fixed version (ground truth):
public PerClause concretize(ResolvedTypeX inAspect){
  PerTypeWithin ret=new PerTypeWithin(typePattern);
  ret.copyLocationFrom(this);
  ret.inAspect=inAspect;
  if (inAspect.isAbstract())   return ret;
  World world=inAspect.getWorld();
  SignaturePattern sigpat=new SignaturePattern(Member.STATIC_INITIALIZATION,ModifiersPattern.ANY,TypePattern.ANY,TypePattern.ANY,NamePattern.ANY,TypePatternList.ANY,ThrowsPattern.ANY,AnnotationTypePattern.ANY);
  Pointcut staticInitStar=new KindedPointcut(Shadow.StaticInitialization,sigpat);
  Pointcut withinTp=new WithinPointcut(typePattern);
  Pointcut andPcut=new AndPointcut(staticInitStar,withinTp);
  inAspect.crosscuttingMembers.addConcreteShadowMunger(Advice.makePerTypeWithinEntry(world,andPcut,inAspect));
  ResolvedTypeMunger munger=new PerTypeWithinTargetTypeMunger(inAspect,ret);
  inAspect.crosscuttingMembers.addTypeMunger(world.concreteTypeMunger(munger,inAspect));
  return ret;
}
Program: 9349
Project: 9349
Buggy source:
static void decorateHTMLFromInputFiles(Hashtable table,File newRootDir,SymbolManager sm,File[] inputFiles,String docModifier) throws IOException {
  rootDir=newRootDir;
  declIDTable=table;
  symbolManager=sm;
  for (int i=0; i < inputFiles.length; i++) {
    decorateHTMLFromDecls(symbolManager.getDeclarations(inputFiles[i].getCanonicalPath()),rootDir.getCanonicalPath() + Config.DIR_SEP_CHAR,docModifier,false);
  }
}

Fixed version (ground truth):
static void decorateHTMLFromInputFiles(Hashtable table,File newRootDir,SymbolManager sm,File[] inputFiles,String docModifier) throws IOException {
  rootDir=newRootDir;
  declIDTable=table;
  symbolManager=sm;
  docVisibilityModifier=docModifier;
  for (int i=0; i < inputFiles.length; i++) {
    decorateHTMLFromDecls(symbolManager.getDeclarations(inputFiles[i].getCanonicalPath()),rootDir.getCanonicalPath() + Config.DIR_SEP_CHAR,docModifier,false);
  }
}
Program: 9353
Project: 9353
Buggy source:
static int findDetailsIndex(StringBuffer fileBuffer,int index){
  String fbs=fileBuffer.toString();
  String MARKER_1="String_Node_Str";
  String MARKER_2="String_Node_Str";
  String MARKER_3="String_Node_Str";
  int index1=fbs.indexOf(MARKER_1,index);
  int index2=fbs.indexOf(MARKER_2,index);
  int index3=fbs.indexOf(MARKER_3,index);
  if (index1 < index2 && index1 < index3) {
    return index1;
  }
 else   if (index2 < index1 && index2 < index3) {
    return index2;
  }
 else {
    return index3;
  }
}

Fixed version (ground truth):
static int findDetailsIndex(StringBuffer fileBuffer,int index){
  String fbs=fileBuffer.toString();
  String MARKER_1="String_Node_Str";
  String MARKER_2="String_Node_Str";
  String MARKER_3="String_Node_Str";
  int index1=fbs.indexOf(MARKER_1,index);
  int index2=fbs.indexOf(MARKER_2,index);
  int index3=fbs.indexOf(MARKER_3,index);
  if (index1 != -1 && index1 < index2 && index1 < index3) {
    return index1;
  }
 else   if (index2 != -1 && index2 < index1 && index2 < index3) {
    return index2;
  }
 else   if (index3 != -1) {
    return index3;
  }
 else {
    return index;
  }
}
Program: 9354
Project: 9354
Buggy source:
/** 
 * TODO: don't place the summary first.
 */
static int findSummaryIndex(StringBuffer fileBuffer,int index){
  String fbs=fileBuffer.toString();
  String MARKER_1="String_Node_Str";
  String MARKER_2="String_Node_Str";
  int index1=fbs.indexOf(MARKER_1,index);
  int index2=fbs.indexOf(MARKER_2,index);
  if (index1 < index2) {
    return index1;
  }
 else {
    return index2;
  }
}

Fixed version (ground truth):
/** 
 * TODO: don't place the summary first.
 */
static int findSummaryIndex(StringBuffer fileBuffer,int index){
  String fbs=fileBuffer.toString();
  String MARKER_1="String_Node_Str";
  String MARKER_2="String_Node_Str";
  int index1=fbs.indexOf(MARKER_1,index);
  int index2=fbs.indexOf(MARKER_2,index);
  if (index1 < index2 && index1 != -1) {
    return index1;
  }
 else   if (index2 != -1) {
    return index2;
  }
 else {
    return index;
  }
}
Program: 9355
Project: 9355
Buggy source:
public void testCoverage(){
  outdir.delete();
  String[] args={"String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str",outdir.getAbsolutePath(),aspect1.getAbsolutePath(),file0.getAbsolutePath(),file1.getAbsolutePath(),file2.getAbsolutePath(),file3.getAbsolutePath(),file4.getAbsolutePath(),file5.getAbsolutePath(),file6.getAbsolutePath(),file7.getAbsolutePath(),file8.getAbsolutePath(),file9.getAbsolutePath()};
  org.aspectj.tools.ajdoc.Main.main(args);
}

Fixed version (ground truth):
public void testCoverage(){
  outdir.delete();
  String[] args={"String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str",outdir.getAbsolutePath(),aspect1.getAbsolutePath(),file0.getAbsolutePath(),file1.getAbsolutePath(),file2.getAbsolutePath(),file3.getAbsolutePath(),file4.getAbsolutePath(),file5.getAbsolutePath(),file6.getAbsolutePath(),file7.getAbsolutePath(),file8.getAbsolutePath(),file9.getAbsolutePath(),file10.getAbsolutePath()};
  org.aspectj.tools.ajdoc.Main.main(args);
}
Program: 9356
Project: 9356
Buggy source:
public static Test suite(){
  TestSuite suite=new TestSuite("String_Node_Str");
  suite.addTest(Ajc150Tests.suite());
  suite.addTest(AccBridgeMethods.suite());
  suite.addTestSuite(CovarianceTests.class);
  suite.addTestSuite(Enums.class);
  suite.addTestSuite(Annotations.class);
  suite.addTestSuite(AnnotationPointcutsTests.class);
  suite.addTestSuite(VarargsTests.class);
  suite.addTestSuite(AnnotationRuntimeTests.class);
  return suite;
}

Fixed version (ground truth):
public static Test suite(){
  TestSuite suite=new TestSuite("String_Node_Str");
  suite.addTestSuite(MigrationTests.class);
  suite.addTest(Ajc150Tests.suite());
  suite.addTest(AccBridgeMethods.suite());
  suite.addTestSuite(CovarianceTests.class);
  suite.addTestSuite(Enums.class);
  suite.addTestSuite(Annotations.class);
  suite.addTestSuite(AnnotationPointcutsTests.class);
  suite.addTestSuite(VarargsTests.class);
  suite.addTestSuite(AnnotationRuntimeTests.class);
  return suite;
}
Program: 9357
Project: 9357
Buggy source:
public static AdviceKind read(DataInputStream s) throws IOException {
  int key=s.readByte();
switch (key) {
case 1:
    return Before;
case 2:
  return After;
case 3:
return AfterThrowing;
case 4:
return AfterReturning;
case 5:
return Around;
case 6:
return CflowEntry;
case 7:
return CflowBelowEntry;
case 8:
return InterInitializer;
case 9:
return PerCflowEntry;
case 10:
return PerCflowBelowEntry;
case 11:
return PerThisEntry;
case 12:
return PerTargetEntry;
case 13:
return Softener;
}
throw new RuntimeException("String_Node_Str" + key);
}

Fixed version (ground truth):
public static AdviceKind read(VersionedDataInputStream s) throws IOException {
  int key=s.readByte();
switch (key) {
case 1:
    return Before;
case 2:
  return After;
case 3:
return AfterThrowing;
case 4:
return AfterReturning;
case 5:
return Around;
case 6:
return CflowEntry;
case 7:
return CflowBelowEntry;
case 8:
return InterInitializer;
case 9:
return PerCflowEntry;
case 10:
return PerCflowBelowEntry;
case 11:
return PerThisEntry;
case 12:
return PerTargetEntry;
case 13:
return Softener;
}
throw new RuntimeException("String_Node_Str" + key);
}
Program: 9358
Project: 9358
Buggy source:
public static EffectiveSignatureAttribute read(DataInputStream s,ISourceContext context) throws IOException {
  return new EffectiveSignatureAttribute(ResolvedMember.readResolvedMember(s,context),Shadow.Kind.read(s),s.readBoolean());
}

Fixed version (ground truth):
public static EffectiveSignatureAttribute read(VersionedDataInputStream s,ISourceContext context) throws IOException {
  return new EffectiveSignatureAttribute(ResolvedMember.readResolvedMember(s,context),Shadow.Kind.read(s),s.readBoolean());
}
Program: 9359
Project: 9359
Buggy source:
public static ResolvedPointcutDefinition read(DataInputStream s,ISourceContext context) throws IOException {
  return new ResolvedPointcutDefinition(TypeX.read(s),s.readInt(),s.readUTF(),TypeX.readArray(s),Pointcut.read(s,context));
}

Fixed version (ground truth):
public static ResolvedPointcutDefinition read(VersionedDataInputStream s,ISourceContext context) throws IOException {
  return new ResolvedPointcutDefinition(TypeX.read(s),s.readInt(),s.readUTF(),TypeX.readArray(s),Pointcut.read(s,context));
}
Program: 9360
Project: 9360
Buggy source:
public static final WeaverStateInfo read(DataInputStream s,ISourceContext context) throws IOException {
  byte b=s.readByte();
  boolean isReweavable=((b & REWEAVABLE_BIT) != 0);
  if (isReweavable)   b=(byte)(b - REWEAVABLE_BIT);
  boolean isReweavableCompressed=((b & REWEAVABLE_COMPRESSION_BIT) != 0);
  if (isReweavableCompressed)   b=(byte)(b - REWEAVABLE_COMPRESSION_BIT);
switch (b) {
case UNTOUCHED:
    throw new RuntimeException("String_Node_Str");
case WOVEN:
  return new WeaverStateInfo(Collections.EMPTY_LIST,true,isReweavable,isReweavableCompressed);
case EXTENDED:
int n=s.readShort();
List l=new ArrayList();
for (int i=0; i < n; i++) {
TypeX aspectType=TypeX.read(s);
ResolvedTypeMunger typeMunger=ResolvedTypeMunger.read(s,context);
l.add(new Entry(aspectType,typeMunger));
}
WeaverStateInfo wsi=new WeaverStateInfo(l,false,isReweavable,isReweavableCompressed);
readAnyReweavableData(wsi,s);
return wsi;
}
throw new RuntimeException("String_Node_Str" + b);
}

Fixed version (ground truth):
public static final WeaverStateInfo read(VersionedDataInputStream s,ISourceContext context) throws IOException {
  byte b=s.readByte();
  boolean isReweavable=((b & REWEAVABLE_BIT) != 0);
  if (isReweavable)   b=(byte)(b - REWEAVABLE_BIT);
  boolean isReweavableCompressed=((b & REWEAVABLE_COMPRESSION_BIT) != 0);
  if (isReweavableCompressed)   b=(byte)(b - REWEAVABLE_COMPRESSION_BIT);
switch (b) {
case UNTOUCHED:
    throw new RuntimeException("String_Node_Str");
case WOVEN:
  return new WeaverStateInfo(Collections.EMPTY_LIST,true,isReweavable,isReweavableCompressed);
case EXTENDED:
int n=s.readShort();
List l=new ArrayList();
for (int i=0; i < n; i++) {
TypeX aspectType=TypeX.read(s);
ResolvedTypeMunger typeMunger=ResolvedTypeMunger.read(s,context);
l.add(new Entry(aspectType,typeMunger));
}
WeaverStateInfo wsi=new WeaverStateInfo(l,false,isReweavable,isReweavableCompressed);
readAnyReweavableData(wsi,s);
return wsi;
}
throw new RuntimeException("String_Node_Str" + b);
}
Program: 9361
Project: 9361
Buggy source:
public static List readAjAttributes(Attribute[] as,ISourceContext context,IMessageHandler msgHandler){
  List l=new ArrayList();
  for (int i=as.length - 1; i >= 0; i--) {
    Attribute a=as[i];
    if (a instanceof Unknown) {
      Unknown u=(Unknown)a;
      String name=u.getName();
      if (name.startsWith(AjAttribute.AttributePrefix)) {
        AjAttribute attr=AjAttribute.read(name,u.getBytes(),context,msgHandler);
        if (attr != null)         l.add(attr);
      }
    }
  }
  return l;
}

Fixed version (ground truth):
public static List readAjAttributes(String classname,Attribute[] as,ISourceContext context,IMessageHandler msgHandler){
  List l=new ArrayList();
  AjAttribute.WeaverVersionInfo version=new WeaverVersionInfo();
  for (int i=as.length - 1; i >= 0; i--) {
    Attribute a=as[i];
    if (a instanceof Unknown) {
      Unknown u=(Unknown)a;
      String name=u.getName();
      if (name.startsWith(AjAttribute.AttributePrefix)) {
        AjAttribute attr=AjAttribute.read(version,name,u.getBytes(),context,msgHandler);
        if (attr != null && attr instanceof AjAttribute.WeaverVersionInfo) {
          version=(AjAttribute.WeaverVersionInfo)attr;
          if (version.getMajorVersion() > WeaverVersionInfo.getCurrentWeaverMajorVersion()) {
            throw new BCException("String_Node_Str" + WeaverVersionInfo.toCurrentVersionString() + "String_Node_Str"+ classname+ "String_Node_Str"+ version.toString());
          }
        }
        if (attr != null)         l.add(attr);
      }
    }
  }
  return l;
}
Program: 9362
Project: 9362
Buggy source:
private void unpackAttributes(World world){
  Attribute[] attrs=field.getAttributes();
  List as=BcelAttributes.readAjAttributes(attrs,getSourceContext(world),world.getMessageHandler());
  for (Iterator iter=as.iterator(); iter.hasNext(); ) {
    AjAttribute a=(AjAttribute)iter.next();
    if (a instanceof AjAttribute.AjSynthetic) {
      isAjSynthetic=true;
    }
 else {
      throw new BCException("String_Node_Str" + a);
    }
  }
  isAjSynthetic=false;
  for (int i=attrs.length - 1; i >= 0; i--) {
    if (attrs[i] instanceof Synthetic)     isSynthetic=true;
  }
}

Fixed version (ground truth):
private void unpackAttributes(World world){
  Attribute[] attrs=field.getAttributes();
  List as=BcelAttributes.readAjAttributes(getDeclaringType().getClassName(),attrs,getSourceContext(world),world.getMessageHandler());
  for (Iterator iter=as.iterator(); iter.hasNext(); ) {
    AjAttribute a=(AjAttribute)iter.next();
    if (a instanceof AjAttribute.AjSynthetic) {
      isAjSynthetic=true;
    }
 else {
      throw new BCException("String_Node_Str" + a);
    }
  }
  isAjSynthetic=false;
  for (int i=attrs.length - 1; i >= 0; i--) {
    if (attrs[i] instanceof Synthetic)     isSynthetic=true;
  }
}
Program: 9363
Project: 9363
Buggy source:
private void unpackAjAttributes(World world){
  List as=BcelAttributes.readAjAttributes(method.getAttributes(),getSourceContext(world),world.getMessageHandler());
  for (Iterator iter=as.iterator(); iter.hasNext(); ) {
    AjAttribute a=(AjAttribute)iter.next();
    if (a instanceof AjAttribute.MethodDeclarationLineNumberAttribute) {
      declarationLineNumber=(AjAttribute.MethodDeclarationLineNumberAttribute)a;
    }
 else     if (a instanceof AjAttribute.AdviceAttribute) {
      associatedShadowMunger=((AjAttribute.AdviceAttribute)a).reify(this,world);
      return;
    }
 else     if (a instanceof AjAttribute.AjSynthetic) {
      isAjSynthetic=true;
    }
 else     if (a instanceof AjAttribute.EffectiveSignatureAttribute) {
      effectiveSignature=(AjAttribute.EffectiveSignatureAttribute)a;
    }
 else {
      throw new BCException("String_Node_Str" + a);
    }
  }
  associatedShadowMunger=null;
}

Fixed version (ground truth):
private void unpackAjAttributes(World world){
  List as=BcelAttributes.readAjAttributes(getDeclaringType().getClassName(),method.getAttributes(),getSourceContext(world),world.getMessageHandler());
  for (Iterator iter=as.iterator(); iter.hasNext(); ) {
    AjAttribute a=(AjAttribute)iter.next();
    if (a instanceof AjAttribute.MethodDeclarationLineNumberAttribute) {
      declarationLineNumber=(AjAttribute.MethodDeclarationLineNumberAttribute)a;
    }
 else     if (a instanceof AjAttribute.AdviceAttribute) {
      associatedShadowMunger=((AjAttribute.AdviceAttribute)a).reify(this,world);
      return;
    }
 else     if (a instanceof AjAttribute.AjSynthetic) {
      isAjSynthetic=true;
    }
 else     if (a instanceof AjAttribute.EffectiveSignatureAttribute) {
      effectiveSignature=(AjAttribute.EffectiveSignatureAttribute)a;
    }
 else {
      throw new BCException("String_Node_Str" + a);
    }
  }
  associatedShadowMunger=null;
}
Program: 9365
Project: 9365
Buggy source:
private void printAspectAttributes(PrintStream out){
  ISourceContext context=null;
  if (enclosingClass != null && enclosingClass.getType() != null) {
    context=enclosingClass.getType().getSourceContext();
  }
  List as=BcelAttributes.readAjAttributes(attributes,context,null);
  if (!as.isEmpty()) {
    out.println("String_Node_Str" + as.get(0));
  }
}

Fixed version (ground truth):
private void printAspectAttributes(PrintStream out){
  ISourceContext context=null;
  if (enclosingClass != null && enclosingClass.getType() != null) {
    context=enclosingClass.getType().getSourceContext();
  }
  List as=BcelAttributes.readAjAttributes(getClassName(),attributes,context,null);
  if (!as.isEmpty()) {
    out.println("String_Node_Str" + as.get(0));
  }
}
Program: 9366
Project: 9366
Buggy source:
public static AnnotationTypePattern read(DataInputStream s,ISourceContext context) throws IOException {
  AnnotationTypePattern p=new AndAnnotationTypePattern(AnnotationTypePattern.read(s,context),AnnotationTypePattern.read(s,context));
  p.readLocation(context,s);
  return p;
}

Fixed version (ground truth):
public static AnnotationTypePattern read(VersionedDataInputStream s,ISourceContext context) throws IOException {
  AnnotationTypePattern p=new AndAnnotationTypePattern(AnnotationTypePattern.read(s,context),AnnotationTypePattern.read(s,context));
  p.readLocation(context,s);
  return p;
}
Program: 9367
Project: 9367
Buggy source:
private WeaveMessage(String message){
  super(message,IMessage.WEAVEINFO,null,null);
}

Fixed version (ground truth):
private WeaveMessage(String message,String affectedtypename,String aspectname){
  super(message,IMessage.WEAVEINFO,null,null);
  this.affectedtypename=affectedtypename;
  this.aspectname=aspectname;
}
Program: 9368
Project: 9368
Buggy source:
/** 
 * Static helper method for constructing weaving messages.
 * @param kind what kind of message (e.g. declare parents)
 * @param inserts inserts for the message (inserts are marked %n in the message)
 * @param affectedtypename the type which is being advised/declaredUpon
 * @param aspectname the aspect that defined the advice or declares
 * @return new weaving message
 */
public static WeaveMessage constructWeavingMessage(WeaveMessageKind kind,String[] inserts){
  StringBuffer str=new StringBuffer(kind.getMessage());
  int pos=-1;
  while ((pos=new String(str).indexOf("String_Node_Str")) != -1) {
    int n=Character.getNumericValue(str.charAt(pos + 1));
    str.replace(pos,pos + 2,inserts[n - 1]);
  }
  return new WeaveMessage(str.toString());
}

Fixed version (ground truth):
/** 
 * Static helper method for constructing weaving messages.
 * @param kind what kind of message (e.g. declare parents)
 * @param inserts inserts for the message (inserts are marked %n in the message)
 * @param affectedtypename the type which is being advised/declaredUpon
 * @param aspectname the aspect that defined the advice or declares
 * @return new weaving message
 */
public static WeaveMessage constructWeavingMessage(WeaveMessageKind kind,String[] inserts,String affectedtypename,String aspectname){
  StringBuffer str=new StringBuffer(kind.getMessage());
  int pos=-1;
  while ((pos=new String(str).indexOf("String_Node_Str")) != -1) {
    int n=Character.getNumericValue(str.charAt(pos + 1));
    str.replace(pos,pos + 2,inserts[n - 1]);
  }
  return new WeaveMessage(str.toString(),affectedtypename,aspectname);
}