nus-yam/ex-repair huggingface dataset:
Program: 9257
Project: 9257
Buggy source:
protected ReferenceTypeDelegate resolveIfBootstrapDelegate(ReferenceType ty){
  String name=ty.getName();
  Reference bootRef=(Reference)bootstrapTypes.get(name);
  if (bootRef != null) {
    ReferenceTypeDelegate rtd=(ReferenceTypeDelegate)bootRef.get();
    if (rtd != null) {
      return rtd;
    }
  }
  char fc=name.charAt(0);
  if (fc == 'j' || fc == 'c' || fc == 'o' || fc == 's') {
    if (name.startsWith("String_Node_Str") || name.startsWith("String_Node_Str") || name.startsWith("String_Node_Str")|| name.startsWith("String_Node_Str")|| name.startsWith("String_Node_Str")) {
      ReferenceTypeDelegate bootstrapLoaderDelegate=resolveReflectionTypeDelegate(ty,loader);
      if (bootstrapLoaderDelegate != null) {
        bootstrapTypes.put(ty.getName(),new WeakReference(bootstrapLoaderDelegate));
      }
      return bootstrapLoaderDelegate;
    }
  }
  return null;
}

Fixed version (ground truth):
protected ReferenceTypeDelegate resolveIfBootstrapDelegate(ReferenceType ty){
  String name=ty.getName();
  Reference bootRef=(Reference)bootstrapTypes.get(name);
  if (bootRef != null) {
    ReferenceTypeDelegate rtd=(ReferenceTypeDelegate)bootRef.get();
    if (rtd != null) {
      return rtd;
    }
  }
  char fc=name.charAt(0);
  if (fc == 'j' || fc == 'c' || fc == 'o' || fc == 's') {
    if (name.startsWith("String_Node_Str") || name.startsWith("String_Node_Str") || name.startsWith("String_Node_Str")|| name.startsWith("String_Node_Str")|| name.startsWith("String_Node_Str")) {
      ReferenceTypeDelegate bootstrapLoaderDelegate=resolveReflectionTypeDelegate(ty,null);
      if (bootstrapLoaderDelegate != null) {
        bootstrapTypes.put(ty.getName(),new WeakReference(bootstrapLoaderDelegate));
      }
      return bootstrapLoaderDelegate;
    }
  }
  return null;
}
Program: 9259
Project: 9259
Buggy source:
private static ReflectionBasedReferenceTypeDelegate create15Delegate(ReferenceType forReferenceType,Class forClass,ClassLoader usingClassLoader,World inWorld){
  try {
    Class delegateClass=Class.forName("String_Node_Str",true,usingClassLoader);
    ReflectionBasedReferenceTypeDelegate ret=(ReflectionBasedReferenceTypeDelegate)delegateClass.newInstance();
    ret.initialize(forReferenceType,forClass,usingClassLoader,inWorld);
    return ret;
  }
 catch (  ClassNotFoundException cnfEx) {
    throw new IllegalStateException("String_Node_Str");
  }
catch (  InstantiationException insEx) {
    throw new IllegalStateException("String_Node_Str" + insEx + "String_Node_Str");
  }
catch (  IllegalAccessException illAccEx) {
    throw new IllegalStateException("String_Node_Str" + illAccEx + "String_Node_Str");
  }
}

Fixed version (ground truth):
private static ReflectionBasedReferenceTypeDelegate create15Delegate(ReferenceType forReferenceType,Class forClass,ClassLoader usingClassLoader,World inWorld){
  try {
    Class delegateClass=Class.forName("String_Node_Str");
    ReflectionBasedReferenceTypeDelegate ret=(ReflectionBasedReferenceTypeDelegate)delegateClass.newInstance();
    ret.initialize(forReferenceType,forClass,usingClassLoader,inWorld);
    return ret;
  }
 catch (  ClassNotFoundException cnfEx) {
    throw new IllegalStateException("String_Node_Str");
  }
catch (  InstantiationException insEx) {
    throw new IllegalStateException("String_Node_Str" + insEx + "String_Node_Str");
  }
catch (  IllegalAccessException illAccEx) {
    throw new IllegalStateException("String_Node_Str" + illAccEx + "String_Node_Str");
  }
}
Program: 9261
Project: 9261
Buggy source:
private String getKey(Pointcut p,ResolvedType a){
  StringBuffer sb=new StringBuffer();
  sb.append(a.getName());
  sb.append("String_Node_Str");
  sb.append(p.toString());
  return sb.toString();
}

Fixed version (ground truth):
private String getKey(Pointcut p,ResolvedType a,String stackOrCounter){
  StringBuffer sb=new StringBuffer();
  sb.append(a.getName());
  sb.append("String_Node_Str");
  sb.append(p.toString());
  sb.append("String_Node_Str");
  sb.append(stackOrCounter);
  return sb.toString();
}
Program: 9262
Project: 9262
Buggy source:
private Object getCflowfield(Pointcut pcutkey,ResolvedType concreteAspect){
  String key=getKey(pcutkey,concreteAspect);
  Object o=null;
  if (isBelow) {
    o=cflowBelowFields.get(key);
  }
 else {
    o=cflowFields.get(key);
  }
  return o;
}

Fixed version (ground truth):
private Object getCflowfield(Pointcut pcutkey,ResolvedType concreteAspect,String stackOrCounter){
  String key=getKey(pcutkey,concreteAspect,stackOrCounter);
  Object o=null;
  if (isBelow)   o=cflowBelowFields.get(key);
 else   o=cflowFields.get(key);
  return o;
}
Program: 9264
Project: 9264
Buggy source:
private void putCflowfield(Pointcut pcutkey,ResolvedType concreteAspect,Object o){
  String key=getKey(pcutkey,concreteAspect);
  if (isBelow) {
    cflowBelowFields.put(key,o);
  }
 else {
    cflowFields.put(key,o);
  }
}

