nus-yam/ex-repair huggingface dataset:
Program: 9369
Project: 9369
Buggy source:
private void reportWeavingMessage(ShadowMunger munger){
  Advice advice=(Advice)munger;
  AdviceKind aKind=advice.getKind();
  if (aKind == null || advice.getConcreteAspect() == null) {
    return;
  }
  if (!(aKind.equals(AdviceKind.Before) || aKind.equals(AdviceKind.After) || aKind.equals(AdviceKind.AfterReturning)|| aKind.equals(AdviceKind.AfterThrowing)|| aKind.equals(AdviceKind.Around)|| aKind.equals(AdviceKind.Softener)))   return;
  String description=advice.getKind().toString();
  String advisedType=this.getEnclosingType().getName();
  String advisingType=advice.getConcreteAspect().getName();
  Message msg=null;
  if (advice.getKind().equals(AdviceKind.Softener)) {
    msg=WeaveMessage.constructWeavingMessage(WeaveMessage.WEAVEMESSAGE_SOFTENS,new String[]{advisedType,beautifyLocation(getSourceLocation()),advisingType,beautifyLocation(munger.getSourceLocation())});
  }
 else {
    boolean runtimeTest=((BcelAdvice)advice).hasDynamicTests();
    msg=WeaveMessage.constructWeavingMessage(WeaveMessage.WEAVEMESSAGE_ADVISES,new String[]{advisedType,beautifyLocation(getSourceLocation()),description,advisingType,beautifyLocation(munger.getSourceLocation()),(runtimeTest ? "String_Node_Str" : "String_Node_Str")});
  }
  getIWorld().getMessageHandler().handleMessage(msg);
}

Fixed version (ground truth):
private void reportWeavingMessage(ShadowMunger munger){
  Advice advice=(Advice)munger;
  AdviceKind aKind=advice.getKind();
  if (aKind == null || advice.getConcreteAspect() == null) {
    return;
  }
  if (!(aKind.equals(AdviceKind.Before) || aKind.equals(AdviceKind.After) || aKind.equals(AdviceKind.AfterReturning)|| aKind.equals(AdviceKind.AfterThrowing)|| aKind.equals(AdviceKind.Around)|| aKind.equals(AdviceKind.Softener)))   return;
  String description=advice.getKind().toString();
  String advisedType=this.getEnclosingType().getName();
  String advisingType=advice.getConcreteAspect().getName();
  Message msg=null;
  if (advice.getKind().equals(AdviceKind.Softener)) {
    msg=WeaveMessage.constructWeavingMessage(WeaveMessage.WEAVEMESSAGE_SOFTENS,new String[]{advisedType,beautifyLocation(getSourceLocation()),advisingType,beautifyLocation(munger.getSourceLocation())},advisedType,advisingType);
  }
 else {
    boolean runtimeTest=((BcelAdvice)advice).hasDynamicTests();
    msg=WeaveMessage.constructWeavingMessage(WeaveMessage.WEAVEMESSAGE_ADVISES,new String[]{advisedType,beautifyLocation(getSourceLocation()),description,advisingType,beautifyLocation(munger.getSourceLocation()),(runtimeTest ? "String_Node_Str" : "String_Node_Str")},advisedType,advisingType);
  }
  getIWorld().getMessageHandler().handleMessage(msg);
}
Program: 9371
Project: 9371
Buggy source:
private BcelObjectType makeBcelObjectType(ResolvedTypeX.Name resolvedTypeX,JavaClass jc,boolean exposedToWeaver){
  BcelObjectType ret=new BcelObjectType(resolvedTypeX,jc,exposedToWeaver);
  resolvedTypeX.setDelegate(ret);
  return ret;
}

Fixed version (ground truth):
protected BcelObjectType makeBcelObjectType(ResolvedTypeX.Name resolvedTypeX,JavaClass jc,boolean exposedToWeaver){
  BcelObjectType ret=new BcelObjectType(resolvedTypeX,jc,exposedToWeaver);
  resolvedTypeX.setDelegate(ret);
  return ret;
}
Program: 9372
Project: 9372
Buggy source:
public void addInterface(TypeX typeX,ISourceLocation sourceLocation){
  myGen.addInterface(typeX.getName());
  warnOnAddedInterface(typeX.getName(),sourceLocation);
}

Fixed version (ground truth):
public void addInterface(TypeX typeX,ISourceLocation sourceLocation){
  myGen.addInterface(typeX.getName());
  if (!typeX.equals(TypeX.SERIALIZABLE))   warnOnAddedInterface(typeX.getName(),sourceLocation);
}
Program: 9373
Project: 9373
Buggy source:
public void checkerMunger(IHierarchy model,Shadow shadow,Checker checker){
  if (shadow.getSourceLocation() == null || checker.getSourceLocation() == null)   return;
  String sourceHandle=ProgramElement.createHandleIdentifier(checker.getSourceLocation().getSourceFile(),checker.getSourceLocation().getLine(),checker.getSourceLocation().getColumn(),checker.getSourceLocation().getOffset());
  String targetHandle=ProgramElement.createHandleIdentifier(shadow.getSourceLocation().getSourceFile(),shadow.getSourceLocation().getLine(),shadow.getSourceLocation().getColumn(),shadow.getSourceLocation().getOffset());
  IRelationshipMap mapper=AsmManager.getDefault().getRelationshipMap();
  if (sourceHandle != null && targetHandle != null) {
    IRelationship foreward=mapper.get(sourceHandle,IRelationship.Kind.DECLARE,MATCHED_BY,false,true);
    foreward.addTarget(targetHandle);
    IRelationship back=mapper.get(targetHandle,IRelationship.Kind.DECLARE,MATCHES_DECLARE,false,true);
    if (back != null && back.getTargets() != null) {
      back.addTarget(sourceHandle);
    }
  }
}

