Program: 9213
Project: 9213
Buggy source:
public AnnotationTargetKind[] getAnnotationTargetKinds(){
  if ((bitflag & DISCOVERED_ANNOTATION_TARGET_KINDS) != 0)   return annotationTargetKinds;
  bitflag|=DISCOVERED_ANNOTATION_TARGET_KINDS;
  annotationTargetKinds=null;
  List targetKinds=new ArrayList();
  if (isAnnotation()) {
    Annotation[] annotationsOnThisType=javaClass.getAnnotations();
    for (int i=0; i < annotationsOnThisType.length; i++) {
      Annotation a=annotationsOnThisType[i];
      if (a.getTypeName().equals(UnresolvedType.AT_TARGET.getName())) {
        ArrayElementValue arrayValue=(ArrayElementValue)((ElementNameValuePair)a.getValues().get(0)).getValue();
        ElementValue[] evs=arrayValue.getElementValuesArray();
        if (evs != null) {
          for (int j=0; j < evs.length; j++) {
            String targetKind=((EnumElementValue)evs[j]).getEnumValueString();
            if (targetKind.equals("String_Node_Str")) {
              targetKinds.add(AnnotationTargetKind.ANNOTATION_TYPE);
            }
 else             if (targetKind.equals("String_Node_Str")) {
              targetKinds.add(AnnotationTargetKind.CONSTRUCTOR);
            }
 else             if (targetKind.equals("String_Node_Str")) {
              targetKinds.add(AnnotationTargetKind.FIELD);
            }
 else             if (targetKind.equals("String_Node_Str")) {
              targetKinds.add(AnnotationTargetKind.LOCAL_VARIABLE);
            }
 else             if (targetKind.equals("String_Node_Str")) {
              targetKinds.add(AnnotationTargetKind.METHOD);
            }
 else             if (targetKind.equals("String_Node_Str")) {
              targetKinds.add(AnnotationTargetKind.PACKAGE);
            }
 else             if (targetKind.equals("String_Node_Str")) {
              targetKinds.add(AnnotationTargetKind.PARAMETER);
            }
 else             if (targetKind.equals("String_Node_Str")) {
              targetKinds.add(AnnotationTargetKind.TYPE);
            }
          }
        }
      }
    }
    if (!targetKinds.isEmpty()) {
      annotationTargetKinds=new AnnotationTargetKind[targetKinds.size()];
      return (AnnotationTargetKind[])targetKinds.toArray(annotationTargetKinds);
    }
  }
  return annotationTargetKinds;
}

Fixed version (ground truth):
public AnnotationTargetKind[] getAnnotationTargetKinds(){
  if ((bitflag & DISCOVERED_ANNOTATION_TARGET_KINDS) != 0)   return annotationTargetKinds;
  bitflag|=DISCOVERED_ANNOTATION_TARGET_KINDS;
  annotationTargetKinds=null;
  List targetKinds=new ArrayList();
  if (isAnnotation()) {
    AnnotationX[] annotationsOnThisType=getAnnotations();
    for (int i=0; i < annotationsOnThisType.length; i++) {
      Annotation a=annotationsOnThisType[i].getBcelAnnotation();
      if (a.getTypeName().equals(UnresolvedType.AT_TARGET.getName())) {
        ArrayElementValue arrayValue=(ArrayElementValue)((ElementNameValuePair)a.getValues().get(0)).getValue();
        ElementValue[] evs=arrayValue.getElementValuesArray();
        if (evs != null) {
          for (int j=0; j < evs.length; j++) {
            String targetKind=((EnumElementValue)evs[j]).getEnumValueString();
            if (targetKind.equals("String_Node_Str")) {
              targetKinds.add(AnnotationTargetKind.ANNOTATION_TYPE);
            }
 else             if (targetKind.equals("String_Node_Str")) {
              targetKinds.add(AnnotationTargetKind.CONSTRUCTOR);
            }
 else             if (targetKind.equals("String_Node_Str")) {
              targetKinds.add(AnnotationTargetKind.FIELD);
            }
 else             if (targetKind.equals("String_Node_Str")) {
              targetKinds.add(AnnotationTargetKind.LOCAL_VARIABLE);
            }
 else             if (targetKind.equals("String_Node_Str")) {
              targetKinds.add(AnnotationTargetKind.METHOD);
            }
 else             if (targetKind.equals("String_Node_Str")) {
              targetKinds.add(AnnotationTargetKind.PACKAGE);
            }
 else             if (targetKind.equals("String_Node_Str")) {
              targetKinds.add(AnnotationTargetKind.PARAMETER);
            }
 else             if (targetKind.equals("String_Node_Str")) {
              targetKinds.add(AnnotationTargetKind.TYPE);
            }
          }
        }
      }
    }
    if (!targetKinds.isEmpty()) {
      annotationTargetKinds=new AnnotationTargetKind[targetKinds.size()];
      return (AnnotationTargetKind[])targetKinds.toArray(annotationTargetKinds);
    }
  }
  return annotationTargetKinds;
}