nus-yam/ex-repair huggingface dataset:
Program: 9514
Project: 9514
Buggy source:
private void writeResource(String filename,byte[] content) throws IOException {
  if (state.resources.contains(filename))   return;
  if (zos != null) {
    ZipEntry newEntry=new ZipEntry(filename);
    zos.putNextEntry(newEntry);
    zos.write(content);
    zos.closeEntry();
  }
 else {
    OutputStream fos=FileUtil.makeOutputStream(new File(buildConfig.getOutputDir(),filename));
    fos.write(content);
    fos.close();
  }
  state.resources.add(filename);
}

Fixed version (ground truth):
private void writeResource(String filename,byte[] content,File srcLocation) throws IOException {
  if (state.resources.contains(filename)) {
    IMessage msg=new Message("String_Node_Str" + filename + "String_Node_Str",IMessage.WARNING,null,new SourceLocation(srcLocation,0));
    handler.handleMessage(msg);
    return;
  }
  if (zos != null) {
    ZipEntry newEntry=new ZipEntry(filename);
    zos.putNextEntry(newEntry);
    zos.write(content);
    zos.closeEntry();
  }
 else {
    OutputStream fos=FileUtil.makeOutputStream(new File(buildConfig.getOutputDir(),filename));
    fos.write(content);
    fos.close();
  }
  state.resources.add(filename);
}
Program: 9515
Project: 9515
Buggy source:
private void copyResourcesFromFile(File f,String filename) throws IOException {
  if (!acceptResource(filename))   return;
  FileInputStream fis=null;
  try {
    fis=new FileInputStream(f);
    byte[] bytes=FileUtil.readAsByteArray(fis);
    writeResource(filename,bytes);
  }
  finally {
    if (fis != null)     fis.close();
  }
}

Fixed version (ground truth):
private void copyResourcesFromFile(File f,String filename,File src) throws IOException {
  if (!acceptResource(filename))   return;
  FileInputStream fis=null;
  try {
    fis=new FileInputStream(f);
    byte[] bytes=FileUtil.readAsByteArray(fis);
    writeResource(filename,bytes,src);
  }
  finally {
    if (fis != null)     fis.close();
  }
}
Program: 9516
Project: 9516
Buggy source:
private void copyResourcesFromDirectory(File dir) throws IOException {
  File[] files=FileUtil.listFiles(dir,new FileFilter(){
    public boolean accept(    File f){
      boolean accept=!(f.isDirectory() || f.getName().endsWith("String_Node_Str"));
      return accept;
    }
  }
);
  for (int i=0; i < files.length; i++) {
    String filename=files[i].getAbsolutePath().substring(dir.getAbsolutePath().length() + 1);
    copyResourcesFromFile(files[i],filename);
  }
}

Fixed version (ground truth):
private void copyResourcesFromDirectory(File dir) throws IOException {
  if (!COPY_INPATH_DIR_RESOURCES)   return;
  File[] files=FileUtil.listFiles(dir,new FileFilter(){
    public boolean accept(    File f){
      boolean accept=!(f.isDirectory() || f.getName().endsWith("String_Node_Str"));
      return accept;
    }
  }
);
  for (int i=0; i < files.length; i++) {
    String filename=files[i].getAbsolutePath().substring(dir.getAbsolutePath().length() + 1);
    copyResourcesFromFile(files[i],filename,dir);
  }
}
Program: 9517
Project: 9517
Buggy source:
private void deleteResources(){
  List oldResources=new ArrayList();
  oldResources.addAll(resources);
  for (Iterator i=buildConfig.getInpath().iterator(); i.hasNext(); ) {
    File inPathElement=(File)i.next();
    if (inPathElement.isDirectory()) {
      deleteResourcesFromDirectory(inPathElement,oldResources);
    }
  }
  if (buildConfig.getSourcePathResources() != null) {
    for (Iterator i=buildConfig.getSourcePathResources().keySet().iterator(); i.hasNext(); ) {
      String resource=(String)i.next();
      maybeDeleteResource(resource,oldResources);
    }
  }
  for (Iterator iter=oldResources.iterator(); iter.hasNext(); ) {
    String victim=(String)iter.next();
    File f=new File(buildConfig.getOutputDir(),victim);
    if (f.exists()) {
      f.delete();
    }
    resources.remove(victim);
  }
}

Fixed version (ground truth):
private void deleteResources(){
  List oldResources=new ArrayList();
  oldResources.addAll(resources);
  for (Iterator i=buildConfig.getInpath().iterator(); i.hasNext(); ) {
    File inPathElement=(File)i.next();
    if (inPathElement.isDirectory() && AjBuildManager.COPY_INPATH_DIR_RESOURCES) {
      deleteResourcesFromDirectory(inPathElement,oldResources);
    }
  }
  if (buildConfig.getSourcePathResources() != null) {
    for (Iterator i=buildConfig.getSourcePathResources().keySet().iterator(); i.hasNext(); ) {
      String resource=(String)i.next();
      maybeDeleteResource(resource,oldResources);
    }
  }
  for (Iterator iter=oldResources.iterator(); iter.hasNext(); ) {
    String victim=(String)iter.next();
    File f=new File(buildConfig.getOutputDir(),victim);
    if (f.exists()) {
      f.delete();
    }
    resources.remove(victim);
  }
}
Program: 9518
Project: 9518
Buggy source:
private MethodBinding getAccessibleMethod(MethodBinding binding){
  if (!binding.isValidBinding())   return binding;
  makePublic(binding.declaringClass);
  if (isPublic(binding))   return binding;
  if (binding instanceof InterTypeMethodBinding)   return binding;
  if (binding.isPrivate() && binding.declaringClass != inAspect.binding) {
    binding.modifiers=AstUtil.makePackageVisible(binding.modifiers);
  }
  ResolvedMember m=EclipseFactory.makeResolvedMember(binding);
  if (inAspect.accessForInline.containsKey(m))   return (MethodBinding)inAspect.accessForInline.get(m);
  MethodBinding ret=world.makeMethodBinding(AjcMemberMaker.inlineAccessMethodForMethod(inAspect.typeX,m));
  inAspect.accessForInline.put(m,ret);
  return ret;
}