Fixed version (ground truth):
public void checkerMunger(IHierarchy model,Shadow shadow,Checker checker){
  if (shadow.getSourceLocation() == null || checker.getSourceLocation() == null)   return;
  IProgramElement targetNode=getNode(AsmManager.getDefault().getHierarchy(),shadow);
  String sourceHandle=ProgramElement.createHandleIdentifier(checker.getSourceLocation().getSourceFile(),checker.getSourceLocation().getLine(),checker.getSourceLocation().getColumn(),checker.getSourceLocation().getOffset());
  String targetHandle=ProgramElement.createHandleIdentifier(shadow.getSourceLocation().getSourceFile(),shadow.getSourceLocation().getLine(),shadow.getSourceLocation().getColumn(),shadow.getSourceLocation().getOffset());
  IRelationshipMap mapper=AsmManager.getDefault().getRelationshipMap();
  if (sourceHandle != null && targetHandle != null) {
    IRelationship foreward=mapper.get(sourceHandle,IRelationship.Kind.DECLARE,MATCHED_BY,false,true);
    foreward.addTarget(targetHandle);
    IRelationship back=mapper.get(targetHandle,IRelationship.Kind.DECLARE,MATCHES_DECLARE,false,true);
    if (back != null && back.getTargets() != null) {
      back.addTarget(sourceHandle);
    }
  }
}
Program: 9376
Project: 9376
Buggy source:
public InputStream getInputStream() throws IOException {
  return new ByteArrayInputStream(source.getReferenceBytes());
}

Fixed version (ground truth):
public InputStream getInputStream() throws IOException {
  is=new ByteArrayInputStream(source.getReferenceBytes());
  return is;
}
Program: 9377
Project: 9377
Buggy source:
private JavaClass lookupJavaClass(ClassPathManager classPath,String name){
  if (classPath == null)   return null;
  try {
    ClassPathManager.ClassFile file=classPath.find(TypeX.forName(name));
    if (file == null)     return null;
    ClassParser parser=new ClassParser(file.getInputStream(),file.getPath());
    JavaClass jc=parser.parse();
    return jc;
  }
 catch (  IOException ioe) {
    return null;
  }
}

Fixed version (ground truth):
private JavaClass lookupJavaClass(ClassPathManager classPath,String name){
  if (classPath == null)   return null;
  try {
    ClassPathManager.ClassFile file=classPath.find(TypeX.forName(name));
    if (file == null)     return null;
    ClassParser parser=new ClassParser(file.getInputStream(),file.getPath());
    JavaClass jc=parser.parse();
    file.close();
    return jc;
  }
 catch (  IOException ioe) {
    return null;
  }
}
Program: 9378
Project: 9378
Buggy source:
public BcelWorld(ClassPathManager cpm,IMessageHandler handler,ICrossReferenceHandler xrefHandler){
  this.classPath=cpm;
  setMessageHandler(handler);
  setXRefHandler(xrefHandler);
}

Fixed version (ground truth):
public BcelWorld(ClassPathManager cpm,IMessageHandler handler,ICrossReferenceHandler xrefHandler){
  this.classPath=cpm;
  setMessageHandler(handler);
  setXRefHandler(xrefHandler);
  org.aspectj.apache.bcel.Repository.setRepository(this);
}
Program: 9379
Project: 9379
Buggy source:
public ZipEntryClassFile(ZipFile zipFile,ZipEntry entry){
  this.zipFile=zipFile;
  this.entry=entry;
}

Fixed version (ground truth):
public ZipEntryClassFile(ZipFileEntry zipFile,ZipEntry entry){
  this.zipFile=zipFile;
  this.entry=entry;
}
Program: 9380
Project: 9380
Buggy source:
public ClassFile find(String name){
  String key=name.replace('.','/') + "String_Node_Str";
  ZipEntry entry=zipFile.getEntry(key);
  if (entry != null)   return new ZipEntryClassFile(zipFile,entry);
 else   return null;
}

Fixed version (ground truth):
public ClassFile find(String name){
  ensureOpen();
  String key=name.replace('.','/') + "String_Node_Str";
  ZipEntry entry=zipFile.getEntry(key);
  if (entry != null)   return new ZipEntryClassFile(this,entry);
 else   return null;
}
Program: 9381
Project: 9381
Buggy source:
public String toString(){
  return zipFile.getName();
}

Fixed version (ground truth):
public String toString(){
  return file.getName();
}
Program: 9382
Project: 9382
Buggy source:
public List getAllClassFiles(){
  List ret=new ArrayList();
  for (Enumeration e=zipFile.entries(); e.hasMoreElements(); ) {
    ZipEntry entry=(ZipEntry)e.nextElement();
    String name=entry.getName();
    if (hasClassExtension(name))     ret.add(new ZipEntryClassFile(zipFile,entry));
  }
  return ret;
}

Fixed version (ground truth):
public List getAllClassFiles(){
  ensureOpen();
  List ret=new ArrayList();
  for (Enumeration e=zipFile.entries(); e.hasMoreElements(); ) {
    ZipEntry entry=(ZipEntry)e.nextElement();
    String name=entry.getName();
    if (hasClassExtension(name))     ret.add(new ZipEntryClassFile(this,entry));
  }
  return ret;
}
Program: 9383
Project: 9383
Buggy source:
public InputStream getInputStream() throws IOException {
  return zipFile.getInputStream(entry);
}

