Program: 85368
Project: 85368
Buggy source:
/** 
 * Converts Class annotations from Dexlib to Jimple.
 * @param h
 * @param classDef
 */
void handleClassAnnotation(ClassDef classDef){
  Set<? extends Annotation> aSet=classDef.getAnnotations();
  if (aSet == null || aSet.isEmpty())   return;
  List<Tag> tags=handleAnnotation(aSet,classDef.getType());
  if (tags == null)   return;
  InnerClassAttribute ica=null;
  for (  Tag t : tags)   if (t != null) {
    if (t instanceof InnerClassTag) {
      if (ica == null) {
        ica=(InnerClassAttribute)clazz.getTag("String_Node_Str");
        if (ica == null) {
          ica=new InnerClassAttribute();
          clazz.addTag(ica);
        }
      }
      ica.add((InnerClassTag)t);
    }
 else     if (t instanceof VisibilityAnnotationTag) {
      VisibilityAnnotationTag vt=(VisibilityAnnotationTag)t;
      for (      AnnotationTag a : vt.getAnnotations()) {
        if (a.getType().equals("String_Node_Str")) {
          for (          AnnotationElem ae : a.getElems()) {
            if (ae instanceof AnnotationAnnotationElem) {
              AnnotationAnnotationElem aae=(AnnotationAnnotationElem)ae;
              AnnotationTag at=(AnnotationTag)aae.getValue();
              Map<String,AnnotationElem> defaults=new HashMap<String,AnnotationElem>();
              for (              AnnotationElem aelem : at.getElems()) {
                defaults.put(aelem.getName(),aelem);
              }
              for (              SootMethod sm : clazz.getMethods()) {
                String methodName=sm.getName();
                if (defaults.containsKey(methodName)) {
                  AnnotationElem e=defaults.get(methodName);
                  e.setName("String_Node_Str");
                  AnnotationDefaultTag d=new AnnotationDefaultTag(e);
                  sm.addTag(d);
                }
              }
            }
          }
        }
      }
      if (!(vt.getVisibility() == AnnotationConstants.RUNTIME_INVISIBLE))       clazz.addTag(vt);
    }
 else {
      clazz.addTag(t);
    }
    Debug.printDbg("String_Node_Str",t,"String_Node_Str",t.getClass());
  }
}

Fixed version (ground truth):
/** 
 * Converts Class annotations from Dexlib to Jimple.
 * @param h
 * @param classDef
 */
void handleClassAnnotation(ClassDef classDef){
  Set<? extends Annotation> aSet=classDef.getAnnotations();
  if (aSet == null || aSet.isEmpty())   return;
  List<Tag> tags=handleAnnotation(aSet,classDef.getType());
  if (tags == null)   return;
  InnerClassAttribute ica=null;
  for (  Tag t : tags)   if (t != null) {
    if (t instanceof InnerClassTag) {
      if (ica == null) {
        ica=(InnerClassAttribute)clazz.getTag("String_Node_Str");
        if (ica == null) {
          ica=new InnerClassAttribute();
          clazz.addTag(ica);
        }
      }
      ica.add((InnerClassTag)t);
    }
 else     if (t instanceof VisibilityAnnotationTag) {
      VisibilityAnnotationTag vt=(VisibilityAnnotationTag)t;
      for (      AnnotationTag a : vt.getAnnotations()) {
        if (a.getType().equals("String_Node_Str")) {
          for (          AnnotationElem ae : a.getElems()) {
            if (ae instanceof AnnotationAnnotationElem) {
              AnnotationAnnotationElem aae=(AnnotationAnnotationElem)ae;
              AnnotationTag at=aae.getValue();
              Map<String,AnnotationElem> defaults=new HashMap<String,AnnotationElem>();
              for (              AnnotationElem aelem : at.getElems()) {
                defaults.put(aelem.getName(),aelem);
              }
              for (              SootMethod sm : clazz.getMethods()) {
                String methodName=sm.getName();
                if (defaults.containsKey(methodName)) {
                  AnnotationElem e=defaults.get(methodName);
                  Type annotationType=getSootType(e);
                  boolean isCorrectType=false;
                  if (annotationType == null)                   isCorrectType=true;
 else {
                    if (annotationType.equals(sm.getReturnType()))                     isCorrectType=true;
                  }
                  if (annotationType.equals(ARRAY_TYPE)) {
                    if (sm.getReturnType() instanceof ArrayType)                     isCorrectType=true;
                  }
                  if (isCorrectType && sm.getParameterCount() == 0) {
                    e.setName("String_Node_Str");
                    AnnotationDefaultTag d=new AnnotationDefaultTag(e);
                    sm.addTag(d);
                    defaults.remove(sm.getName());
                  }
                }
              }
              for (              Entry<String,AnnotationElem> leftOverEntry : defaults.entrySet()) {
                SootMethod found=clazz.getMethodByNameUnsafe(leftOverEntry.getKey());
                AnnotationElem element=leftOverEntry.getValue();
                if (found != null) {
                  element.setName("String_Node_Str");
                  AnnotationDefaultTag d=new AnnotationDefaultTag(element);
                  found.addTag(d);
                }
              }
            }
          }
        }
      }
      if (!(vt.getVisibility() == AnnotationConstants.RUNTIME_INVISIBLE))       clazz.addTag(vt);
    }
 else {
      clazz.addTag(t);
    }
    Debug.printDbg("String_Node_Str",t,"String_Node_Str",t.getClass());
  }
}