Fixed version (ground truth):
private MethodBinding getAccessibleMethod(MethodBinding binding,TypeBinding receiverType){
  if (!binding.isValidBinding())   return binding;
  makePublic(receiverType);
  if (isPublic(binding))   return binding;
  if (binding instanceof InterTypeMethodBinding)   return binding;
  if (binding.isPrivate() && binding.declaringClass != inAspect.binding) {
    binding.modifiers=AstUtil.makePackageVisible(binding.modifiers);
  }
  ResolvedMember m=EclipseFactory.makeResolvedMember(binding,receiverType);
  if (inAspect.accessForInline.containsKey(m))   return (MethodBinding)inAspect.accessForInline.get(m);
  MethodBinding ret=world.makeMethodBinding(AjcMemberMaker.inlineAccessMethodForMethod(inAspect.typeX,m));
  inAspect.accessForInline.put(m,ret);
  return ret;
}
Program: 9519
Project: 9519
Buggy source:
private FieldBinding getAccessibleField(FieldBinding binding){
  if (!binding.isValidBinding())   return binding;
  makePublic(binding.declaringClass);
  if (isPublic(binding))   return binding;
  if (binding instanceof PrivilegedFieldBinding)   return binding;
  if (binding instanceof InterTypeFieldBinding)   return binding;
  if (binding.isPrivate() && binding.declaringClass != inAspect.binding) {
    binding.modifiers=AstUtil.makePackageVisible(binding.modifiers);
  }
  ResolvedMember m=EclipseFactory.makeResolvedMember(binding);
  if (inAspect.accessForInline.containsKey(m))   return (FieldBinding)inAspect.accessForInline.get(m);
  FieldBinding ret=new InlineAccessFieldBinding(inAspect,binding);
  inAspect.accessForInline.put(m,ret);
  return ret;
}

Fixed version (ground truth):
private FieldBinding getAccessibleField(FieldBinding binding,TypeBinding receiverType){
  if (!binding.isValidBinding())   return binding;
  makePublic(receiverType);
  if (isPublic(binding))   return binding;
  if (binding instanceof PrivilegedFieldBinding)   return binding;
  if (binding instanceof InterTypeFieldBinding)   return binding;
  if (binding.isPrivate() && binding.declaringClass != inAspect.binding) {
    binding.modifiers=AstUtil.makePackageVisible(binding.modifiers);
  }
  ResolvedMember m=EclipseFactory.makeResolvedMember(binding,receiverType);
  if (inAspect.accessForInline.containsKey(m))   return (FieldBinding)inAspect.accessForInline.get(m);
  FieldBinding ret=new InlineAccessFieldBinding(inAspect,binding,m);
  inAspect.accessForInline.put(m,ret);
  return ret;
}
Program: 9520
Project: 9520
Buggy source:
public static ResolvedMember makeResolvedMember(FieldBinding binding){
  return new ResolvedMember(Member.FIELD,fromBinding(binding.declaringClass),binding.modifiers,fromBinding(binding.type),new String(binding.name),TypeX.NONE);
}

Fixed version (ground truth):
public static ResolvedMember makeResolvedMember(FieldBinding binding,TypeBinding receiverType){
  return new ResolvedMember(Member.FIELD,fromBinding(receiverType),binding.modifiers,fromBinding(binding.type),new String(binding.name),TypeX.NONE);
}
Program: 9521
Project: 9521
Buggy source:
public InlineAccessFieldBinding(AspectDeclaration inAspect,FieldBinding baseField){
  super(baseField,baseField.declaringClass);
  this.reader=new SimpleSyntheticAccessMethodBinding(inAspect.factory.makeMethodBinding(AjcMemberMaker.inlineAccessMethodForFieldGet(inAspect.typeX,EclipseFactory.makeResolvedMember(baseField))));
  this.writer=new SimpleSyntheticAccessMethodBinding(inAspect.factory.makeMethodBinding(AjcMemberMaker.inlineAccessMethodForFieldSet(inAspect.typeX,EclipseFactory.makeResolvedMember(baseField))));
  this.constant=ASTNode.NotAConstant;
  this.baseField=baseField;
}

Fixed version (ground truth):
public InlineAccessFieldBinding(AspectDeclaration inAspect,FieldBinding baseField,ResolvedMember resolvedField){
  super(baseField,baseField.declaringClass);
  this.reader=new SimpleSyntheticAccessMethodBinding(inAspect.factory.makeMethodBinding(AjcMemberMaker.inlineAccessMethodForFieldGet(inAspect.typeX,resolvedField)));
  this.writer=new SimpleSyntheticAccessMethodBinding(inAspect.factory.makeMethodBinding(AjcMemberMaker.inlineAccessMethodForFieldSet(inAspect.typeX,resolvedField)));
  this.constant=ASTNode.NotAConstant;
  this.baseField=baseField;
}
Program: 9522
Project: 9522
Buggy source:
public String getSignature(){
  return memberView.getSignature();
}

Fixed version (ground truth):
public String getSignature(){
  if (memberView != null)   return memberView.getSignature();
  return Member.typesToSignature(BcelWorld.fromBcel(getReturnType()),BcelWorld.fromBcel(getArgumentTypes()));
}
Program: 9523
Project: 9523
Buggy source:
protected void generatePostSyntheticCode(ClassScope classScope,CodeStream codeStream){
  super.generatePostSyntheticCode(classScope,codeStream);
  if (hasPost) {
    final EclipseFactory world=EclipseFactory.fromScopeLookupEnvironment(classScope);
    codeStream.invokestatic(world.makeMethodBindingForCall(AjcMemberMaker.ajcPostClinitMethod(EclipseFactory.fromBinding(classScope.referenceContext.binding))));
  }
  if (initFailureField != null) {
    handlerLabel.placeEnd();
    Label endLabel=new Label(codeStream);
    codeStream.goto_(endLabel);
    handlerLabel.place();
    codeStream.putstatic(initFailureField);
    endLabel.place();
  }
}

Fixed version (ground truth):
protected void generatePostSyntheticCode(ClassScope classScope,CodeStream codeStream){
  super.generatePostSyntheticCode(classScope,codeStream);
  if (hasPost) {
    final EclipseFactory world=EclipseFactory.fromScopeLookupEnvironment(classScope);
    codeStream.invokestatic(world.makeMethodBindingForCall(AjcMemberMaker.ajcPostClinitMethod(EclipseFactory.fromBinding(classScope.referenceContext.binding))));
  }
  if (initFailureField != null) {
    handlerLabel.placeEnd();
    Label endLabel=new Label(codeStream);
    codeStream.goto_(endLabel);
    handlerLabel.place();
    codeStream.astore_0();
    codeStream.aload_0();
    codeStream.putstatic(initFailureField);
    endLabel.place();
  }
}
Program: 9524
Project: 9524
Buggy source:
private boolean isInitFailureHandler(InstructionHandle ih){
  if (ih.getInstruction() instanceof PUTSTATIC) {
    String name=((PUTSTATIC)ih.getInstruction()).getFieldName(cpg);
    if (name.equals(NameMangler.INITFAILURECAUSE_FIELD_NAME))     return true;
  }
  return false;
}