Fixed version (ground truth):
public InputStream getInputStream() throws IOException {
  is=zipFile.getZipFile().getInputStream(entry);
  return is;
}
Program: 9384
Project: 9384
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=factory.fromEclipse(type);
  for (Iterator i=onTypeX.getInterTypeMungersIncludingSupers().iterator(); i.hasNext(); ) {
    ConcreteTypeMunger m=(ConcreteTypeMunger)i.next();
    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);
}

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=null;
  if (!type.isAnonymousType()) {
    onTypeX=factory.fromEclipse(type);
  }
 else {
    onTypeX=factory.fromEclipse(type.superclass());
  }
  for (Iterator i=onTypeX.getInterTypeMungersIncludingSupers().iterator(); i.hasNext(); ) {
    ConcreteTypeMunger m=(ConcreteTypeMunger)i.next();
    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: 9385
Project: 9385
Buggy source:
public static List readAjAttributes(Attribute[] as,ISourceContext context){
  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)) {
        l.add(AjAttribute.read(name,u.getBytes(),context));
      }
    }
  }
  return l;
}

Fixed version (ground truth):
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;
}
Program: 9386
Project: 9386
Buggy source:
private void unpackAttributes(World world){
  Attribute[] attrs=field.getAttributes();
  List as=BcelAttributes.readAjAttributes(attrs,getSourceContext(world));
  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(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: 9387
Project: 9387
Buggy source:
private void unpackAjAttributes(World world){
  List as=BcelAttributes.readAjAttributes(method.getAttributes(),getSourceContext(world));
  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(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: 9389
Project: 9389
Buggy source:
private void writeBack(BcelWorld world){
  if (getConstantPoolGen().getSize() > Short.MAX_VALUE) {
    myGen=new ClassGen(myGen.getClassName(),myGen.getSuperclassName(),myGen.getFileName(),myGen.getAccessFlags(),myGen.getInterfaceNames());
    getWorld().showMessage(IMessage.ERROR,WeaverMessages.format(WeaverMessages.CLASS_TOO_BIG,this.getClassName()),new SourceLocation(new File(myGen.getFileName()),0),null);
    return;
  }
  if (myType != null && myType.getWeaverState() != null) {
    myGen.addAttribute(BcelAttributes.bcelAttribute(new AjAttribute.WeaverState(myType.getWeaverState()),getConstantPoolGen()));
  }
  addAjcInitializers();
  int len=methodGens.size();
  myGen.setMethods(new Method[0]);
  calculateSourceDebugExtensionOffsets();
  for (int i=0; i < len; i++) {
    LazyMethodGen gen=(LazyMethodGen)methodGens.get(i);
    if (isEmptyClinit(gen))     continue;
    myGen.addMethod(gen.getMethod());
  }
  if (inlinedFiles.size() != 0) {
    if (hasSourceDebugExtensionAttribute(myGen)) {
      world.showMessage(IMessage.WARNING,WeaverMessages.format(WeaverMessages.OVERWRITE_JSR45,getFileName()),null,null);
    }
    myGen.addAttribute(getSourceDebugExtensionAttribute());
  }
}

Fixed version (ground truth):
private void writeBack(BcelWorld world){
  if (getConstantPoolGen().getSize() > Short.MAX_VALUE) {
    myGen=new ClassGen(myGen.getClassName(),myGen.getSuperclassName(),myGen.getFileName(),myGen.getAccessFlags(),myGen.getInterfaceNames());
    getWorld().showMessage(IMessage.ERROR,WeaverMessages.format(WeaverMessages.CLASS_TOO_BIG,this.getClassName()),new SourceLocation(new File(myGen.getFileName()),0),null);
    return;
  }
  myGen.addAttribute(BcelAttributes.bcelAttribute(new AjAttribute.WeaverVersionInfo(),getConstantPoolGen()));
  if (myType != null && myType.getWeaverState() != null) {
    myGen.addAttribute(BcelAttributes.bcelAttribute(new AjAttribute.WeaverState(myType.getWeaverState()),getConstantPoolGen()));
  }
  addAjcInitializers();
  int len=methodGens.size();
  myGen.setMethods(new Method[0]);
  calculateSourceDebugExtensionOffsets();
  for (int i=0; i < len; i++) {
    LazyMethodGen gen=(LazyMethodGen)methodGens.get(i);
    if (isEmptyClinit(gen))     continue;
    myGen.addMethod(gen.getMethod());
  }
  if (inlinedFiles.size() != 0) {
    if (hasSourceDebugExtensionAttribute(myGen)) {
      world.showMessage(IMessage.WARNING,WeaverMessages.format(WeaverMessages.OVERWRITE_JSR45,getFileName()),null,null);
    }
    myGen.addAttribute(getSourceDebugExtensionAttribute());
  }
}
Program: 9390
Project: 9390
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);
  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(attributes,context,null);
  if (!as.isEmpty()) {
    out.println("String_Node_Str" + as.get(0));
  }
}
Program: 9391
Project: 9391
Buggy source:
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);
}

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);
    if ((callSite == null) && (enclosingExec.getKind() == Shadow.ConstructorExecution) && (location instanceof ExplicitConstructorCall)) {
      super.unhandledException(exceptionType,location);
      return;
    }
    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: 9392
Project: 9392
Buggy source:
Root(String s) throws IOException {
}

Fixed version (ground truth):
Root(String s){
}
Program: 9394
Project: 9394
Buggy source:
public MessageHolderChecker(int aborts,int fails,int errors,int warnings,int infos){
  this.aborts=aborts;
  this.fails=fails;
  this.errors=errors;
  this.warnings=warnings;
  this.infos=infos;
}

