Program: 9290
Project: 9290
Buggy source:
/** 
 * TODO: probably want to make this the same for intros and advice.
 */
static String generateAffects(IProgramElement decl,boolean isIntroduction){
  List targets=StructureUtil.getTargets(decl,IRelationship.Kind.ADVICE);
  if (targets == null)   return null;
  List packageList=new ArrayList();
  String entry="String_Node_Str" + "String_Node_Str";
  String relativePackagePath=getRelativePathFromHere(decl.getPackageName().replace('.','/') + Config.DIR_SEP_CHAR);
  List addedNames=new ArrayList();
  for (Iterator it=targets.iterator(); it.hasNext(); ) {
    String currHandle=(String)it.next();
    IProgramElement currDecl=AsmManager.getDefault().getHierarchy().findElementForHandle(currHandle);
    if (currDecl.getKind().equals(IProgramElement.Kind.CODE)) {
      currDecl=currDecl.getParent();
    }
    if (currDecl != null && !StructureUtil.isAnonymous(currDecl.getParent())) {
      String packagePath="String_Node_Str";
      if (currDecl.getPackageName() != null && !currDecl.getPackageName().equals("String_Node_Str")) {
        packagePath=currDecl.getPackageName().replace('.','/') + Config.DIR_SEP_CHAR;
      }
      String typeSignature=constructNestedTypeName(currDecl);
      String hrefName=packagePath + typeSignature;
      String hrefLink=relativePackagePath + packagePath + typeSignature+ "String_Node_Str";
      if (!currDecl.getKind().isType()) {
        hrefName+='.' + currDecl.getName();
        hrefLink+="String_Node_Str" + currDecl.toLabelString();
      }
      if (!addedNames.contains(hrefName)) {
        entry+="String_Node_Str" + hrefLink + "String_Node_Str"+ hrefName.replace('/','.')+ "String_Node_Str";
        if (it.hasNext())         entry+="String_Node_Str";
        addedNames.add(hrefName);
      }
    }
  }
  entry+="String_Node_Str";
  return entry;
}

Fixed version (ground truth):
/** 
 * TODO: probably want to make this the same for intros and advice.
 */
static String generateAffects(IProgramElement decl,boolean isIntroduction){
  List targets=null;
  if (isIntroduction) {
    targets=StructureUtil.getDeclareTargets(decl);
  }
 else {
    targets=StructureUtil.getTargets(decl,IRelationship.Kind.ADVICE);
  }
  if (targets == null)   return "String_Node_Str";
  String entry="String_Node_Str";
  if (!isIntroduction) {
    entry+="String_Node_Str";
  }
 else {
    entry+="String_Node_Str";
  }
  String relativePackagePath=getRelativePathFromHere(decl.getPackageName().replace('.','/') + Config.DIR_SEP_CHAR);
  List addedNames=new ArrayList();
  for (Iterator it=targets.iterator(); it.hasNext(); ) {
    String currHandle=(String)it.next();
    IProgramElement currDecl=AsmManager.getDefault().getHierarchy().findElementForHandle(currHandle);
    if (currDecl.getKind().equals(IProgramElement.Kind.CODE)) {
      currDecl=currDecl.getParent();
    }
    if (currDecl != null && !StructureUtil.isAnonymous(currDecl.getParent())) {
      String packagePath="String_Node_Str";
      if (currDecl.getPackageName() != null && !currDecl.getPackageName().equals("String_Node_Str")) {
        packagePath=currDecl.getPackageName().replace('.','/') + Config.DIR_SEP_CHAR;
      }
      String typeSignature=constructNestedTypeName(currDecl);
      String hrefName=packagePath + typeSignature;
      String hrefLink=relativePackagePath + packagePath + typeSignature+ "String_Node_Str";
      if (!currDecl.getKind().isType()) {
        hrefName+='.' + currDecl.getName();
        hrefLink+="String_Node_Str" + currDecl.toLabelString();
      }
      if (!addedNames.contains(hrefName)) {
        entry+="String_Node_Str" + hrefLink + "String_Node_Str"+ hrefName.replace('/','.')+ "String_Node_Str";
        if (it.hasNext())         entry+="String_Node_Str";
        addedNames.add(hrefName);
      }
    }
  }
  entry+="String_Node_Str";
  return entry;
}