Fixed version (ground truth):
private boolean isInitFailureHandler(InstructionHandle ih){
  InstructionHandle twoInstructionsAway=ih.getNext().getNext();
  if (twoInstructionsAway.getInstruction() instanceof PUTSTATIC) {
    String name=((PUTSTATIC)twoInstructionsAway.getInstruction()).getFieldName(cpg);
    if (name.equals(NameMangler.INITFAILURECAUSE_FIELD_NAME))     return true;
  }
  return false;
}
Program: 9525
Project: 9525
Buggy source:
public static Test suite(){
  TestSuite suite=new TestSuite(AjdeTests.class.getName());
  suite.addTestSuite(BuildOptionsTest.class);
  suite.addTestSuite(BuildConfigurationTests.class);
  suite.addTestSuite(StructureModelRegressionTest.class);
  suite.addTestSuite(StructureModelTest.class);
  suite.addTestSuite(VersionTest.class);
  suite.addTestSuite(CompilerMessagesTest.class);
  suite.addTestSuite(AsmDeclarationsTest.class);
  suite.addTestSuite(AsmRelationshipsTest.class);
  suite.addTestSuite(InpathTestcase.class);
  suite.addTestSuite(ResourceCopyTestCase.class);
  suite.addTestSuite(ModelPerformanceTest.class);
  return suite;
}

Fixed version (ground truth):
public static Test suite(){
  TestSuite suite=new TestSuite(AjdeTests.class.getName());
  suite.addTestSuite(BuildOptionsTest.class);
  suite.addTestSuite(BuildConfigurationTests.class);
  suite.addTestSuite(StructureModelRegressionTest.class);
  suite.addTestSuite(StructureModelTest.class);
  suite.addTestSuite(VersionTest.class);
  suite.addTestSuite(CompilerMessagesTest.class);
  suite.addTestSuite(AsmDeclarationsTest.class);
  suite.addTestSuite(AsmRelationshipsTest.class);
  suite.addTestSuite(InpathTestcase.class);
  suite.addTestSuite(ResourceCopyTestCase.class);
  suite.addTestSuite(ModelPerformanceTest.class);
  suite.addTestSuite(SavedModelConsistencyTest.class);
  return suite;
}
Program: 9526
Project: 9526
Buggy source:
public MethodBinding getExactMethod(SourceTypeBinding sourceTypeBinding,char[] selector,TypeBinding[] argumentTypes){
  MethodBinding ret=sourceTypeBinding.getExactMethodBase(selector,argumentTypes);
  if (ret != null)   return ret;
  for (int i=0, len=interTypeMethods.size(); i < len; i++) {
    MethodBinding im=(MethodBinding)interTypeMethods.get(i);
    if (matches(im,selector,argumentTypes)) {
      return im;
    }
  }
  return null;
}

Fixed version (ground truth):
public MethodBinding getExactMethod(SourceTypeBinding sourceTypeBinding,char[] selector,TypeBinding[] argumentTypes){
  MethodBinding ret=sourceTypeBinding.getExactMethodBase(selector,argumentTypes);
  for (int i=0, len=interTypeMethods.size(); i < len; i++) {
    MethodBinding im=(MethodBinding)interTypeMethods.get(i);
    if (matches(im,selector,argumentTypes)) {
      return im;
    }
  }
  return ret;
}
Program: 9527
Project: 9527
Buggy source:
public EclipseTypeMunger build(ClassScope classScope){
  EclipseFactory world=EclipseFactory.fromScopeLookupEnvironment(classScope);
  binding=classScope.referenceContext.binding.resolveTypesFor(binding);
  resolveOnType(classScope);
  if (ignoreFurtherInvestigation)   return null;
  if (onTypeBinding.isInterface()) {
    ignoreFurtherInvestigation=true;
    return null;
  }
  if (onTypeBinding.isNestedType()) {
    classScope.problemReporter().signalError(sourceStart,sourceEnd,"String_Node_Str");
    ignoreFurtherInvestigation=true;
    return null;
  }
  ResolvedTypeX declaringTypeX=world.fromEclipse(onTypeBinding);
  ResolvedTypeX aspectType=world.fromEclipse(classScope.referenceContext.binding);
  ResolvedMember bindingAsMember=EclipseFactory.makeResolvedMember(binding);
  ResolvedMember signature=new ResolvedMember(Member.CONSTRUCTOR,declaringTypeX,declaredModifiers,ResolvedTypeX.VOID,"String_Node_Str",bindingAsMember.getParameterTypes(),world.fromEclipse(binding.thrownExceptions));
  ResolvedMember syntheticInterMember=AjcMemberMaker.interConstructor(declaringTypeX,signature,aspectType);
  NewConstructorTypeMunger myMunger=new NewConstructorTypeMunger(signature,syntheticInterMember,null,null);
  setMunger(myMunger);
  myMunger.check(world.getWorld());
  this.selector=binding.selector=NameMangler.postIntroducedConstructor(EclipseFactory.fromBinding(binding.declaringClass),declaringTypeX).toCharArray();
  return new EclipseTypeMunger(world,myMunger,aspectType,this);
}

Fixed version (ground truth):
public EclipseTypeMunger build(ClassScope classScope){
  EclipseFactory world=EclipseFactory.fromScopeLookupEnvironment(classScope);
  binding=classScope.referenceContext.binding.resolveTypesFor(binding);
  resolveOnType(classScope);
  if (ignoreFurtherInvestigation)   return null;
  if (onTypeBinding.isInterface()) {
    classScope.problemReporter().signalError(sourceStart,sourceEnd,"String_Node_Str");
    ignoreFurtherInvestigation=true;
    return null;
  }
  if (onTypeBinding.isNestedType()) {
    classScope.problemReporter().signalError(sourceStart,sourceEnd,"String_Node_Str");
    ignoreFurtherInvestigation=true;
    return null;
  }
  ResolvedTypeX declaringTypeX=world.fromEclipse(onTypeBinding);
  ResolvedTypeX aspectType=world.fromEclipse(classScope.referenceContext.binding);
  ResolvedMember bindingAsMember=EclipseFactory.makeResolvedMember(binding);
  ResolvedMember signature=new ResolvedMember(Member.CONSTRUCTOR,declaringTypeX,declaredModifiers,ResolvedTypeX.VOID,"String_Node_Str",bindingAsMember.getParameterTypes(),world.fromEclipse(binding.thrownExceptions));
  ResolvedMember syntheticInterMember=AjcMemberMaker.interConstructor(declaringTypeX,signature,aspectType);
  NewConstructorTypeMunger myMunger=new NewConstructorTypeMunger(signature,syntheticInterMember,null,null);
  setMunger(myMunger);
  myMunger.check(world.getWorld());
  this.selector=binding.selector=NameMangler.postIntroducedConstructor(EclipseFactory.fromBinding(binding.declaringClass),declaringTypeX).toCharArray();
  return new EclipseTypeMunger(world,myMunger,aspectType,this);
}
Program: 9528
Project: 9528
Buggy source:
public void postParse(TypeDeclaration typeDec){
  this.selector=NameMangler.adviceName(EclipseFactory.fromBinding(typeDec.binding),kind,sourceStart).toCharArray();
  if (arguments != null) {
    baseArgumentCount=arguments.length;
  }
  if (kind == AdviceKind.Around) {
    extraArgument=makeFinalArgument("String_Node_Str",AjTypeConstants.getAroundClosureType());
  }
  int addedArguments=3;
  if (extraArgument != null) {
    addedArguments+=1;
  }
  arguments=extendArgumentsLength(arguments,addedArguments);
  int index=baseArgumentCount;
  if (extraArgument != null) {
    arguments[index++]=extraArgument;
  }
  arguments[index++]=makeFinalArgument("String_Node_Str",AjTypeConstants.getJoinPointStaticPartType());
  arguments[index++]=makeFinalArgument("String_Node_Str",AjTypeConstants.getJoinPointType());
  arguments[index++]=makeFinalArgument("String_Node_Str",AjTypeConstants.getJoinPointStaticPartType());
  if (pointcutDesignator.isError()) {
    this.ignoreFurtherInvestigation=true;
  }
  pointcutDesignator.postParse(typeDec,this);
}