Fixed version (ground truth):
public MessageHolderChecker(int aborts,int fails,int errors,int warnings,int infos){
  this.aborts=aborts;
  this.fails=fails;
  this.errors=errors;
  this.warnings=warnings;
  this.infos=infos;
  this.weaveinfos=IGNORE;
}
Program: 9395
Project: 9395
Buggy source:
private void replaceEffectivelyStaticRef(MessageSend call){
  NameReference receiver=(NameReference)call.receiver;
  receiver.binding=thisJoinPointStaticPartDecLocal;
  receiver.codegenBinding=thisJoinPointStaticPartDecLocal;
  ReferenceBinding thisJoinPointStaticPartType=(ReferenceBinding)thisJoinPointStaticPartDec.type;
  receiver.receiverType=receiver.actualReceiverType=receiver.resolvedType=thisJoinPointStaticPartType;
  call.setActualReceiverType(thisJoinPointStaticPartType);
  AstUtil.replaceMethodBinding(call,getEquivalentStaticBinding(call.binding));
}

Fixed version (ground truth):
private void replaceEffectivelyStaticRef(MessageSend call){
  NameReference receiver=(NameReference)call.receiver;
  if (call.binding == null)   return;
  receiver.binding=thisJoinPointStaticPartDecLocal;
  receiver.codegenBinding=thisJoinPointStaticPartDecLocal;
  ReferenceBinding thisJoinPointStaticPartType=(ReferenceBinding)thisJoinPointStaticPartDec.type;
  receiver.receiverType=receiver.actualReceiverType=receiver.resolvedType=thisJoinPointStaticPartType;
  call.setActualReceiverType(thisJoinPointStaticPartType);
  AstUtil.replaceMethodBinding(call,getEquivalentStaticBinding(call.binding));
}
Program: 9396
Project: 9396
Buggy source:
public void saveContents() throws IOException {
  if (filePath != NO_FILE && filePath != "String_Node_Str" && editorPane.getText() != "String_Node_Str") {
    BufferedWriter writer=new BufferedWriter(new FileWriter(filePath));
    writer.write(editorPane.getText());
    writer.flush();
  }
}

Fixed version (ground truth):
public void saveContents() throws IOException {
  if (!filePath.equals(NO_FILE) && !filePath.equals("String_Node_Str") && !editorPane.getText().equals("String_Node_Str")) {
    BufferedWriter writer=new BufferedWriter(new FileWriter(filePath));
    writer.write(editorPane.getText());
    writer.close();
  }
}
Program: 9397
Project: 9397
Buggy source:
private String readFile(String filePath,int lineNumber){
  try {
    File file=new File(filePath);
    if (!file.exists()) {
      return "String_Node_Str" + filePath + "String_Node_Str";
    }
    BufferedReader reader=new BufferedReader(new FileReader(file));
    StringBuffer contents=new StringBuffer();
    String line=reader.readLine();
    int numLines=0;
    while (line != null) {
      numLines++;
      if (numLines < lineNumber) {
        currHighlightStart+=line.length() + 1;
      }
      if (numLines == lineNumber) {
        currHighlightEnd=currHighlightStart + line.length();
      }
      contents.append(line);
      contents.append('\n');
      line=reader.readLine();
    }
    return contents.toString();
  }
 catch (  IOException ioe) {
    return "String_Node_Str" + filePath + "String_Node_Str";
  }
}

Fixed version (ground truth):
private String readFile(String filePath,int lineNumber){
  try {
    File file=new File(filePath);
    if (!file.exists()) {
      return "String_Node_Str" + filePath + "String_Node_Str";
    }
    BufferedReader reader=new BufferedReader(new FileReader(file));
    StringBuffer contents=new StringBuffer();
    String line=reader.readLine();
    int numLines=0;
    while (line != null) {
      numLines++;
      if (numLines < lineNumber) {
        currHighlightStart+=line.length() + 1;
      }
      if (numLines == lineNumber) {
        currHighlightEnd=currHighlightStart + line.length();
      }
      contents.append(line);
      contents.append('\n');
      line=reader.readLine();
    }
    reader.close();
    return contents.toString();
  }
 catch (  IOException ioe) {
    return "String_Node_Str" + filePath + "String_Node_Str";
  }
}
Program: 9399
Project: 9399
Buggy source:
/** 
 * Reads the entries of a configuration file.
 */
public List readConfigFile(String filePath){
  try {
    File configFile=new File(filePath);
    if (!configFile.exists()) {
      Ajde.getDefault().getErrorHandler().handleWarning("String_Node_Str" + filePath + "String_Node_Str");
    }
    List fileContents=new ArrayList();
    BufferedReader reader=new BufferedReader(new FileReader(configFile));
    String line=reader.readLine();
    while (line != null) {
      fileContents.add(line.replace('\\','/'));
      line=reader.readLine();
    }
    return fileContents;
  }
 catch (  IOException ioe) {
    Ajde.getDefault().getErrorHandler().handleError("String_Node_Str",ioe);
  }
  return null;
}

Fixed version (ground truth):
/** 
 * Reads the entries of a configuration file.
 */
