Program: 9364
Project: 9364
Buggy source:
private void unpackAspectAttributes(){
  List pointcuts=new ArrayList();
  typeMungers=new ArrayList();
  declares=new ArrayList();
  List l=BcelAttributes.readAjAttributes(javaClass.getAttributes(),getResolvedTypeX().getSourceContext(),getResolvedTypeX().getWorld().getMessageHandler());
  for (Iterator iter=l.iterator(); iter.hasNext(); ) {
    AjAttribute a=(AjAttribute)iter.next();
    if (a instanceof AjAttribute.Aspect) {
      perClause=((AjAttribute.Aspect)a).reify(this.getResolvedTypeX());
    }
 else     if (a instanceof AjAttribute.PointcutDeclarationAttribute) {
      pointcuts.add(((AjAttribute.PointcutDeclarationAttribute)a).reify());
    }
 else     if (a instanceof AjAttribute.WeaverState) {
      weaverState=((AjAttribute.WeaverState)a).reify();
    }
 else     if (a instanceof AjAttribute.TypeMunger) {
      typeMungers.add(((AjAttribute.TypeMunger)a).reify(getResolvedTypeX().getWorld(),getResolvedTypeX()));
    }
 else     if (a instanceof AjAttribute.DeclareAttribute) {
      declares.add(((AjAttribute.DeclareAttribute)a).getDeclare());
    }
 else     if (a instanceof AjAttribute.PrivilegedAttribute) {
      privilegedAccess=((AjAttribute.PrivilegedAttribute)a).getAccessedMembers();
    }
 else     if (a instanceof AjAttribute.SourceContextAttribute) {
      if (getResolvedTypeX().getSourceContext() instanceof BcelSourceContext) {
        ((BcelSourceContext)getResolvedTypeX().getSourceContext()).addAttributeInfo((AjAttribute.SourceContextAttribute)a);
      }
    }
 else     if (a instanceof AjAttribute.WeaverVersionInfo) {
      wvInfo=(AjAttribute.WeaverVersionInfo)a;
      if (wvInfo.getMajorVersion() > WeaverVersionInfo.getCurrentWeaverMajorVersion()) {
        throw new BCException("String_Node_Str" + WeaverVersionInfo.toCurrentVersionString() + "String_Node_Str"+ javaClass.getClassName()+ "String_Node_Str"+ wvInfo.toString());
      }
    }
 else {
      throw new BCException("String_Node_Str" + a);
    }
  }
  this.pointcuts=(ResolvedPointcutDefinition[])pointcuts.toArray(new ResolvedPointcutDefinition[pointcuts.size()]);
}

Fixed version (ground truth):
private void unpackAspectAttributes(){
  List pointcuts=new ArrayList();
  typeMungers=new ArrayList();
  declares=new ArrayList();
  List l=BcelAttributes.readAjAttributes(javaClass.getClassName(),javaClass.getAttributes(),getResolvedTypeX().getSourceContext(),getResolvedTypeX().getWorld().getMessageHandler());
  for (Iterator iter=l.iterator(); iter.hasNext(); ) {
    AjAttribute a=(AjAttribute)iter.next();
    if (a instanceof AjAttribute.Aspect) {
      perClause=((AjAttribute.Aspect)a).reify(this.getResolvedTypeX());
    }
 else     if (a instanceof AjAttribute.PointcutDeclarationAttribute) {
      pointcuts.add(((AjAttribute.PointcutDeclarationAttribute)a).reify());
    }
 else     if (a instanceof AjAttribute.WeaverState) {
      weaverState=((AjAttribute.WeaverState)a).reify();
    }
 else     if (a instanceof AjAttribute.TypeMunger) {
      typeMungers.add(((AjAttribute.TypeMunger)a).reify(getResolvedTypeX().getWorld(),getResolvedTypeX()));
    }
 else     if (a instanceof AjAttribute.DeclareAttribute) {
      declares.add(((AjAttribute.DeclareAttribute)a).getDeclare());
    }
 else     if (a instanceof AjAttribute.PrivilegedAttribute) {
      privilegedAccess=((AjAttribute.PrivilegedAttribute)a).getAccessedMembers();
    }
 else     if (a instanceof AjAttribute.SourceContextAttribute) {
      if (getResolvedTypeX().getSourceContext() instanceof BcelSourceContext) {
        ((BcelSourceContext)getResolvedTypeX().getSourceContext()).addAttributeInfo((AjAttribute.SourceContextAttribute)a);
      }
    }
 else     if (a instanceof AjAttribute.WeaverVersionInfo) {
      wvInfo=(AjAttribute.WeaverVersionInfo)a;
    }
 else {
      throw new BCException("String_Node_Str" + a);
    }
  }
  this.pointcuts=(ResolvedPointcutDefinition[])pointcuts.toArray(new ResolvedPointcutDefinition[pointcuts.size()]);
}