Fixed version (ground truth):
public void postParse(TypeDeclaration typeDec){
  int adviceSequenceNumberInType=((AspectDeclaration)typeDec).adviceCounter++;
  StringBuffer stringifiedPointcut=new StringBuffer(30);
  pointcutDesignator.print(0,stringifiedPointcut);
  this.selector=NameMangler.adviceName(EclipseFactory.fromBinding(typeDec.binding),kind,adviceSequenceNumberInType,stringifiedPointcut.toString().hashCode()).toCharArray();
  if (arguments != null) {
    baseArgumentCount=arguments.length;
  }
  if (kind == AdviceKind.Around) {
    extraArgument=makeFinalArgument("String_Node_Str",AjTypeConstants.getAroundClosureType());
  }
  int addedArguments=3;
  if (extraArgument != null) {
    addedArguments+=1;
  }
  arguments=extendArgumentsLength(arguments,addedArguments);
  int index=baseArgumentCount;
  if (extraArgument != null) {
    arguments[index++]=extraArgument;
  }
  arguments[index++]=makeFinalArgument("String_Node_Str",AjTypeConstants.getJoinPointStaticPartType());
  arguments[index++]=makeFinalArgument("String_Node_Str",AjTypeConstants.getJoinPointType());
  arguments[index++]=makeFinalArgument("String_Node_Str",AjTypeConstants.getJoinPointStaticPartType());
  if (pointcutDesignator.isError()) {
    this.ignoreFurtherInvestigation=true;
  }
  pointcutDesignator.postParse(typeDec,this);
}
Program: 9529
Project: 9529
Buggy source:
public static Test suite(){
  TestSuite suite=new TestSuite(BcweaverModuleTests.class.getName());
  suite.addTest(org.aspectj.weaver.bcel.BcelTests.suite());
  suite.addTest(org.aspectj.weaver.BcweaverTests.suite());
  suite.addTest(org.aspectj.weaver.patterns.PatternsTests.suite());
  return suite;
}

Fixed version (ground truth):
public static Test suite(){
  TestSuite suite=new TestSuite(BcweaverModuleTests.class.getName());
  suite.addTest(org.aspectj.weaver.bcel.BcelTests.suite());
  suite.addTest(org.aspectj.weaver.BcweaverTests.suite());
  suite.addTest(org.aspectj.weaver.patterns.PatternsTests.suite());
  suite.addTestSuite(LocaleTest.class);
  return suite;
}
Program: 9530
Project: 9530
Buggy source:
/** 
 * Determines if the variables of this type could be assigned values of another type without casting.  This still allows for assignment conversion as per JLS 2ed 5.2.
 * @param other the other type
 * @param world the {@link World} in which the possible assignment should be checked.
 * @return true iff variables of this type could be assigned values of other without casting
 * @exception NullPointerException if other is null
 */
public boolean isAssignableFrom(TypeX other,World world){
  if (other.isPrimitive())   return false;
  return world.isAssignableFrom(this,other);
}

Fixed version (ground truth):
/** 
 * Determines if the variables of this type could be assigned values of another type without casting.  This still allows for assignment conversion as per JLS 2ed 5.2.  For object types, this means supertypeOrEqual(THIS, OTHER).
 * @param other the other type
 * @param world the {@link World} in which the possible assignment should be checked.
 * @return true iff variables of this type could be assigned values of other without casting
 * @exception NullPointerException if other is null
 */
public boolean isAssignableFrom(TypeX other,World world){
  if (other.isPrimitive())   return false;
  return world.isAssignableFrom(this,other);
}
Program: 9531
Project: 9531
Buggy source:
/** 
 * Determines if variables of this type could be assigned values of another with lots of help.  This is the same as isCoercableFrom, but java.lang.Object is convertable from and to all types. 
 * @param other the other type
 * @param world the {@link World} in which the possible assignment should be checked.
 * @return true iff variables of this type could be assigned values of other with possible conversion
 */
public final boolean isConvertableFrom(TypeX other,World world){
  if (this.equals(OBJECT) || other.equals(OBJECT))   return true;
  return this.isCoerceableFrom(other,world);
}

Fixed version (ground truth):
/** 
 * Determines if variables of this type could be assigned values of another with lots of help.   java.lang.Object is convertable from all types. A primitive type is convertable from X iff it's assignable from X. A reference type is convertable from X iff it's coerceable from X. In other words, X isConvertableFrom Y iff the compiler thinks that _some_ value of Y could be assignable to a variable of type X without loss of precision. 
 * @param other the other type
 * @param world the {@link World} in which the possible assignment should be checked.
 * @return true iff variables of this type could be assigned values of other with possible conversion
 */
public final boolean isConvertableFrom(TypeX other,World world){
  if (this.equals(OBJECT))   return true;
  if (this.isPrimitive() || other.isPrimitive())   return this.isAssignableFrom(other,world);
  return this.isCoerceableFrom(other,world);
}
Program: 9532
Project: 9532
Buggy source:
/** 
 * Run without throwing exceptions but optionally using System.exit(..). This sets up a message handler which emits messages immediately, so report(boolean, IMessageHandler) only reports total number of errors or warnings.
 * @param args the String[] command line for the compiler
 * @param useSystemExit if true, use System.exit(int) to completeunless one of the args is -noExit.  and signal result (0 no exceptions/error, <0 exceptions, >0 compiler errors).
 */