public List readConfigFile(String filePath){
  try {
    File configFile=new File(filePath);
    if (!configFile.exists()) {
      Ajde.getDefault().getErrorHandler().handleWarning("String_Node_Str" + filePath + "String_Node_Str");
    }
    List fileContents=new ArrayList();
    BufferedReader reader=new BufferedReader(new FileReader(configFile));
    String line=reader.readLine();
    while (line != null) {
      fileContents.add(line.replace('\\','/'));
      line=reader.readLine();
    }
    reader.close();
    return fileContents;
  }
 catch (  IOException ioe) {
    Ajde.getDefault().getErrorHandler().handleError("String_Node_Str",ioe);
  }
  return null;
}
Program: 9400
Project: 9400
Buggy source:
private void writeFile(String contents,String filePath){
  try {
    FileOutputStream fos=new FileOutputStream(filePath,false);
    fos.write(contents.getBytes());
    fos.close();
  }
 catch (  IOException ioe) {
    Ajde.getDefault().getErrorHandler().handleError("String_Node_Str" + filePath,ioe);
  }
}

Fixed version (ground truth):
private void writeFile(String contents,String filePath){
  FileOutputStream fos=null;
  try {
    fos=new FileOutputStream(filePath,false);
    fos.write(contents.getBytes());
  }
 catch (  IOException ioe) {
    Ajde.getDefault().getErrorHandler().handleError("String_Node_Str" + filePath,ioe);
  }
 finally {
    if (fos != null)     try {
      fos.close();
    }
 catch (    IOException ioe) {
    }
  }
}
Program: 9401
Project: 9401
Buggy source:
public static List getPackagesInModel(){
  List packages=new ArrayList();
  IHierarchy model=Ajde.getDefault().getStructureModelManager().getHierarchy();
  if (model.equals(IHierarchy.NO_STRUCTURE)) {
    return null;
  }
 else {
    return getPackagesHelper((IProgramElement)model.getRoot(),IProgramElement.Kind.PACKAGE,null,packages);
  }
}

Fixed version (ground truth):
public static List getPackagesInModel(){
  List packages=new ArrayList();
  IHierarchy model=Ajde.getDefault().getStructureModelManager().getHierarchy();
  if (model.getRoot().equals(IHierarchy.NO_STRUCTURE)) {
    return null;
  }
 else {
    return getPackagesHelper((IProgramElement)model.getRoot(),IProgramElement.Kind.PACKAGE,null,packages);
  }
}
Program: 9402
Project: 9402
Buggy source:
private List findMatchesHelper(IProgramElement node,String pattern,IProgramElement.Kind kind,List matches){
  if (node != null && node.getName().indexOf(pattern) != -1) {
    if (kind == null || node.getKind().equals(kind)) {
      matches.add(node);
    }
  }
  for (Iterator it=node.getChildren().iterator(); it.hasNext(); ) {
    IProgramElement nextNode=(IProgramElement)it.next();
    if (nextNode instanceof IProgramElement) {
      findMatchesHelper((IProgramElement)nextNode,pattern,kind,matches);
    }
  }
  return matches;
}

Fixed version (ground truth):
private List findMatchesHelper(IProgramElement node,String pattern,IProgramElement.Kind kind,List matches){
  if (node != null && node.getName().indexOf(pattern) != -1) {
    if (kind == null || node.getKind().equals(kind)) {
      matches.add(node);
    }
  }
  if (node.getChildren() != null) {
    for (Iterator it=node.getChildren().iterator(); it.hasNext(); ) {
      IProgramElement nextNode=(IProgramElement)it.next();
      if (nextNode instanceof IProgramElement) {
        findMatchesHelper((IProgramElement)nextNode,pattern,kind,matches);
      }
    }
  }
  return matches;
}
Program: 9403
Project: 9403
Buggy source:
public void tearDown(){
  BcweaverTests.removeOutDir();
  outDir=null;
  outDirPath=null;
}

Fixed version (ground truth):
public void tearDown() throws Exception {
  super.tearDown();
  BcweaverTests.removeOutDir();
  outDir=null;
  outDirPath=null;
}
Program: 9405
Project: 9405
Buggy source:
/** 
 * If the classpath is not set, we use the environment's java.class.path, but remove the aspectjtools.jar entry from that list in order to prevent wierd bootstrap issues (refer to bug#39959).
 */
public List getClasspath(AjcConfigParser parser){
  List ret=new ArrayList();
  if (parser.bootclasspath == null) {
    addClasspath(System.getProperty("String_Node_Str","String_Node_Str"),ret);
  }
 else {
    addClasspath(parser.bootclasspath,ret);
  }
  String extdirs=parser.extdirs;
  if (extdirs == null) {
    extdirs=System.getProperty("String_Node_Str","String_Node_Str");
  }
  addExtDirs(extdirs,ret);
  if (parser.classpath == null) {
    addClasspath(System.getProperty("String_Node_Str","String_Node_Str"),ret);
    List fixedList=new ArrayList();
    for (Iterator it=ret.iterator(); it.hasNext(); ) {
      String entry=(String)it.next();
      if (!entry.endsWith("String_Node_Str")) {
        fixedList.add(entry);
      }
    }
    ret=fixedList;
  }
 else {
    addClasspath(parser.classpath,ret);
  }
  return ret;
}

Fixed version (ground truth):
/** 
 * If the classpath is not set, we use the environment's java.class.path, but remove the aspectjtools.jar entry from that list in order to prevent wierd bootstrap issues (refer to bug#39959).
 */
public List getClasspath(AjcConfigParser parser){
  List ret=new ArrayList();
  String extdirs=parser.extdirs;
  if (extdirs == null) {
    extdirs=System.getProperty("String_Node_Str","String_Node_Str");
  }
  addExtDirs(extdirs,ret);
  if (parser.classpath == null) {
    addClasspath(System.getProperty("String_Node_Str","String_Node_Str"),ret);
    List fixedList=new ArrayList();
    for (Iterator it=ret.iterator(); it.hasNext(); ) {
      String entry=(String)it.next();
      if (!entry.endsWith("String_Node_Str")) {
        fixedList.add(entry);
      }
    }
    ret=fixedList;
  }
 else {
    addClasspath(parser.classpath,ret);
  }
  return ret;
}
Program: 9407
Project: 9407
Buggy source:
/** 
 * This includes all entries from -bootclasspath, -extdirs, -classpath, 
 */