Fixed version (ground truth):
private void putCflowfield(Pointcut pcutkey,ResolvedType concreteAspect,Object o,String stackOrCounter){
  String key=getKey(pcutkey,concreteAspect,stackOrCounter);
  if (isBelow) {
    cflowBelowFields.put(key,o);
  }
 else {
    cflowFields.put(key,o);
  }
}
Program: 9265
Project: 9265
Buggy source:
private void writeResource(String filename,byte[] content,File srcLocation) throws IOException {
  if (state.hasResource(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 {
    File destDir=buildConfig.getOutputDir();
    if (buildConfig.getCompilationResultDestinationManager() != null) {
      destDir=buildConfig.getCompilationResultDestinationManager().getOutputLocationForResource(srcLocation.getAbsolutePath());
    }
    OutputStream fos=FileUtil.makeOutputStream(new File(destDir,filename));
    fos.write(content);
    fos.close();
  }
  state.recordResource(filename);
}

Fixed version (ground truth):
private void writeResource(String filename,byte[] content,File srcLocation) throws IOException {
  if (state.hasResource(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 {
    File destDir=buildConfig.getOutputDir();
    if (buildConfig.getCompilationResultDestinationManager() != null) {
      destDir=buildConfig.getCompilationResultDestinationManager().getOutputLocationForResource(srcLocation.getAbsolutePath());
    }
    try {
      OutputStream fos=FileUtil.makeOutputStream(new File(destDir,filename));
      fos.write(content);
      fos.close();
    }
 catch (    FileNotFoundException fnfe) {
      IMessage msg=new Message("String_Node_Str" + filename + "String_Node_Str"+ fnfe.getMessage(),IMessage.ERROR,null,new SourceLocation(srcLocation,0));
      handler.handleMessage(msg);
    }
  }
  state.recordResource(filename);
}
Program: 9266
Project: 9266
Buggy source:
public void afterCompiling(CompilationUnitDeclaration[] units){
  this.eWorld.cleanup();
  try {
    if (isXTerminateAfterCompilation || (reportedErrors && !proceedOnError)) {
      notifyRequestor();
    }
 else {
      weave();
      weaver.getWorld().flush();
    }
  }
 catch (  IOException ex) {
    AbortCompilation ac=new AbortCompilation(null,ex);
    throw ac;
  }
catch (  RuntimeException rEx) {
    if (rEx instanceof AbortCompilation)     throw rEx;
    throw new AbortCompilation(true,rEx);
  }
}

Fixed version (ground truth):
public void afterCompiling(CompilationUnitDeclaration[] units){
  this.eWorld.cleanup();
  try {
    if (!reportedErrors && units != null) {
      for (int i=0; i < units.length; i++) {
        if (units[i] != null && units[i].compilationResult != null && units[i].compilationResult.hasErrors()) {
          reportedErrors=true;
          break;
        }
      }
    }
    if (isXTerminateAfterCompilation || (reportedErrors && !proceedOnError)) {
      notifyRequestor();
    }
 else {
      weave();
      weaver.getWorld().flush();
    }
  }
 catch (  IOException ex) {
    AbortCompilation ac=new AbortCompilation(null,ex);
    throw ac;
  }
catch (  RuntimeException rEx) {
    if (rEx instanceof AbortCompilation)     throw rEx;
    throw new AbortCompilation(true,rEx);
  }
}
Program: 9269
Project: 9269
Buggy source:
protected void setUp() throws Exception {
  super.setUp();
  MyStateListener.reset();
  MyBuildProgressMonitor.reset();
  MyTaskListManager.reset();
  createEmptySandbox();
}

Fixed version (ground truth):
protected void setUp() throws Exception {
  super.setUp();
  MyStateListener.reset();
  MyBuildProgressMonitor.reset();
  MyTaskListManager.reset();
  MyProjectPropertiesAdapter.reset();
  createEmptySandbox();
}
Program: 9270
Project: 9270
Buggy source:
public Set getAspectPath(){
  log("String_Node_Str");
  return null;
}

Fixed version (ground truth):
public Set getAspectPath(){
  log("String_Node_Str" + aspectPath + "String_Node_Str");
  return aspectPath;
}
Program: 9271
Project: 9271
Buggy source:
/** 
 * Generate the "public int"-type information about the given IProgramElement. Used when dealing with ITDs. To mirror the behaviour of methods and fields in classes, if we're generating the summary information we don't want to  include "public" if the accessibility of the IProgramElement is public. 
 */
private static String generateModifierInformation(IProgramElement decl,boolean isDetails){
  String intro="String_Node_Str";
  if (isDetails || !decl.getAccessibility().equals(IProgramElement.Accessibility.PUBLIC)) {
    intro+="String_Node_Str" + decl.getAccessibility().toString() + "String_Node_Str";
  }
  if (decl.getKind().equals(IProgramElement.Kind.INTER_TYPE_FIELD)) {
    return intro + decl.getCorrespondingType() + "String_Node_Str";
  }
 else   if (decl.getKind().equals(IProgramElement.Kind.INTER_TYPE_CONSTRUCTOR) && isDetails) {
    return intro + "String_Node_Str";
  }
 else {
    return intro + decl.getCorrespondingType(true) + "String_Node_Str";
  }
}

Fixed version (ground truth):
/** 
 * Generate the "public int"-type information about the given IProgramElement. Used when dealing with ITDs. To mirror the behaviour of methods and fields in classes, if we're generating the summary information we don't want to  include "public" if the accessibility of the IProgramElement is public. 
 */
private static String generateModifierInformation(IProgramElement decl,boolean isDetails){
  String intro="String_Node_Str";
  if (decl.getKind().isDeclare()) {
    return intro + "String_Node_Str";
  }
  if (isDetails || !decl.getAccessibility().equals(IProgramElement.Accessibility.PUBLIC)) {
    intro+="String_Node_Str" + decl.getAccessibility().toString() + "String_Node_Str";
  }
  if (decl.getKind().equals(IProgramElement.Kind.INTER_TYPE_FIELD)) {
    return intro + decl.getCorrespondingType() + "String_Node_Str";
  }
 else   if (decl.getKind().equals(IProgramElement.Kind.INTER_TYPE_CONSTRUCTOR) && isDetails) {
    return intro + "String_Node_Str";
  }
 else {
    return intro + decl.getCorrespondingType(true) + "String_Node_Str";
  }
}
Program: 9273
Project: 9273
Buggy source:
public static Test suite(){
  TestSuite suite=new TestSuite(AjdocTests.class.getName());
  suite.addTestSuite(DeclareFormsTest.class);
  suite.addTestSuite(SpacewarTestCase.class);
  suite.addTestSuite(PatternsTestCase.class);
  suite.addTestSuite(CoverageTestCase.class);
  suite.addTestSuite(ITDTest.class);
  suite.addTestSuite(FullyQualifiedArgumentTest.class);
  suite.addTestSuite(ExecutionTestCase.class);
  return suite;
}

Fixed version (ground truth):
public static Test suite(){
  TestSuite suite=new TestSuite(AjdocTests.class.getName());
  suite.addTestSuite(DeclareFormsTest.class);
  suite.addTestSuite(SpacewarTestCase.class);
  suite.addTestSuite(PatternsTestCase.class);
  suite.addTestSuite(CoverageTestCase.class);
  suite.addTestSuite(ITDTest.class);
  suite.addTestSuite(FullyQualifiedArgumentTest.class);
  suite.addTestSuite(EnumTest.class);
  suite.addTestSuite(ExecutionTestCase.class);
  return suite;
}
Program: 9274
Project: 9274
Buggy source:
protected boolean accept(String className,byte[] bytes){
  if (m_excludeTypePattern.isEmpty() && m_includeTypePattern.isEmpty()) {
    return true;
  }
  String fastClassName=className.replace('/','.').replace('$','.');
  for (int i=0; i < m_excludeStartsWith.size(); i++) {
    if (fastClassName.startsWith((String)m_excludeStartsWith.get(i))) {
      return false;
    }
  }
  boolean fastAccept=false;
  for (int i=0; i < m_includeStartsWith.size(); i++) {
    fastAccept=fastClassName.startsWith((String)m_includeStartsWith.get(i));
    if (fastAccept) {
      break;
    }
  }
  if (fastAccept) {
    return true;
  }
  BcelObjectType bct=((BcelWorld)weaver.getWorld()).addSourceObjectType(Utility.makeJavaClass(null,bytes));
  ResolvedType classInfo=bct.getResolvedTypeX();
  for (Iterator iterator=m_excludeTypePattern.iterator(); iterator.hasNext(); ) {
    TypePattern typePattern=(TypePattern)iterator.next();
    if (typePattern.matchesStatically(classInfo)) {
      return false;
    }
  }
  boolean accept=true;
  for (Iterator iterator=m_includeTypePattern.iterator(); iterator.hasNext(); ) {
    TypePattern typePattern=(TypePattern)iterator.next();
    accept=typePattern.matchesStatically(classInfo);
    if (accept) {
      break;
    }
  }
  return accept;
}

Fixed version (ground truth):
protected boolean accept(String className,byte[] bytes){
  if (m_excludeTypePattern.isEmpty() && m_includeTypePattern.isEmpty()) {
    return true;
  }
  String fastClassName=className.replace('/','.').replace('$','.');
  for (int i=0; i < m_excludeStartsWith.size(); i++) {
    if (fastClassName.startsWith((String)m_excludeStartsWith.get(i))) {
      return false;
    }
  }
  if (m_excludeTypePattern.isEmpty()) {
    boolean fastAccept=false;
    for (int i=0; i < m_includeStartsWith.size(); i++) {
      fastAccept=fastClassName.startsWith((String)m_includeStartsWith.get(i));
      if (fastAccept) {
        break;
      }
    }
  }
  BcelObjectType bct=((BcelWorld)weaver.getWorld()).addSourceObjectType(Utility.makeJavaClass(null,bytes));
  ResolvedType classInfo=bct.getResolvedTypeX();
  for (Iterator iterator=m_excludeTypePattern.iterator(); iterator.hasNext(); ) {
    TypePattern typePattern=(TypePattern)iterator.next();
    if (typePattern.matchesStatically(classInfo)) {
      return false;
    }
  }
  boolean accept=true;
  for (Iterator iterator=m_includeTypePattern.iterator(); iterator.hasNext(); ) {
    TypePattern typePattern=(TypePattern)iterator.next();
    accept=typePattern.matchesStatically(classInfo);
    if (accept) {
      break;
    }
  }
  return accept;
}
Program: 9275
Project: 9275
Buggy source:
/** 
 * Return a version of this parameterized type in which any type parameters that are type variable references are replaced by their matching type variable binding.
 */
public UnresolvedType parameterize(Map typeBindings){
  throw new UnsupportedOperationException("String_Node_Str");
}

Fixed version (ground truth):
/** 
 * Return a version of this parameterized type in which any type parameters that are type variable references are replaced by their matching type variable binding.
 */
public UnresolvedType parameterize(Map typeBindings){
  throw new UnsupportedOperationException("String_Node_Str" + signature);
}
Program: 9277
Project: 9277
Buggy source:
public String getNonStandardOptions(){
  return null;
}

Fixed version (ground truth):
public String getNonStandardOptions(){
  return nonstandardoptions;
}
Program: 9279
Project: 9279
Buggy source:
void accept0(ASTVisitor visitor){
  AjASTVisitor ajvis=(AjASTVisitor)visitor;
  boolean visitChildren=ajvis.visit(this);
  if (visitChildren) {
    acceptChild(ajvis,getJavadoc());
    if (this.ast.apiLevel == AST.JLS2_INTERNAL) {
      acceptChild(ajvis,getReturnType());
    }
 else {
      acceptChildren(ajvis,this.modifiers);
      acceptChildren(ajvis,(NodeList)this.typeParameters());
      acceptChild(ajvis,getReturnType2());
    }
    acceptChild(ajvis,getName());
    acceptChildren(ajvis,this.parameters);
    acceptChildren(ajvis,(NodeList)this.thrownExceptions());
    acceptChild(ajvis,getBody());
  }
  ajvis.endVisit(this);
}

Fixed version (ground truth):
void accept0(ASTVisitor ajvis){
  boolean visitChildren=ajvis.visit(this);
  if (visitChildren) {
    acceptChild(ajvis,getJavadoc());
    if (this.ast.apiLevel == AST.JLS2_INTERNAL) {
      acceptChild(ajvis,getReturnType());
    }
 else {
      acceptChildren(ajvis,this.modifiers);
      acceptChildren(ajvis,(NodeList)this.typeParameters());
      acceptChild(ajvis,getReturnType2());
    }
    acceptChild(ajvis,getName());
    acceptChildren(ajvis,this.parameters);
    acceptChildren(ajvis,(NodeList)this.thrownExceptions());
    acceptChild(ajvis,getBody());
  }
  ajvis.endVisit(this);
}
Program: 9281
Project: 9281
Buggy source:
public static Test suite(){
  TestSuite suite=new TestSuite(AjdeTests.class.getName());
  suite.addTestSuite(ShowWeaveMessagesTestCase.class);
  suite.addTestSuite(DuplicateManifestTest.class);
  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(ReweavableTestCase.class);
  suite.addTestSuite(ResourceCopyTestCase.class);
  suite.addTestSuite(ModelPerformanceTest.class);
  suite.addTestSuite(SavedModelConsistencyTest.class);
  suite.addTestSuite(BuildCancellingTest.class);
  suite.addTestSuite(JarManifestTest.class);
  suite.addTestSuite(ExtensionTests.class);
  suite.addTestSuite(GenericsTest.class);
  suite.addTestSuite(OutxmlTest.class);
  return suite;
}

Fixed version (ground truth):
public static Test suite(){
  TestSuite suite=new TestSuite(AjdeTests.class.getName());
  suite.addTestSuite(SymbolFileGenerationTest.class);
  suite.addTestSuite(ShowWeaveMessagesTestCase.class);
  suite.addTestSuite(DuplicateManifestTest.class);
  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(ReweavableTestCase.class);
  suite.addTestSuite(ResourceCopyTestCase.class);
  suite.addTestSuite(ModelPerformanceTest.class);
  suite.addTestSuite(SavedModelConsistencyTest.class);
  suite.addTestSuite(BuildCancellingTest.class);
  suite.addTestSuite(JarManifestTest.class);
  suite.addTestSuite(ExtensionTests.class);
  suite.addTestSuite(GenericsTest.class);
  suite.addTestSuite(OutxmlTest.class);
  return suite;
}
Program: 9282
Project: 9282
Buggy source:
public String toString(){
  StringBuffer buf=new StringBuffer();
  buf.append("String_Node_Str");
  buf.append(getDeclaringType().getName());
  buf.append("String_Node_Str");
  buf.append(getName());
  buf.append("String_Node_Str");
  for (int i=0; i < getParameterTypes().length; i++) {
    if (i > 0)     buf.append("String_Node_Str");
    buf.append(getParameterTypes()[i].toString());
  }
  buf.append("String_Node_Str");
  return buf.toString();
}

Fixed version (ground truth):
public String toString(){
  StringBuffer buf=new StringBuffer();
  buf.append("String_Node_Str");
  buf.append((getDeclaringType() == null ? "String_Node_Str" : getDeclaringType().getName()));
  buf.append("String_Node_Str");
  buf.append(getName());
  buf.append("String_Node_Str");
  for (int i=0; i < getParameterTypes().length; i++) {
    if (i > 0)     buf.append("String_Node_Str");
    buf.append(getParameterTypes()[i].toString());
  }
  buf.append("String_Node_Str");
  return buf.toString();
}
Program: 9283
Project: 9283
Buggy source:
/** 
 * Find all the ITDs and Declares, but it is important we do this from the supertypes down to the subtypes.
 * @param sourceType
 * @param yetToProcess
 */
private void collectAllITDsAndDeclares(SourceTypeBinding sourceType,Collection yetToProcess){
  ContextToken tok=CompilationAndWeavingContext.enteringPhase(CompilationAndWeavingContext.COLLECTING_ITDS_AND_DECLARES,sourceType.sourceName);
  ReferenceBinding superType=sourceType.superclass();
  if (yetToProcess.contains(superType) && superType instanceof SourceTypeBinding) {
    collectAllITDsAndDeclares((SourceTypeBinding)superType,yetToProcess);
  }
  buildInterTypeAndPerClause(sourceType.scope);
  addCrosscuttingStructures(sourceType.scope);
  yetToProcess.remove(sourceType);
  CompilationAndWeavingContext.leavingPhase(tok);
}

Fixed version (ground truth):
/** 
 * Find all the ITDs and Declares, but it is important we do this from the supertypes down to the subtypes.
 * @param sourceType
 * @param yetToProcess
 */
private void collectAllITDsAndDeclares(SourceTypeBinding sourceType,Collection yetToProcess){
  ContextToken tok=CompilationAndWeavingContext.enteringPhase(CompilationAndWeavingContext.COLLECTING_ITDS_AND_DECLARES,sourceType.sourceName);
  ReferenceBinding superType=sourceType.superclass();
  if (superType instanceof SourceTypeBinding) {
    if (yetToProcess.contains(superType)) {
      collectAllITDsAndDeclares((SourceTypeBinding)superType,yetToProcess);
    }
  }
 else   if (superType instanceof ParameterizedTypeBinding) {
    ParameterizedTypeBinding ptb=(ParameterizedTypeBinding)superType;
    if (ptb.type instanceof SourceTypeBinding && yetToProcess.contains(ptb.type)) {
      collectAllITDsAndDeclares((SourceTypeBinding)ptb.type,yetToProcess);
    }
  }
  buildInterTypeAndPerClause(sourceType.scope);
  addCrosscuttingStructures(sourceType.scope);
  yetToProcess.remove(sourceType);
  CompilationAndWeavingContext.leavingPhase(tok);
}
Program: 9284
Project: 9284
Buggy source:
static void addAspectDocumentation(IProgramElement node,StringBuffer fileBuffer,int index){
  List pointcuts=new ArrayList();
  List advice=new ArrayList();
  for (Iterator it=node.getChildren().iterator(); it.hasNext(); ) {
    IProgramElement member=(IProgramElement)it.next();
    if (member.getKind().equals(IProgramElement.Kind.POINTCUT)) {
      pointcuts.add(member);
    }
 else     if (member.getKind().equals(IProgramElement.Kind.ADVICE)) {
      advice.add(member);
    }
  }
  if (pointcuts.size() > 0) {
    insertDeclarationsSummary(fileBuffer,pointcuts,"String_Node_Str",index);
    insertDeclarationsDetails(fileBuffer,pointcuts,"String_Node_Str",index);
  }
  if (advice.size() > 0) {
    insertDeclarationsSummary(fileBuffer,advice,"String_Node_Str",index);
    insertDeclarationsDetails(fileBuffer,advice,"String_Node_Str",index);
  }
}

Fixed version (ground truth):
static void addAspectDocumentation(IProgramElement node,StringBuffer fileBuffer,int index){
  List pointcuts=new ArrayList();
  List advice=new ArrayList();
  List declares=new ArrayList();
  for (Iterator it=node.getChildren().iterator(); it.hasNext(); ) {
    IProgramElement member=(IProgramElement)it.next();
    if (member.getKind().equals(IProgramElement.Kind.POINTCUT)) {
      pointcuts.add(member);
    }
 else     if (member.getKind().equals(IProgramElement.Kind.ADVICE)) {
      advice.add(member);
    }
 else     if (member.getKind().isDeclare() || member.getKind().isInterTypeMember()) {
      declares.add(member);
    }
  }
  if (declares.size() > 0) {
    insertDeclarationsDetails(fileBuffer,declares,DECLARE_DETAIL,index);
    insertDeclarationsSummary(fileBuffer,declares,DECLARE_SUMMARY,index);
  }
  if (pointcuts.size() > 0) {
    insertDeclarationsSummary(fileBuffer,pointcuts,POINTCUT_SUMMARY,index);
    insertDeclarationsDetails(fileBuffer,pointcuts,POINTCUT_DETAIL,index);
  }
  if (advice.size() > 0) {
    insertDeclarationsSummary(fileBuffer,advice,ADVICE_SUMMARY,index);
    insertDeclarationsDetails(fileBuffer,advice,ADVICE_DETAIL,index);
  }
}
Program: 9287
Project: 9287
Buggy source:
static String generateHREFName(IProgramElement decl){
  String hrefLink=decl.toLabelString();
  return hrefLink;
}

Fixed version (ground truth):
static String generateHREFName(IProgramElement decl){
  String hrefLink=decl.toLabelString().replace("String_Node_Str","String_Node_Str");
  return hrefLink;
}
Program: 9293
Project: 9293
Buggy source:
protected ResolvedType[] getAnnotations(Member relevantMember,ResolvedType relevantType){
  if (relevantMember == null) {
    List mungers=relevantType.resolve(world).getInterTypeMungers();
    for (Iterator iter=mungers.iterator(); iter.hasNext(); ) {
      BcelTypeMunger typeMunger=(BcelTypeMunger)iter.next();
      if (typeMunger.getMunger() instanceof NewMethodTypeMunger || typeMunger.getMunger() instanceof NewConstructorTypeMunger) {
        ResolvedMember fakerm=typeMunger.getSignature();
        ResolvedMember ajcMethod=(getSignature().getKind() == ResolvedMember.CONSTRUCTOR ? AjcMemberMaker.postIntroducedConstructor(typeMunger.getAspectType(),fakerm.getDeclaringType(),fakerm.getParameterTypes()) : AjcMemberMaker.interMethodDispatcher(fakerm,typeMunger.getAspectType()));
        ResolvedMember rmm=findMethod(typeMunger.getAspectType(),ajcMethod);
        if (fakerm.getName().equals(getSignature().getName()) && fakerm.getParameterSignature().equals(getSignature().getParameterSignature())) {
          relevantType=typeMunger.getAspectType();
          relevantMember=rmm;
          return relevantMember.getAnnotationTypes();
        }
      }
    }
  }
  return relevantMember.getAnnotationTypes();
}

Fixed version (ground truth):
protected ResolvedType[] getAnnotations(Member foundMember,Member relevantMember,ResolvedType relevantType){
  if (foundMember == null) {
    List mungers=relevantType.resolve(world).getInterTypeMungers();
    for (Iterator iter=mungers.iterator(); iter.hasNext(); ) {
      BcelTypeMunger typeMunger=(BcelTypeMunger)iter.next();
      if (typeMunger.getMunger() instanceof NewMethodTypeMunger || typeMunger.getMunger() instanceof NewConstructorTypeMunger) {
        ResolvedMember fakerm=typeMunger.getSignature();
        ResolvedMember ajcMethod=(getSignature().getKind() == ResolvedMember.CONSTRUCTOR ? AjcMemberMaker.postIntroducedConstructor(typeMunger.getAspectType(),fakerm.getDeclaringType(),fakerm.getParameterTypes()) : AjcMemberMaker.interMethodDispatcher(fakerm,typeMunger.getAspectType()));
        ResolvedMember rmm=findMethod(typeMunger.getAspectType(),ajcMethod);
        if (fakerm.getName().equals(getSignature().getName()) && fakerm.getParameterSignature().equals(getSignature().getParameterSignature())) {
          relevantType=typeMunger.getAspectType();
          foundMember=rmm;
          return foundMember.getAnnotationTypes();
        }
      }
    }
    foundMember=relevantType.lookupMemberWithSupersAndITDs(relevantMember);
    if (foundMember == null) {
      throw new IllegalStateException("String_Node_Str" + relevantMember + "String_Node_Str"+ relevantType);
    }
  }
  return foundMember.getAnnotationTypes();
}
Program: 9295
Project: 9295
Buggy source:
protected Member getRelevantMember(Member relevantMember,ResolvedType relevantType){
  if (relevantMember != null) {
    return relevantMember;
  }
  relevantMember=getSignature().resolve(world);
  List mungers=relevantType.resolve(world).getInterTypeMungers();
  for (Iterator iter=mungers.iterator(); iter.hasNext(); ) {
    BcelTypeMunger typeMunger=(BcelTypeMunger)iter.next();
    if (typeMunger.getMunger() instanceof NewMethodTypeMunger || typeMunger.getMunger() instanceof NewConstructorTypeMunger) {
      ResolvedMember fakerm=typeMunger.getSignature();
      if (fakerm.getName().equals(getSignature().getName()) && fakerm.getParameterSignature().equals(getSignature().getParameterSignature())) {
        if (relevantMember.getKind() == ResolvedMember.CONSTRUCTOR) {
          relevantMember=AjcMemberMaker.interConstructor(relevantType,(ResolvedMember)relevantMember,typeMunger.getAspectType());
        }
 else {
          relevantMember=AjcMemberMaker.interMethod((ResolvedMember)relevantMember,typeMunger.getAspectType(),false);
        }
        return relevantMember;
      }
    }
  }
  return null;
}

Fixed version (ground truth):
protected Member getRelevantMember(Member foundMember,Member relevantMember,ResolvedType relevantType){
  if (foundMember != null) {
    return foundMember;
  }
  foundMember=getSignature().resolve(world);
  if (foundMember == null && relevantMember != null) {
    foundMember=relevantType.lookupMemberWithSupersAndITDs(relevantMember);
  }
  List mungers=relevantType.resolve(world).getInterTypeMungers();
  for (Iterator iter=mungers.iterator(); iter.hasNext(); ) {
    BcelTypeMunger typeMunger=(BcelTypeMunger)iter.next();
    if (typeMunger.getMunger() instanceof NewMethodTypeMunger || typeMunger.getMunger() instanceof NewConstructorTypeMunger) {
      ResolvedMember fakerm=typeMunger.getSignature();
      if (fakerm.getName().equals(getSignature().getName()) && fakerm.getParameterSignature().equals(getSignature().getParameterSignature())) {
        if (foundMember.getKind() == ResolvedMember.CONSTRUCTOR) {
          foundMember=AjcMemberMaker.interConstructor(relevantType,(ResolvedMember)foundMember,typeMunger.getAspectType());
        }
 else {
          foundMember=AjcMemberMaker.interMethod((ResolvedMember)foundMember,typeMunger.getAspectType(),false);
        }
        return foundMember;
      }
    }
  }
  return foundMember;
}
Program: 9296
Project: 9296
Buggy source:
public static TypePattern read(VersionedDataInputStream s,ISourceContext context) throws IOException {
  TypePattern ret=new BindingTypePattern(UnresolvedType.read(s),s.readShort(),s.readBoolean());
  ret.readLocation(context,s);
  return ret;
}

Fixed version (ground truth):
public static TypePattern read(VersionedDataInputStream s,ISourceContext context) throws IOException {
  UnresolvedType type=UnresolvedType.read(s);
  int index=s.readShort();
  boolean isVarargs=false;
  if (s.getMajorVersion() >= AjAttribute.WeaverVersionInfo.WEAVER_VERSION_MAJOR_AJ150) {
    isVarargs=s.readBoolean();
  }
  TypePattern ret=new BindingTypePattern(type,index,isVarargs);
  ret.readLocation(context,s);
  return ret;
}
Program: 9299
Project: 9299
Buggy source:
public NamePattern extractName(){
  if (isIncludeSubtypes() || isVarArgs() || isArray()) {
    return null;
  }
  int len=namePatterns.length;
  NamePattern ret=namePatterns[len - 1];
  NamePattern[] newNames=new NamePattern[len - 1];
  System.arraycopy(namePatterns,0,newNames,0,len - 1);
  namePatterns=newNames;
  return ret;
}

Fixed version (ground truth):
public NamePattern extractName(){
  if (isIncludeSubtypes() || isVarArgs() || isArray()) {
    return null;
  }
  int len=namePatterns.length;
  if (len == 1 && !annotationPattern.isAny())   return null;
  NamePattern ret=namePatterns[len - 1];
  NamePattern[] newNames=new NamePattern[len - 1];
  System.arraycopy(namePatterns,0,newNames,0,len - 1);
  namePatterns=newNames;
  return ret;
}
Program: 9302
Project: 9302
Buggy source:
protected void generateAttributes(ClassFile classFile){
  if (!isAbstract())   generatePerSupportMembers(classFile);
  generateInlineAccessMembers(classFile);
  classFile.extraAttributes.add(new EclipseAttributeAdapter(new AjAttribute.Aspect(perClause)));
  if (binding.privilegedHandler != null) {
    ResolvedMember[] members=((PrivilegedHandler)binding.privilegedHandler).getMembers();
    classFile.extraAttributes.add(new EclipseAttributeAdapter(new AjAttribute.PrivilegedAttribute(members)));
  }
  classFile.extraAttributes.add(new EclipseAttributeAdapter(new AjAttribute.SourceContextAttribute(new String(compilationResult().getFileName()),compilationResult().lineSeparatorPositions)));
  super.generateAttributes(classFile);
}

Fixed version (ground truth):
protected void generateAttributes(ClassFile classFile){
  if (!isAbstract())   generatePerSupportMembers(classFile);
  generateInlineAccessMembers(classFile);
  classFile.extraAttributes.add(new EclipseAttributeAdapter(new AjAttribute.WeaverVersionInfo()));
  classFile.extraAttributes.add(new EclipseAttributeAdapter(new AjAttribute.Aspect(perClause)));
  if (binding.privilegedHandler != null) {
    ResolvedMember[] members=((PrivilegedHandler)binding.privilegedHandler).getMembers();
    classFile.extraAttributes.add(new EclipseAttributeAdapter(new AjAttribute.PrivilegedAttribute(members)));
  }
  classFile.extraAttributes.add(new EclipseAttributeAdapter(new AjAttribute.SourceContextAttribute(new String(compilationResult().getFileName()),compilationResult().lineSeparatorPositions)));
  super.generateAttributes(classFile);
}
Program: 9303
Project: 9303
Buggy source:
/** 
 * A pointcut declaration exists in a classfile only as an attibute on the class.  Unlike advice and inter-type declarations, it has no corresponding method.
 */
public void generateCode(ClassScope classScope,ClassFile classFile){
  this.world=EclipseFactory.fromScopeLookupEnvironment(classScope);
  if (ignoreFurtherInvestigation)   return;
  classFile.extraAttributes.add(new EclipseAttributeAdapter(makeAttribute()));
  if (generateSyntheticPointcutMethod) {
    super.generateCode(classScope,classFile);
  }
  return;
}

Fixed version (ground truth):
/** 
 * A pointcut declaration exists in a classfile only as an attibute on the class.  Unlike advice and inter-type declarations, it has no corresponding method.
 */
public void generateCode(ClassScope classScope,ClassFile classFile){
  this.world=EclipseFactory.fromScopeLookupEnvironment(classScope);
  if (ignoreFurtherInvestigation)   return;
  classFile.extraAttributes.add(new EclipseAttributeAdapter(makeAttribute()));
  addVersionAttributeIfNecessary(classFile);
  if (generateSyntheticPointcutMethod) {
    super.generateCode(classScope,classFile);
  }
  return;
}
Program: 9304
Project: 9304
Buggy source:
public static List readAjAttributes(String classname,Attribute[] as,ISourceContext context,IMessageHandler msgHandler){
  List l=new ArrayList();
  AjAttribute.WeaverVersionInfo version=new WeaverVersionInfo();
  for (int i=as.length - 1; i >= 0; i--) {
    Attribute a=as[i];
    if (a instanceof Unknown) {
      Unknown u=(Unknown)a;
      String name=u.getName();
      if (name.startsWith(AjAttribute.AttributePrefix)) {
        AjAttribute attr=AjAttribute.read(version,name,u.getBytes(),context,msgHandler);
        if (attr != null && attr instanceof AjAttribute.WeaverVersionInfo) {
          version=(AjAttribute.WeaverVersionInfo)attr;
          if (version.getMajorVersion() > WeaverVersionInfo.getCurrentWeaverMajorVersion()) {
            throw new BCException("String_Node_Str" + WeaverVersionInfo.toCurrentVersionString() + "String_Node_Str"+ classname+ "String_Node_Str"+ version.toString());
          }
        }
        if (attr != null)         l.add(attr);
      }
    }
  }
  return l;
}

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

Fixed version (ground truth):
private void unpackAttributes(World world){
  Attribute[] attrs=field.getAttributes();
  List as=BcelAttributes.readAjAttributes(getDeclaringType().getClassName(),attrs,getSourceContext(world),world.getMessageHandler(),bcelObjectType.getWeaverVersionAttribute());
  as.addAll(AtAjAttributes.readAj5FieldAttributes(field,world.resolve(getDeclaringType()),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: 9306
Project: 9306
Buggy source:
BcelField(BcelObjectType declaringType,Field field){
  super(FIELD,declaringType.getResolvedTypeX(),field.getAccessFlags(),field.getName(),field.getSignature());
  this.field=field;
  this.world=declaringType.getResolvedTypeX().getWorld();
  unpackAttributes(world);
  checkedExceptions=UnresolvedType.NONE;
}

Fixed version (ground truth):
BcelField(BcelObjectType declaringType,Field field){
  super(FIELD,declaringType.getResolvedTypeX(),field.getAccessFlags(),field.getName(),field.getSignature());
  this.field=field;
  this.world=declaringType.getResolvedTypeX().getWorld();
  this.bcelObjectType=declaringType;
  unpackAttributes(world);
  checkedExceptions=UnresolvedType.NONE;
}
Program: 9307
Project: 9307
Buggy source:
private void unpackAjAttributes(World world){
  associatedShadowMunger=null;
  List as=BcelAttributes.readAjAttributes(getDeclaringType().getClassName(),method.getAttributes(),getSourceContext(world),world.getMessageHandler());
  processAttributes(world,as);
  as=AtAjAttributes.readAj5MethodAttributes(method,this,world.resolve(getDeclaringType()),preResolvedPointcut,getSourceContext(world),world.getMessageHandler());
  processAttributes(world,as);
}

Fixed version (ground truth):
private void unpackAjAttributes(World world){
  associatedShadowMunger=null;
  List as=BcelAttributes.readAjAttributes(getDeclaringType().getClassName(),method.getAttributes(),getSourceContext(world),world.getMessageHandler(),bcelObjectType.getWeaverVersionAttribute());
  processAttributes(world,as);
  as=AtAjAttributes.readAj5MethodAttributes(method,this,world.resolve(getDeclaringType()),preResolvedPointcut,getSourceContext(world),world.getMessageHandler());
  processAttributes(world,as);
}
Program: 9308
Project: 9308
Buggy source:
private void unpackAspectAttributes(){
  isUnpacked=true;
  List pointcuts=new ArrayList();
  typeMungers=new ArrayList();
  declares=new ArrayList();
  List l=BcelAttributes.readAjAttributes(javaClass.getClassName(),javaClass.getAttributes(),getResolvedTypeX().getSourceContext(),getResolvedTypeX().getWorld().getMessageHandler());
  processAttributes(l,pointcuts,false);
  l=AtAjAttributes.readAj5ClassAttributes(javaClass,getResolvedTypeX(),getResolvedTypeX().getSourceContext(),getResolvedTypeX().getWorld().getMessageHandler(),isCodeStyleAspect);
  processAttributes(l,pointcuts,true);
  this.pointcuts=(ResolvedPointcutDefinition[])pointcuts.toArray(new ResolvedPointcutDefinition[pointcuts.size()]);
}

Fixed version (ground truth):
private void unpackAspectAttributes(){
  isUnpacked=true;
  List pointcuts=new ArrayList();
  typeMungers=new ArrayList();
  declares=new ArrayList();
  List l=BcelAttributes.readAjAttributes(javaClass.getClassName(),javaClass.getAttributes(),getResolvedTypeX().getSourceContext(),getResolvedTypeX().getWorld().getMessageHandler(),AjAttribute.WeaverVersionInfo.UNKNOWN);
  processAttributes(l,pointcuts,false);
  l=AtAjAttributes.readAj5ClassAttributes(javaClass,getResolvedTypeX(),getResolvedTypeX().getSourceContext(),getResolvedTypeX().getWorld().getMessageHandler(),isCodeStyleAspect);
  processAttributes(l,pointcuts,true);
  this.pointcuts=(ResolvedPointcutDefinition[])pointcuts.toArray(new ResolvedPointcutDefinition[pointcuts.size()]);
}
Program: 9309
Project: 9309
Buggy source:
private void printAspectAttributes(PrintStream out){
  ISourceContext context=null;
  if (enclosingClass != null && enclosingClass.getType() != null) {
    context=enclosingClass.getType().getSourceContext();
  }
  List as=BcelAttributes.readAjAttributes(getClassName(),attributes,context,null);
  if (!as.isEmpty()) {
    out.println("String_Node_Str" + as.get(0));
  }
}

Fixed version (ground truth):
private void printAspectAttributes(PrintStream out){
  ISourceContext context=null;
  if (enclosingClass != null && enclosingClass.getType() != null) {
    context=enclosingClass.getType().getSourceContext();
  }
  List as=BcelAttributes.readAjAttributes(getClassName(),attributes,context,null,AjAttribute.WeaverVersionInfo.UNKNOWN);
  if (!as.isEmpty()) {
    out.println("String_Node_Str" + as.get(0));
  }
}
Program: 9310
Project: 9310
Buggy source:
private boolean acceptAspect(String aspectClassName){
  if (m_aspectExcludeTypePattern.isEmpty()) {
    return true;
  }
  ResolvedType classInfo=weaver.getWorld().getCoreType(UnresolvedType.forName(aspectClassName));
  for (Iterator iterator=m_aspectExcludeTypePattern.iterator(); iterator.hasNext(); ) {
    TypePattern typePattern=(TypePattern)iterator.next();
    if (typePattern.matchesStatically(classInfo)) {
      return false;
    }
  }
  return true;
}

Fixed version (ground truth):
private boolean acceptAspect(String aspectClassName){
  if (m_aspectExcludeTypePattern.isEmpty()) {
    return true;
  }
  ResolvedType classInfo=weaver.getWorld().resolve(UnresolvedType.forName(aspectClassName),true);
  for (Iterator iterator=m_aspectExcludeTypePattern.iterator(); iterator.hasNext(); ) {
    TypePattern typePattern=(TypePattern)iterator.next();
    if (typePattern.matchesStatically(classInfo)) {
      return false;
    }
  }
  return true;
}
Program: 9311
Project: 9311
Buggy source:
public boolean shouldDump(String className){
  if (m_dumpTypePattern.isEmpty()) {
    return false;
  }
  ResolvedType classInfo=weaver.getWorld().getCoreType(UnresolvedType.forName(className));
  for (Iterator iterator=m_dumpTypePattern.iterator(); iterator.hasNext(); ) {
    TypePattern typePattern=(TypePattern)iterator.next();
    if (typePattern.matchesStatically(classInfo)) {
      return true;
    }
  }
  return false;
}

Fixed version (ground truth):
public boolean shouldDump(String className){
  if (m_dumpTypePattern.isEmpty()) {
    return false;
  }
  ResolvedType classInfo=weaver.getWorld().resolve(UnresolvedType.forName(className),true);
  for (Iterator iterator=m_dumpTypePattern.iterator(); iterator.hasNext(); ) {
    TypePattern typePattern=(TypePattern)iterator.next();
    if (typePattern.matchesStatically(classInfo)) {
      return true;
    }
  }
  return false;
}
Program: 9312
Project: 9312
Buggy source:
protected boolean accept(String className){
  if (m_excludeTypePattern.isEmpty() && m_includeTypePattern.isEmpty()) {
    return true;
  }
  ResolvedType classInfo=weaver.getWorld().getCoreType(UnresolvedType.forName(className));
  for (Iterator iterator=m_excludeTypePattern.iterator(); iterator.hasNext(); ) {
    TypePattern typePattern=(TypePattern)iterator.next();
    if (typePattern.matchesStatically(classInfo)) {
      return false;
    }
  }
  for (Iterator iterator=m_includeTypePattern.iterator(); iterator.hasNext(); ) {
    TypePattern typePattern=(TypePattern)iterator.next();
    if (!typePattern.matchesStatically(classInfo)) {
      return false;
    }
  }
  return true;
}

Fixed version (ground truth):
protected boolean accept(String className){
  if (m_excludeTypePattern.isEmpty() && m_includeTypePattern.isEmpty()) {
    return true;
  }
  ResolvedType classInfo=weaver.getWorld().resolve(UnresolvedType.forName(className),true);
  for (Iterator iterator=m_excludeTypePattern.iterator(); iterator.hasNext(); ) {
    TypePattern typePattern=(TypePattern)iterator.next();
    if (typePattern.matchesStatically(classInfo)) {
      return false;
    }
  }
  for (Iterator iterator=m_includeTypePattern.iterator(); iterator.hasNext(); ) {
    TypePattern typePattern=(TypePattern)iterator.next();
    if (!typePattern.matchesStatically(classInfo)) {
      return false;
    }
  }
  return true;
}
Program: 9313
Project: 9313
Buggy source:
/** 
 * Create a reference type for a generic type
 */
public ReferenceType(TypeX genericType,World world){
  super(genericType.getSignature(),world);
  genericSignature=genericType.genericSignature;
}

Fixed version (ground truth):
/** 
 * Create a reference type for a generic type
 */
public ReferenceType(TypeX genericType,World world){
  super(genericType.getSignature(),world);
  genericSignature=genericType.genericSignature;
  typeKind=GENERIC;
}
Program: 9314
Project: 9314
Buggy source:
public void setGenericType(ReferenceType rt){
  this.genericType=rt;
}

Fixed version (ground truth):
public void setGenericType(ReferenceType rt){
  genericType=rt;
  if (typeKind == TypeX.SIMPLE) {
    typeKind=TypeX.RAW;
    rawTypeSignature=signature;
  }
}
Program: 9315
Project: 9315
Buggy source:
/** 
 * @param s the String to parse for [on|off|true|false]
 * @param iaxOnError if true and input is bad, throwIllegalArgumentException
 * @return true if input is true, false otherwise
 * @throws IllegalArgumentException if iaxOnError and input is bad
 */
public static boolean parseBoolean(final String input,boolean iaxOnError){
  final String syntax="String_Node_Str";
  if (null == input) {
    return false;
  }
  String lc=input.trim().toLowerCase();
  boolean result=false;
  boolean valid=false;
switch (lc.length()) {
case 2:
    if (valid="String_Node_Str".equals(lc)) {
      result=true;
    }
  break;
case 3:
valid="String_Node_Str".equals(lc);
break;
case 4:
if (valid="String_Node_Str".equals(lc)) {
result=true;
}
break;
case 5:
valid="String_Node_Str".equals(lc);
break;
}
if (iaxOnError && !valid) {
throw new IllegalArgumentException(input + syntax);
}
return result;
}

Fixed version (ground truth):
/** 
 * @param input the String to parse for [on|off|true|false]
 * @param iaxOnError if true and input is bad, throwIllegalArgumentException
 * @return true if input is true, false otherwise
 * @throws IllegalArgumentException if iaxOnError and input is bad
 */
public static boolean parseBoolean(final String input,boolean iaxOnError){
  final String syntax="String_Node_Str";
  if (null == input) {
    return false;
  }
  String lc=input.trim().toLowerCase();
  boolean result=false;
  boolean valid=false;
switch (lc.length()) {
case 2:
    if (valid="String_Node_Str".equals(lc)) {
      result=true;
    }
  break;
case 3:
valid="String_Node_Str".equals(lc);
break;
case 4:
if (valid="String_Node_Str".equals(lc)) {
result=true;
}
break;
case 5:
valid="String_Node_Str".equals(lc);
break;
}
if (iaxOnError && !valid) {
throw new IllegalArgumentException(input + syntax);
}
return result;
}