public void runMain(String[] args,boolean useSystemExit){
  boolean verbose=(-1 != ("String_Node_Str" + LangUtil.arrayAsList(args)).indexOf("String_Node_Str"));
  IMessageHolder holder=clientHolder;
  if (null == holder) {
    holder=ourHandler;
    if (verbose) {
      ourHandler.setInterceptor(MessagePrinter.VERBOSE);
    }
 else {
      ourHandler.ignore(IMessage.INFO);
      ourHandler.setInterceptor(MessagePrinter.TERSE);
    }
  }
  run(args,holder);
  boolean skipExit=false;
  if (useSystemExit && !LangUtil.isEmpty(args)) {
    for (int i=0; i < args.length; i++) {
      if ("String_Node_Str".equals(args[i])) {
        skipExit=true;
        break;
      }
    }
  }
  if (useSystemExit && !skipExit) {
    systemExit(holder);
  }
}

Fixed version (ground truth):
/** 
 * Run without throwing exceptions but optionally using System.exit(..). This sets up a message handler which emits messages immediately, so report(boolean, IMessageHandler) only reports total number of errors or warnings.
 * @param args the String[] command line for the compiler
 * @param useSystemExit if true, use System.exit(int) to completeunless one of the args is -noExit.  and signal result (0 no exceptions/error, <0 exceptions, >0 compiler errors).
 */
public void runMain(String[] args,boolean useSystemExit){
  boolean verbose=(-1 != ("String_Node_Str" + LangUtil.arrayAsList(args)).indexOf("String_Node_Str"));
  IMessageHolder holder=clientHolder;
  if (null == holder) {
    holder=ourHandler;
    if (verbose) {
      ourHandler.setInterceptor(MessagePrinter.VERBOSE);
    }
 else {
      ourHandler.ignore(IMessage.INFO);
      ourHandler.setInterceptor(MessagePrinter.TERSE);
    }
  }
  try {
    run(args,holder);
  }
 catch (  OutOfMemoryError outOfMemory) {
    IMessage outOfMemoryMessage=new Message(OUT_OF_MEMORY_MSG,null,true);
    holder.handleMessage(outOfMemoryMessage);
    systemExit(holder);
  }
  boolean skipExit=false;
  if (useSystemExit && !LangUtil.isEmpty(args)) {
    for (int i=0; i < args.length; i++) {
      if ("String_Node_Str".equals(args[i])) {
        skipExit=true;
        break;
      }
    }
  }
  if (useSystemExit && !skipExit) {
    systemExit(holder);
  }
}
Program: 9533
Project: 9533
Buggy source:
public void resolveStatements(){
  if (!Modifier.isAbstract(declaredModifiers))   super.resolveStatements();
  if (Modifier.isStatic(declaredModifiers)) {
    if (onTypeBinding.isInterface()) {
      scope.problemReporter().signalError(sourceStart,sourceEnd,"String_Node_Str");
    }
  }
}

Fixed version (ground truth):
public void resolveStatements(){
  if ((modifiers & AccSemicolonBody) != 0) {
    if ((declaredModifiers & AccAbstract) == 0)     scope.problemReporter().methodNeedingAbstractModifier(this);
  }
 else {
    if (((declaredModifiers & AccAbstract) != 0))     scope.problemReporter().methodNeedingNoBody(this);
  }
  if (!Modifier.isAbstract(declaredModifiers))   super.resolveStatements();
  if (Modifier.isStatic(declaredModifiers)) {
    if (onTypeBinding.isInterface()) {
      scope.problemReporter().signalError(sourceStart,sourceEnd,"String_Node_Str");
    }
  }
}
Program: 9535
Project: 9535
Buggy source:
private LazyMethodGen makeMethodGen(LazyClassGen gen,ResolvedMember member){
  LazyMethodGen ret=new LazyMethodGen(member.getModifiers(),BcelWorld.makeBcelType(member.getReturnType()),member.getName(),BcelWorld.makeBcelTypes(member.getParameterTypes()),TypeX.getNames(member.getExceptions()),gen);
  ret.makeSynthetic();
  return ret;
}

Fixed version (ground truth):
private LazyMethodGen makeMethodGen(LazyClassGen gen,ResolvedMember member){
  LazyMethodGen ret=new LazyMethodGen(member.getModifiers(),BcelWorld.makeBcelType(member.getReturnType()),member.getName(),BcelWorld.makeBcelTypes(member.getParameterTypes()),TypeX.getNames(member.getExceptions()),gen);
  return ret;
}
Program: 9536
Project: 9536
Buggy source:
private LazyClassGen weave(UnwovenClassFile classFile,BcelObjectType classType,boolean dump) throws IOException {
  if (classType.isSynthetic()) {
    if (dump)     dumpUnchanged(classFile);
    return null;
  }
  JavaClass javaClass=classType.getJavaClass();
  List shadowMungers=fastMatch(shadowMungerList,classType.getResolvedTypeX());
  List typeMungers=classType.getResolvedTypeX().getInterTypeMungers();
  LazyClassGen clazz=null;
  if (shadowMungers.size() > 0 || typeMungers.size() > 0 || classType.isAspect()) {
    clazz=classType.getLazyClassGen();
    try {
      boolean isChanged=BcelClassWeaver.weave(world,clazz,shadowMungers,typeMungers);
      if (isChanged) {
        if (dump)         dump(classFile,clazz);
        return clazz;
      }
    }
 catch (    RuntimeException re) {
      System.err.println("String_Node_Str");
      clazz.print(System.err);
      throw re;
    }
catch (    Error re) {
      System.err.println("String_Node_Str");
      clazz.print(System.err);
      throw re;
    }
  }
  if (dump) {
    dumpUnchanged(classFile);
    return clazz;
  }
 else {
    return null;
  }
}