public List getClasspath(){
  return classpath;
}

Fixed version (ground truth):
/** 
 * This does not include -bootclasspath but includes -extdirs and -classpath
 */
public List getClasspath(){
  return classpath;
}
Program: 9408
Project: 9408
Buggy source:
/** 
 * @return List (String) classpath of injars, inpath, aspectpath entries, specified classpath (bootclasspath, extdirs, and  classpath), and output dir or jar
 */
public List getFullClasspath(){
  List full=new ArrayList();
  for (Iterator i=inJars.iterator(); i.hasNext(); ) {
    full.add(((File)i.next()).getAbsolutePath());
  }
  for (Iterator i=inPath.iterator(); i.hasNext(); ) {
    full.add(((File)i.next()).getAbsolutePath());
  }
  for (Iterator i=aspectpath.iterator(); i.hasNext(); ) {
    full.add(((File)i.next()).getAbsolutePath());
  }
  full.addAll(getClasspath());
  return full;
}

Fixed version (ground truth):
/** 
 * @return List (String) classpath of bootclasspath, injars, inpath, aspectpath entries, specified classpath (extdirs, and classpath), and output dir or jar
 */
public List getFullClasspath(){
  List full=new ArrayList();
  full.addAll(getBootclasspath());
  for (Iterator i=inJars.iterator(); i.hasNext(); ) {
    full.add(((File)i.next()).getAbsolutePath());
  }
  for (Iterator i=inPath.iterator(); i.hasNext(); ) {
    full.add(((File)i.next()).getAbsolutePath());
  }
  for (Iterator i=aspectpath.iterator(); i.hasNext(); ) {
    full.add(((File)i.next()).getAbsolutePath());
  }
  full.addAll(getClasspath());
  return full;
}
Program: 9410
Project: 9410
Buggy source:
String makeClasspathString(){
  if (buildConfig == null || buildConfig.getClasspath() == null)   return "String_Node_Str";
  StringBuffer buf=new StringBuffer();
  boolean first=true;
  for (Iterator it=buildConfig.getClasspath().iterator(); it.hasNext(); ) {
    if (first) {
      first=false;
    }
 else {
      buf.append(File.pathSeparator);
    }
    buf.append(it.next().toString());
  }
  return buf.toString();
}

Fixed version (ground truth):
String makeClasspathString(){
  if (buildConfig == null || buildConfig.getFullClasspath() == null)   return "String_Node_Str";
  StringBuffer buf=new StringBuffer();
  boolean first=true;
  for (Iterator it=buildConfig.getFullClasspath().iterator(); it.hasNext(); ) {
    if (first) {
      first=false;
    }
 else {
      buf.append(File.pathSeparator);
    }
    buf.append(it.next().toString());
  }
  return buf.toString();
}
Program: 9411
Project: 9411
Buggy source:
/** 
 * This will return null if aspectjrt.jar is present and has the correct version. Otherwise it will return a string message indicating the problem.
 */
public String checkRtJar(AjBuildConfig buildConfig){
  if (Version.text.equals(Version.DEVELOPMENT)) {
    return null;
  }
  if (buildConfig == null || buildConfig.getClasspath() == null)   return "String_Node_Str";
  for (Iterator it=buildConfig.getClasspath().iterator(); it.hasNext(); ) {
    File p=new File((String)it.next());
    if (p.isFile() && p.getName().equals("String_Node_Str")) {
      try {
        String version=null;
        Manifest manifest=new JarFile(p).getManifest();
        if (manifest == null) {
          return "String_Node_Str" + p.getAbsolutePath() + "String_Node_Str"+ Version.text;
        }
        Attributes attr=manifest.getAttributes("String_Node_Str");
        if (null != attr) {
          version=attr.getValue(Attributes.Name.IMPLEMENTATION_VERSION);
          if (null != version) {
            version=version.trim();
          }
        }
        if (Version.DEVELOPMENT.equals(version)) {
          return null;
        }
 else         if (!Version.text.equals(version)) {
          return "String_Node_Str" + p.getAbsolutePath() + "String_Node_Str"+ Version.text+ "String_Node_Str"+ version;
        }
      }
 catch (      IOException ioe) {
        return "String_Node_Str" + p.getAbsolutePath() + "String_Node_Str"+ ioe;
      }
      return null;
    }
 else {
    }
  }
  return "String_Node_Str" + makeClasspathString();
}

Fixed version (ground truth):
/** 
 * This will return null if aspectjrt.jar is present and has the correct version. Otherwise it will return a string message indicating the problem.
 */
