Program: 38219
Project: 38219
Buggy source:
@Override public Response execute(){
  ArrayList<AnnotationInformation> annotations=new ArrayList<AnnotationInformation>();
  DatabaseAccessor accessor=null;
  Map<String,Integer> a=null;
  try {
    accessor=new DatabaseAccessor(DatabaseSettings.mc333_username,DatabaseSettings.mc333_password,DatabaseSettings.mc333_host,DatabaseSettings.mc333_database);
    a=accessor.getAnnotations();
    System.out.println("String_Node_Str");
  }
 catch (  SQLException e) {
    e.printStackTrace();
    System.exit(1);
  }
  Iterator<String> keys=a.keySet().iterator();
  ArrayList<String> annotation_names=new ArrayList<String>();
  while (keys.hasNext()) {
    annotation_names.add(keys.next());
  }
  for (int i=0; i < annotation_names.size(); i++) {
    ArrayList<String> values=null;
    try {
      if (accessor.getAnnotationType(annotation_names.get(i)).equals("String_Node_Str")) {
        values=new ArrayList<String>();
        values.add("String_Node_Str");
      }
 else       if (accessor.getAnnotationType(annotation_names.get(i)).equals("String_Node_Str")) {
        values=(ArrayList<String>)accessor.getChoices(annotation_names.get(i));
      }
    }
 catch (    SQLException e1) {
      e1.printStackTrace();
    }
    AnnotationInformation annotation=new AnnotationInformation(0,annotation_names.get(i),values,true);
    annotations.add(annotation);
  }
  Collections.sort(annotations,new compareAnnotations());
  for (int i=0; i < annotations.size(); i++) {
    annotations.get(i).setId(i);
  }
  for (int i=0; i < annotations.size(); i++) {
    System.out.println("String_Node_Str" + annotations.get(i));
  }
  return new GetAnnotationInformationResponse(200,annotations);
}

Fixed version (ground truth):
@Override public Response execute(){
  ArrayList<AnnotationInformation> annotations=new ArrayList<AnnotationInformation>();
  DatabaseAccessor accessor=null;
  Map<String,Integer> a=null;
  try {
    accessor=new DatabaseAccessor(DatabaseSettings.mc333_username,DatabaseSettings.mc333_password,DatabaseSettings.mc333_host,DatabaseSettings.mc333_database);
    a=accessor.getAnnotations();
    System.out.println("String_Node_Str");
  }
 catch (  SQLException e) {
    e.printStackTrace();
    System.exit(1);
  }
  Iterator<String> keys=a.keySet().iterator();
  ArrayList<String> annotation_names=new ArrayList<String>();
  while (keys.hasNext()) {
    annotation_names.add(keys.next());
  }
  for (int i=0; i < annotation_names.size(); i++) {
    ArrayList<String> values=null;
    try {
      if (accessor.getAnnotationType(annotation_names.get(i)) == DatabaseAccessor.FREETEXT) {
        values=new ArrayList<String>();
        values.add("String_Node_Str");
      }
 else       if (accessor.getAnnotationType(annotation_names.get(i)) == DatabaseAccessor.DROPDOWN) {
        values=(ArrayList<String>)accessor.getChoices(annotation_names.get(i));
      }
 else {
      }
    }
 catch (    SQLException e1) {
      e1.printStackTrace();
    }
    AnnotationInformation annotation=new AnnotationInformation(0,annotation_names.get(i),values,true);
    annotations.add(annotation);
  }
  Collections.sort(annotations,new compareAnnotations());
  for (int i=0; i < annotations.size(); i++) {
    annotations.get(i).setId(i);
  }
  for (int i=0; i < annotations.size(); i++) {
    System.out.println("String_Node_Str" + annotations.get(i));
  }
  return new GetAnnotationInformationResponse(200,annotations);
}