Fixed version (ground truth):
private LazyClassGen weave(UnwovenClassFile classFile,BcelObjectType classType,boolean dump) throws IOException {
  if (classType.isSynthetic()) {
    if (dump)     dumpUnchanged(classFile);
    return null;
  }
  JavaClass javaClass=classType.getJavaClass();
  List shadowMungers=fastMatch(shadowMungerList,classType.getResolvedTypeX());
  List typeMungers=classType.getResolvedTypeX().getInterTypeMungers();
  classType.getResolvedTypeX().checkInterTypeMungers();
  LazyClassGen clazz=null;
  if (shadowMungers.size() > 0 || typeMungers.size() > 0 || classType.isAspect()) {
    clazz=classType.getLazyClassGen();
    try {
      boolean isChanged=BcelClassWeaver.weave(world,clazz,shadowMungers,typeMungers);
      if (isChanged) {
        if (dump)         dump(classFile,clazz);
        return clazz;
      }
    }
 catch (    RuntimeException re) {
      System.err.println("String_Node_Str");
      clazz.print(System.err);
      throw re;
    }
catch (    Error re) {
      System.err.println("String_Node_Str");
      clazz.print(System.err);
      throw re;
    }
  }
  if (dump) {
    dumpUnchanged(classFile);
    return clazz;
  }
 else {
    return null;
  }
}
Program: 9537
Project: 9537
Buggy source:
public void unhandledException(TypeBinding exceptionType,ASTNode location){
  if (!world.getWorld().getDeclareSoft().isEmpty()) {
    Shadow callSite=world.makeShadow(location,referenceContext);
    Shadow enclosingExec=world.makeShadow(referenceContext);
    for (Iterator i=world.getWorld().getDeclareSoft().iterator(); i.hasNext(); ) {
      DeclareSoft d=(DeclareSoft)i.next();
      ResolvedTypeX throwException=world.fromEclipse((ReferenceBinding)exceptionType);
      FuzzyBoolean isExceptionTypeOrSubtype=d.getException().matchesInstanceof(throwException);
      if (!isExceptionTypeOrSubtype.alwaysTrue())       continue;
      if (callSite != null) {
        FuzzyBoolean match=d.getPointcut().match(callSite);
        if (match.alwaysTrue()) {
          return;
        }
 else         if (!match.alwaysFalse()) {
        }
      }
      if (enclosingExec != null) {
        FuzzyBoolean match=d.getPointcut().match(enclosingExec);
        if (match.alwaysTrue()) {
          return;
        }
 else         if (!match.alwaysFalse()) {
        }
      }
    }
  }
  if (location instanceof Proceed) {
    return;
  }
  super.unhandledException(exceptionType,location);
}

Fixed version (ground truth):
public void unhandledException(TypeBinding exceptionType,ASTNode location){
  if (!factory.getWorld().getDeclareSoft().isEmpty()) {
    Shadow callSite=factory.makeShadow(location,referenceContext);
    Shadow enclosingExec=factory.makeShadow(referenceContext);
    for (Iterator i=factory.getWorld().getDeclareSoft().iterator(); i.hasNext(); ) {
      DeclareSoft d=(DeclareSoft)i.next();
      ResolvedTypeX throwException=factory.fromEclipse((ReferenceBinding)exceptionType);
      FuzzyBoolean isExceptionTypeOrSubtype=d.getException().matchesInstanceof(throwException);
      if (!isExceptionTypeOrSubtype.alwaysTrue())       continue;
      if (callSite != null) {
        FuzzyBoolean match=d.getPointcut().match(callSite);
        if (match.alwaysTrue()) {
          return;
        }
 else         if (!match.alwaysFalse()) {
        }
      }
      if (enclosingExec != null) {
        FuzzyBoolean match=d.getPointcut().match(enclosingExec);
        if (match.alwaysTrue()) {
          return;
        }
 else         if (!match.alwaysFalse()) {
        }
      }
    }
  }
  if (location instanceof Proceed) {
    return;
  }
  super.unhandledException(exceptionType,location);
}
Program: 9538
Project: 9538
Buggy source:
public void abstractMethodMustBeImplemented(SourceTypeBinding type,MethodBinding abstractMethod){
  if (isPointcutDeclaration(abstractMethod)) {
    return;
  }
  if (CharOperation.prefixEquals("String_Node_Str".toCharArray(),abstractMethod.selector)) {
    return;
  }
  ResolvedTypeX onTypeX=world.fromEclipse(type);
  for (Iterator i=onTypeX.getInterTypeMungers().iterator(); i.hasNext(); ) {
    ConcreteTypeMunger m=(ConcreteTypeMunger)i.next();
    if (m.matches(onTypeX)) {
      ResolvedMember sig=m.getSignature();
      if (Modifier.isPublic(sig.getModifiers()) && !Modifier.isAbstract(sig.getModifiers())) {
        if (ResolvedTypeX.matches(sig,world.makeResolvedMember(abstractMethod))) {
          return;
        }
      }
    }
  }
  super.abstractMethodMustBeImplemented(type,abstractMethod);
}

Fixed version (ground truth):
public void abstractMethodMustBeImplemented(SourceTypeBinding type,MethodBinding abstractMethod){
  if (isPointcutDeclaration(abstractMethod)) {
    return;
  }
  if (CharOperation.prefixEquals("String_Node_Str".toCharArray(),abstractMethod.selector)) {
    return;
  }
  ResolvedTypeX onTypeX=factory.fromEclipse(type);
  for (Iterator i=onTypeX.getInterTypeMungers().iterator(); i.hasNext(); ) {
    ConcreteTypeMunger m=(ConcreteTypeMunger)i.next();
    if (m.matches(onTypeX)) {
      ResolvedMember sig=m.getSignature();
      if (!Modifier.isAbstract(sig.getModifiers())) {
        if (ResolvedTypeX.matches(AjcMemberMaker.interMethod(sig,m.getAspectType(),sig.getDeclaringType().isInterface(factory.getWorld())),EclipseFactory.makeResolvedMember(abstractMethod))) {
          return;
        }
      }
    }
  }
  super.abstractMethodMustBeImplemented(type,abstractMethod);
}
Program: 9540
Project: 9540
Buggy source:
protected void consumeAspectHeaderName(boolean isPrivileged){
  AspectDeclaration aspectDecl=new AspectDeclaration(this.compilationUnit.compilationResult);
  println("String_Node_Str");
  this.display();
  long pos=identifierPositionStack[identifierPtr];
  aspectDecl.sourceEnd=(int)pos;
  aspectDecl.sourceStart=(int)(pos >>> 32);
  aspectDecl.name=identifierStack[identifierPtr--];
  identifierLengthPtr--;
  eatIdentifier();
  if (isPrivileged) {
    pos=eatIdentifier();
    int end=(int)pos;
    int start=(int)(pos >>> 32);
    aspectDecl.isPrivileged=true;
  }
  aspectDecl.modifiersSourceStart=intStack[intPtr--];
  aspectDecl.modifiers=intStack[intPtr--];
  if (aspectDecl.modifiersSourceStart >= 0) {
    aspectDecl.declarationSourceStart=aspectDecl.modifiersSourceStart;
  }
  println("String_Node_Str" + aspectDecl.modifiers);
  aspectDecl.bodyStart=aspectDecl.sourceEnd + 1;
  pushOnAstStack(aspectDecl);
  listLength=0;
  if (currentElement != null) {
    lastCheckPoint=aspectDecl.bodyStart;
    currentElement=currentElement.add(aspectDecl,0);
    lastIgnoredToken=-1;
  }
  this.display();
}

