Program: 20591
Project: 20591
Buggy source:
private IAnnotationModel processAnnotation(CtAnnotation<? extends Annotation> annotation){
  String simpleName=annotation.getActualAnnotation().annotationType().getSimpleName();
  AnnotationModel annotationModel=new AnnotationModel();
  annotationModel.setName(simpleName);
  Map<String,Object> elementValues=annotation.getElementValues();
  for (  Map.Entry<String,Object> entry : elementValues.entrySet()) {
    String key=entry.getKey();
    if (key == null) {
      continue;
    }
    Object value=entry.getValue();
    ArrayList<CtAnnotation<?>> annotationList=toCtAnnotationList(value);
    if (annotationList != null) {
      int size=annotationList.size();
      IAnnotationModel[] annotationModels=new IAnnotationModel[size];
      for (int i=0; i < size; i++) {
        CtAnnotation<?> subAnnotation=annotationList.get(i);
        IAnnotationModel subAnnotationModel=processAnnotation(subAnnotation);
        annotationModels[i]=subAnnotationModel;
      }
      annotationModel.addValue(key,annotationModels);
    }
 else     if (value instanceof String[]) {
      annotationModel.addValue(key,value);
    }
 else {
      if (value == null) {
        value="String_Node_Str";
      }
 else       if (value instanceof CtLiteral<?>) {
        value=((CtLiteral<?>)value).getValue().toString();
      }
 else       if (value instanceof CtFieldReference<?>) {
        value=((CtFieldReference<?>)value).getActualField().getName();
      }
 else       if (value instanceof CtNewArray<?>) {
        List<?> elements=((CtNewArray<?>)value).getElements();
        int size=elements.size();
        String[] arr=new String[size];
        for (int i=0; i < size; i++) {
          arr[i]=elements.get(i).toString();
        }
      }
      annotationModel.addValue(key,value);
    }
  }
  return annotationModel;
}

Fixed version (ground truth):
private IAnnotationModel processAnnotation(CtAnnotation<? extends Annotation> annotation){
  String simpleName=annotation.getActualAnnotation().annotationType().getSimpleName();
  AnnotationModel annotationModel=new AnnotationModel();
  annotationModel.setName(simpleName);
  Map<String,Object> elementValues=annotation.getElementValues();
  for (  Map.Entry<String,Object> entry : elementValues.entrySet()) {
    String key=entry.getKey();
    if (key == null) {
      continue;
    }
    Object value=entry.getValue();
    ArrayList<CtAnnotation<?>> annotationList=toCtAnnotationList(value);
    if (annotationList != null) {
      int size=annotationList.size();
      IAnnotationModel[] annotationModels=new IAnnotationModel[size];
      for (int i=0; i < size; i++) {
        CtAnnotation<?> subAnnotation=annotationList.get(i);
        IAnnotationModel subAnnotationModel=processAnnotation(subAnnotation);
        annotationModels[i]=subAnnotationModel;
      }
      annotationModel.addValue(key,annotationModels);
    }
 else     if (value instanceof String[]) {
      annotationModel.addValue(key,value);
    }
 else {
      if (value == null) {
        value="String_Node_Str";
      }
 else       if (value instanceof CtLiteral<?>) {
        value=((CtLiteral<?>)value).getValue().toString();
      }
 else       if (value instanceof CtFieldReference<?>) {
        value=((CtFieldReference<?>)value).getActualField().getName();
      }
 else       if (value instanceof CtNewArray<?>) {
        List<?> elements=((CtNewArray<?>)value).getElements();
        int size=elements.size();
        String[] arr=new String[size];
        for (int i=0; i < size; i++) {
          arr[i]=elements.get(i).toString();
        }
        value=arr;
      }
      annotationModel.addValue(key,value);
    }
  }
  return annotationModel;
}