public String checkRtJar(AjBuildConfig buildConfig){
  if (Version.text.equals(Version.DEVELOPMENT)) {
    return null;
  }
  if (buildConfig == null || buildConfig.getFullClasspath() == null)   return "String_Node_Str";
  for (Iterator it=buildConfig.getFullClasspath().iterator(); it.hasNext(); ) {
    File p=new File((String)it.next());
    if (p.isFile() && p.getName().equals("String_Node_Str")) {
      try {
        String version=null;
        Manifest manifest=new JarFile(p).getManifest();
        if (manifest == null) {
          return "String_Node_Str" + p.getAbsolutePath() + "String_Node_Str"+ Version.text;
        }
        Attributes attr=manifest.getAttributes("String_Node_Str");
        if (null != attr) {
          version=attr.getValue(Attributes.Name.IMPLEMENTATION_VERSION);
          if (null != version) {
            version=version.trim();
          }
        }
        if (Version.DEVELOPMENT.equals(version)) {
          return null;
        }
 else         if (!Version.text.equals(version)) {
          return "String_Node_Str" + p.getAbsolutePath() + "String_Node_Str"+ Version.text+ "String_Node_Str"+ version;
        }
      }
 catch (      IOException ioe) {
        return "String_Node_Str" + p.getAbsolutePath() + "String_Node_Str"+ ioe;
      }
      return null;
    }
 else {
    }
  }
  return "String_Node_Str" + makeClasspathString();
}
Program: 9412
Project: 9412
Buggy source:
public void testPathResolutionFromConfigArgs(){
  String FILE_PATH="String_Node_Str" + TEST_DIR + "String_Node_Str";
  AjBuildConfig config=genBuildConfig(new String[]{FILE_PATH},messageWriter);
  List classpath=config.getClasspath();
  assertEquals("String_Node_Str",3,classpath.size());
  Iterator cpIter=classpath.iterator();
  try {
    assertEquals("String_Node_Str",new File(TEST_DIR + File.separator + "String_Node_Str").getCanonicalPath(),cpIter.next());
    assertEquals("String_Node_Str",new File(TEST_DIR + File.separator + "String_Node_Str"+ File.separator+ "String_Node_Str").getCanonicalPath(),cpIter.next());
    assertEquals("String_Node_Str",new File(TEST_DIR + File.separator + "String_Node_Str").getCanonicalPath(),cpIter.next());
    List files=config.getFiles();
    assertEquals("String_Node_Str",2,files.size());
    Iterator fIter=files.iterator();
    assertEquals("String_Node_Str",new File(TEST_DIR + File.separator + "String_Node_Str").getCanonicalFile(),fIter.next());
    assertEquals("String_Node_Str",new File(TEST_DIR + File.separator + "String_Node_Str"+ File.separator+ "String_Node_Str").getCanonicalFile(),fIter.next());
  }
 catch (  IOException ex) {
    fail("String_Node_Str" + ex);
  }
}

Fixed version (ground truth):
public void testPathResolutionFromConfigArgs(){
  String FILE_PATH="String_Node_Str" + TEST_DIR + "String_Node_Str";
  AjBuildConfig config=genBuildConfig(new String[]{FILE_PATH},messageWriter);
  List classpath=config.getFullClasspath();
  assertEquals("String_Node_Str",3,classpath.size());
  Iterator cpIter=classpath.iterator();
  try {
    assertEquals("String_Node_Str",new File(TEST_DIR + File.separator + "String_Node_Str").getCanonicalPath(),cpIter.next());
    assertEquals("String_Node_Str",new File(TEST_DIR + File.separator + "String_Node_Str"+ File.separator+ "String_Node_Str").getCanonicalPath(),cpIter.next());
    assertEquals("String_Node_Str",new File(TEST_DIR + File.separator + "String_Node_Str").getCanonicalPath(),cpIter.next());
    List files=config.getFiles();
    assertEquals("String_Node_Str",2,files.size());
    Iterator fIter=files.iterator();
    assertEquals("String_Node_Str",new File(TEST_DIR + File.separator + "String_Node_Str").getCanonicalFile(),fIter.next());
    assertEquals("String_Node_Str",new File(TEST_DIR + File.separator + "String_Node_Str"+ File.separator+ "String_Node_Str").getCanonicalFile(),fIter.next());
  }
 catch (  IOException ex) {
    fail("String_Node_Str" + ex);
  }
}
Program: 9413
Project: 9413
Buggy source:
public void testBootclasspath() throws InvalidInputException {
  final String PATH="String_Node_Str" + File.separator + "String_Node_Str";
  AjBuildConfig config=genBuildConfig(new String[]{"String_Node_Str",PATH},messageWriter);
  assertTrue("String_Node_Str" + PATH + "String_Node_Str"+ config.getClasspath().toString(),((String)config.getClasspath().get(0)).indexOf(PATH) != -1);
  config=genBuildConfig(new String[]{},messageWriter);
  assertTrue(config.getClasspath().toString(),!config.getClasspath().get(0).equals(PATH));
}

Fixed version (ground truth):
public void testBootclasspath() throws InvalidInputException {
  final String PATH="String_Node_Str" + File.separator + "String_Node_Str";
  AjBuildConfig config=genBuildConfig(new String[]{"String_Node_Str",PATH},messageWriter);
  assertTrue("String_Node_Str" + PATH + "String_Node_Str"+ config.getBootclasspath().toString(),((String)config.getBootclasspath().get(0)).indexOf(PATH) != -1);
  config=genBuildConfig(new String[]{},messageWriter);
  assertTrue(config.getBootclasspath().toString(),!config.getBootclasspath().get(0).equals(PATH));
}
Program: 9414
Project: 9414
Buggy source:
/** 
 * Delegate of both runCommand and repeatCommand. This invokes the argument parser each time (even when repeating). If the parser detects errors, this signals an  abort with the usage message and returns false.
 * @param handler the IMessageHandler sink for any messages
 * @param repeat if true, do incremental build, else do batch build
 * @return false if handler has any errors or command failed
 */