Fixed version (ground truth):
protected void consumeAspectHeaderName(boolean isPrivileged){
  AspectDeclaration aspectDecl=new AspectDeclaration(this.compilationUnit.compilationResult);
  println("String_Node_Str");
  this.display();
  long pos=identifierPositionStack[identifierPtr];
  aspectDecl.sourceEnd=(int)pos;
  aspectDecl.sourceStart=(int)(pos >>> 32);
  aspectDecl.name=identifierStack[identifierPtr--];
  identifierLengthPtr--;
  eatIdentifier();
  if (isPrivileged) {
    pos=eatIdentifier();
    int end=(int)pos;
    int start=(int)(pos >>> 32);
    aspectDecl.isPrivileged=true;
  }
  aspectDecl.modifiersSourceStart=intStack[intPtr--];
  aspectDecl.modifiers=intStack[intPtr--];
  if (isPrivileged) {
    aspectDecl.modifiersSourceStart=intStack[intPtr--];
    aspectDecl.modifiers|=intStack[intPtr--];
  }
  if (aspectDecl.modifiersSourceStart >= 0) {
    aspectDecl.declarationSourceStart=aspectDecl.modifiersSourceStart;
  }
  println("String_Node_Str" + aspectDecl.modifiers);
  aspectDecl.bodyStart=aspectDecl.sourceEnd + 1;
  pushOnAstStack(aspectDecl);
  listLength=0;
  if (currentElement != null) {
    lastCheckPoint=aspectDecl.bodyStart;
    currentElement=currentElement.add(aspectDecl,0);
    lastIgnoredToken=-1;
  }
  this.display();
}
Program: 9541
Project: 9541
Buggy source:
/** 
 * Create a message, handling null values for message and kind if thrown is not null.
 * @param message the String used as the underlying message
 * @param kind the IMessage.Kind of message - not null
 * @param thrown the Throwable, if any, associated with this message
 * @param sourceLocation the ISourceLocation, if any, associated with this message
 * @throws IllegalArgumentException if message is null andthrown is null or has a null message, or if kind is null and thrown is null.
 */
public Message(String message,IMessage.Kind kind,Throwable thrown,ISourceLocation sourceLocation){
  this.message=message;
  this.kind=kind;
  this.thrown=thrown;
  this.sourceLocation=sourceLocation;
  this.details="String_Node_Str";
  if (null == message) {
    if (null != thrown) {
      message=thrown.getMessage();
    }
    if (null == message) {
      throw new IllegalArgumentException("String_Node_Str");
    }
  }
  if (null == kind) {
    throw new IllegalArgumentException("String_Node_Str");
  }
}

Fixed version (ground truth):
/** 
 * Create a message, handling null values for message and kind if thrown is not null.
 * @param message the String used as the underlying message
 * @param kind the IMessage.Kind of message - not null
 * @param thrown the Throwable, if any, associated with this message
 * @param sourceLocation the ISourceLocation, if any, associated with this message
 * @throws IllegalArgumentException if message is null andthrown is null or has a null message, or if kind is null and thrown is null.
 */
public Message(String message,IMessage.Kind kind,Throwable thrown,ISourceLocation sourceLocation){
  this(message,"String_Node_Str",kind,sourceLocation,thrown,null);
}
Program: 9542
Project: 9542
Buggy source:
public String toString(){
  return Message.renderToString(this);
}

Fixed version (ground truth):
public String toString(){
  return MessageUtil.renderMessage(this,false);
}
Program: 9543
Project: 9543
Buggy source:
/** 
 * This renders IMessage as String, ignoring empty elements and eliding any thrown.
 * @return "((IMessage) null)" if null or String rendering otherwise,including everything (esp. throwable stack trace)
 * @see renderSourceLocation(ISourceLocation loc)
 */
public static String renderMessage(IMessage message,boolean elide){
  if (null == message) {
    return "String_Node_Str";
  }
  StringBuffer result=new StringBuffer();
  result.append(message.getKind().toString());
  result.append("String_Node_Str");
  String messageString=message.getMessage();
  if (!LangUtil.isEmpty(messageString)) {
    result.append(messageString);
    result.append("String_Node_Str");
  }
  ISourceLocation loc=message.getSourceLocation();
  if ((null != loc) && (loc != ISourceLocation.EMPTY)) {
    result.append("String_Node_Str" + renderSourceLocation(loc));
  }
  Throwable thrown=message.getThrown();
  if (null != thrown) {
    result.append("String_Node_Str" + LangUtil.renderExceptionShort(thrown));
    result.append("String_Node_Str" + LangUtil.renderException(thrown,elide));
  }
  return result.toString();
}

Fixed version (ground truth):
/** 
 * This renders IMessage as String, ignoring empty elements and eliding any thrown.
 * @return "((IMessage) null)" if null or String rendering otherwise,including everything (esp. throwable stack trace)
 * @see renderSourceLocation(ISourceLocation loc)
 */
public static String renderMessage(IMessage message,boolean elide){
  if (null == message) {
    return "String_Node_Str";
  }
  ISourceLocation loc=message.getSourceLocation();
  String locString=(null == loc ? "String_Node_Str" : "String_Node_Str" + loc);
  String result=message.getKind() + locString + "String_Node_Str"+ message.getMessage();
  Throwable thrown=message.getThrown();
  if (thrown != null) {
    result+="String_Node_Str" + LangUtil.renderExceptionShort(thrown);
    result+="String_Node_Str" + LangUtil.renderException(thrown,elide);
  }
  if (message.getExtraSourceLocations().isEmpty()) {
    return result;
  }
 else {
    return addExtraSourceLocations(message,result);
  }
}
Program: 9544
Project: 9544
Buggy source:
/** 
 * @return String {context\n}{file:}line{:column} 
 */
public String toString(){
  StringBuffer sb=new StringBuffer();
  if (null != context) {
    sb.append(context);
    sb.append(LangUtil.EOL);
  }
  if (sourceFile != ISourceLocation.NO_FILE) {
    sb.append(sourceFile.getPath());
    sb.append("String_Node_Str");
  }
  sb.append("String_Node_Str" + startLine + "String_Node_Str"+ endLine);
  if (!noColumn) {
    sb.append("String_Node_Str" + column);
  }
  return sb.toString();
}

Fixed version (ground truth):
/** 
 * @return String {context\n}{file:}line{:column} 
 */
public String toString(){
  StringBuffer sb=new StringBuffer();
  if (null != context) {
    sb.append(context);
    sb.append(LangUtil.EOL);
  }
  if (sourceFile != ISourceLocation.NO_FILE) {
    sb.append(sourceFile.getPath());
    sb.append("String_Node_Str");
  }
  sb.append(startLine);
  if (!noColumn) {
    sb.append("String_Node_Str" + column);
  }
  return sb.toString();
}
Program: 9545
Project: 9545
Buggy source:
/** 
 * Render message differently. If abort, then prefix stack trace with feedback request. If the actual message is empty, then use toString on the whole. Prefix message part with file:line; If it has context, suffix message with context.
 * @param message the IMessage to render
 * @return String rendering IMessage (never null)
 */
protected String render(IMessage message){
  IMessage.Kind kind=message.getKind();
  StringBuffer sb=new StringBuffer();
  String text=message.getMessage();
  if (text.equals(AbortException.NO_MESSAGE_TEXT)) {
    text=null;
  }
  boolean toString=(LangUtil.isEmpty(text));
  if (toString) {
    text=message.toString();
  }
  ISourceLocation loc=message.getSourceLocation();
  String context=null;
  if (null != loc) {
    File file=loc.getSourceFile();
    if (null != file) {
      String name=file.getName();
      if (!toString || (-1 == text.indexOf(name))) {
        sb.append(FileUtil.getBestPath(file));
        sb.append("String_Node_Str" + loc.getLine());
        int col=loc.getColumn();
        if (0 < col) {
          sb.append("String_Node_Str" + col);
        }
        sb.append("String_Node_Str");
      }
    }
    context=loc.getContext();
  }
  sb.append(text);
  if (null != context) {
    sb.append(LangUtil.EOL);
    sb.append(context);
  }
  Throwable thrown=message.getThrown();
  if (null != thrown) {
    sb.append(LangUtil.EOL);
    sb.append(Main.renderExceptionForUser(thrown));
  }
  return sb.toString();
}

Fixed version (ground truth):
/** 
 * Render message differently. If abort, then prefix stack trace with feedback request. If the actual message is empty, then use toString on the whole. Prefix message part with file:line; If it has context, suffix message with context.
 * @param message the IMessage to render
 * @return String rendering IMessage (never null)
 */
protected String render(IMessage message){
  IMessage.Kind kind=message.getKind();
  StringBuffer sb=new StringBuffer();
  String text=message.getMessage();
  if (text.equals(AbortException.NO_MESSAGE_TEXT)) {
    text=null;
  }
  boolean toString=(LangUtil.isEmpty(text));
  if (toString) {
    text=message.toString();
  }
  ISourceLocation loc=message.getSourceLocation();
  String context=null;
  if (null != loc) {
    File file=loc.getSourceFile();
    if (null != file) {
      String name=file.getName();
      if (!toString || (-1 == text.indexOf(name))) {
        sb.append(FileUtil.getBestPath(file));
        sb.append("String_Node_Str" + loc.getLine());
        int col=loc.getColumn();
        if (0 < col) {
          sb.append("String_Node_Str" + col);
        }
        sb.append("String_Node_Str");
      }
    }
    context=loc.getContext();
  }
  sb.append(text);
  if (null != context) {
    sb.append(LangUtil.EOL);
    sb.append(context);
  }
  Throwable thrown=message.getThrown();
  if (null != thrown) {
    sb.append(LangUtil.EOL);
    sb.append(Main.renderExceptionForUser(thrown));
  }
  if (message.getExtraSourceLocations().isEmpty()) {
    return sb.toString();
  }
 else {
    return MessageUtil.addExtraSourceLocations(message,sb.toString());
  }
}
Program: 9546
Project: 9546
Buggy source:
void addFiles(File dir,FileFilter filter){
  if (dir == null)   dir=new File(System.getProperty("String_Node_Str"));
  if (!dir.isDirectory()) {
    showError("String_Node_Str" + dir.getPath());
  }
  File[] files=dir.listFiles(filter);
  if (files.length == 0) {
    showWarning("String_Node_Str" + dir);
  }
  for (int i=0; i < files.length; i++) {
    addFile(files[i]);
  }
}

Fixed version (ground truth):
void addFiles(File dir,FileFilter filter){
  if (dir == null)   dir=new File(System.getProperty("String_Node_Str"));
  if (!dir.isDirectory()) {
    showError("String_Node_Str" + dir.getPath());
  }
 else {
    File[] files=dir.listFiles(filter);
    if (files.length == 0) {
      showWarning("String_Node_Str" + dir);
    }
    for (int i=0; i < files.length; i++) {
      addFile(files[i]);
    }
  }
}
Program: 9547
Project: 9547
Buggy source:
public void resolve(){
  if (binding == null) {
    ignoreFurtherInvestigation=true;
    return;
  }
  if (concreteName != null)   concreteName.checkPointcutDeclarations();
  super.resolve();
}

Fixed version (ground truth):
public void resolve(){
  if (binding == null) {
    ignoreFurtherInvestigation=true;
    return;
  }
  super.resolve();
}
Program: 9548
Project: 9548
Buggy source:
private void resolvePointcutDeclarations(ClassScope s){
  TypeDeclaration dec=s.referenceContext;
  SourceTypeBinding sourceType=s.referenceContext.binding;
  AbstractMethodDeclaration[] methods=dec.methods;
  boolean initializedMethods=false;
  if (methods != null) {
    for (int i=0; i < methods.length; i++) {
      if (methods[i] instanceof PointcutDeclaration) {
        if (!initializedMethods) {
          sourceType.methods();
          initializedMethods=true;
        }
        ((PointcutDeclaration)methods[i]).resolvePointcut(s);
      }
    }
  }
  ReferenceBinding[] memberTypes=sourceType.memberTypes;
  for (int i=0, length=memberTypes.length; i < length; i++) {
    resolvePointcutDeclarations(((SourceTypeBinding)memberTypes[i]).scope);
  }
}

Fixed version (ground truth):
private void resolvePointcutDeclarations(ClassScope s){
  TypeDeclaration dec=s.referenceContext;
  SourceTypeBinding sourceType=s.referenceContext.binding;
  boolean hasPointcuts=false;
  AbstractMethodDeclaration[] methods=dec.methods;
  boolean initializedMethods=false;
  if (methods != null) {
    for (int i=0; i < methods.length; i++) {
      if (methods[i] instanceof PointcutDeclaration) {
        hasPointcuts=true;
        if (!initializedMethods) {
          sourceType.methods();
          initializedMethods=true;
        }
        ((PointcutDeclaration)methods[i]).resolvePointcut(s);
      }
    }
  }
  if (hasPointcuts || dec instanceof AspectDeclaration) {
    ResolvedTypeX.Name name=(ResolvedTypeX.Name)factory.fromEclipse(sourceType);
    EclipseSourceType eclipseSourceType=(EclipseSourceType)name.getDelegate();
    eclipseSourceType.checkPointcutDeclarations();
  }
  ReferenceBinding[] memberTypes=sourceType.memberTypes;
  for (int i=0, length=memberTypes.length; i < length; i++) {
    resolvePointcutDeclarations(((SourceTypeBinding)memberTypes[i]).scope);
  }
}