protected boolean doCommand(IMessageHandler handler,boolean repeat){
  try {
    CountingMessageHandler counter=new CountingMessageHandler(handler);
    if (counter.hasErrors()) {
      return false;
    }
    AjBuildConfig config=genBuildConfig(savedArgs,counter);
    if (!config.shouldProceed()) {
      return true;
    }
    if (!config.hasSources()) {
      MessageUtil.error(counter,"String_Node_Str");
    }
    if (counter.hasErrors()) {
      String usage=BuildArgParser.getUsage();
      MessageUtil.abort(handler,usage);
      return false;
    }
    return ((repeat ? buildManager.incrementalBuild(config,handler) : buildManager.batchBuild(config,handler)) && !counter.hasErrors());
  }
 catch (  AbortException ae) {
    if (ae.isSilent()) {
      throw ae;
    }
 else {
      MessageUtil.abort(handler,ABORT_MESSAGE,ae);
    }
  }
catch (  MissingSourceFileException t) {
    MessageUtil.error(handler,t.getMessage());
  }
catch (  Throwable t) {
    MessageUtil.abort(handler,ABORT_MESSAGE,t);
  }
  return false;
}

Fixed version (ground truth):
/** 
 * Delegate of both runCommand and repeatCommand. This invokes the argument parser each time (even when repeating). If the parser detects errors, this signals an  abort with the usage message and returns false.
 * @param handler the IMessageHandler sink for any messages
 * @param repeat if true, do incremental build, else do batch build
 * @return false if handler has any errors or command failed
 */
protected boolean doCommand(IMessageHandler handler,boolean repeat){
  try {
    CountingMessageHandler counter=new CountingMessageHandler(handler);
    if (counter.hasErrors()) {
      return false;
    }
    AjBuildConfig config=genBuildConfig(savedArgs,counter);
    if (!config.shouldProceed()) {
      return true;
    }
    if (!config.hasSources()) {
      MessageUtil.error(counter,"String_Node_Str");
    }
    if (counter.hasErrors()) {
      String usage=BuildArgParser.getUsage();
      MessageUtil.abort(handler,usage);
      return false;
    }
    boolean result=((repeat ? buildManager.incrementalBuild(config,handler) : buildManager.batchBuild(config,handler)) && !counter.hasErrors());
    Dump.dumpOnExit();
    return result;
  }
 catch (  AbortException ae) {
    if (ae.isSilent()) {
      throw ae;
    }
 else {
      MessageUtil.abort(handler,ABORT_MESSAGE,ae);
    }
  }
catch (  MissingSourceFileException t) {
    MessageUtil.error(handler,t.getMessage());
  }
catch (  Throwable t) {
    MessageUtil.abort(handler,ABORT_MESSAGE,t);
    Dump.dumpWithException(t);
  }
  return false;
}
Program: 9416
Project: 9416
Buggy source:
public void performCompilation(List files){
  if (progressListener != null) {
    compiledCount=0;
    sourceFileCount=files.size();
    progressListener.setText("String_Node_Str");
  }
  String[] filenames=new String[files.size()];
  String[] encodings=new String[files.size()];
  for (int i=0; i < files.size(); i++) {
    filenames[i]=((File)files.get(i)).getPath();
  }
  List cps=buildConfig.getFullClasspath();
  String[] classpaths=new String[cps.size()];
  for (int i=0; i < cps.size(); i++) {
    classpaths[i]=(String)cps.get(i);
  }
  environment=getLibraryAccess(classpaths,filenames);
  if (!state.classesFromName.isEmpty()) {
    environment=new StatefulNameEnvironment(environment,state.classesFromName);
  }
  org.eclipse.jdt.internal.compiler.Compiler.setCompilerAdapterFactory(this);
  org.eclipse.jdt.internal.compiler.Compiler compiler=new org.eclipse.jdt.internal.compiler.Compiler(environment,DefaultErrorHandlingPolicies.proceedWithAllProblems(),buildConfig.getOptions().getMap(),getBatchRequestor(),getProblemFactory());
  CompilerOptions options=compiler.options;
  options.produceReferenceInfo=true;
  try {
    compiler.compile(getCompilationUnits(filenames,encodings));
  }
 catch (  OperationCanceledException oce) {
    handler.handleMessage(new Message("String_Node_Str" + oce.getMessage(),IMessage.WARNING,null,null));
  }
  environment.cleanup();
  environment=null;
}

Fixed version (ground truth):
public void performCompilation(List files){
  if (progressListener != null) {
    compiledCount=0;
    sourceFileCount=files.size();
    progressListener.setText("String_Node_Str");
  }
  String[] filenames=new String[files.size()];
  String[] encodings=new String[files.size()];
  for (int i=0; i < files.size(); i++) {
    filenames[i]=((File)files.get(i)).getPath();
  }
  List cps=buildConfig.getFullClasspath();
  Dump.saveFullClasspath(cps);
  String[] classpaths=new String[cps.size()];
  for (int i=0; i < cps.size(); i++) {
    classpaths[i]=(String)cps.get(i);
  }
  environment=getLibraryAccess(classpaths,filenames);
  if (!state.classesFromName.isEmpty()) {
    environment=new StatefulNameEnvironment(environment,state.classesFromName);
  }
  org.eclipse.jdt.internal.compiler.Compiler.setCompilerAdapterFactory(this);
  org.eclipse.jdt.internal.compiler.Compiler compiler=new org.eclipse.jdt.internal.compiler.Compiler(environment,DefaultErrorHandlingPolicies.proceedWithAllProblems(),buildConfig.getOptions().getMap(),getBatchRequestor(),getProblemFactory());
  CompilerOptions options=compiler.options;
  options.produceReferenceInfo=true;
  try {
    compiler.compile(getCompilationUnits(filenames,encodings));
  }
 catch (  OperationCanceledException oce) {
    handler.handleMessage(new Message("String_Node_Str" + oce.getMessage(),IMessage.WARNING,null,null));
  }
  environment.cleanup();
  environment=null;
}