Program: 85196
Project: 85196
Buggy source:
private SootMethod tryResolve(StringBuffer trace){
  if (declaringClass.getName().equals("String_Node_Str")) {
    throw new IllegalStateException("String_Node_Str");
  }
  SootClass cl=declaringClass;
  while (true) {
    if (trace != null) {
      trace.append("String_Node_Str" + cl + "String_Node_Str"+ cl.getMethods()+ "String_Node_Str");
    }
    SootMethod sm=cl.getMethodUnsafe(getSubSignature());
    if (sm != null) {
      return checkStatic(sm);
    }
    if (Scene.v().allowsPhantomRefs() && (cl.isPhantom() || Options.v().ignore_resolution_errors())) {
      SootMethod m=Scene.v().makeSootMethod(name,parameterTypes,returnType,isStatic() ? Modifier.STATIC : 0);
      m.setPhantom(true);
      m=cl.getOrAddMethod(m);
      return checkStatic(m);
    }
    if (cl.hasSuperclass()) {
      cl=cl.getSuperclass();
    }
 else {
      break;
    }
  }
  cl=declaringClass;
  while (true) {
    ArrayDeque<SootClass> queue=new ArrayDeque<SootClass>();
    queue.addAll(cl.getInterfaces());
    while (true) {
      SootClass iface=queue.poll();
      if (iface == null) {
        break;
      }
      if (trace != null) {
        trace.append("String_Node_Str" + iface + "String_Node_Str"+ iface.getMethods()+ "String_Node_Str");
      }
      SootMethod sm=iface.getMethodUnsafe(getSubSignature());
      if (sm != null) {
        return checkStatic(sm);
      }
      queue.addAll(iface.getInterfaces());
    }
    if (cl.hasSuperclass()) {
      cl=cl.getSuperclass();
    }
 else {
      break;
    }
  }
  return null;
}

Fixed version (ground truth):
private SootMethod tryResolve(StringBuffer trace){
  if (declaringClass.getName().equals("String_Node_Str")) {
    throw new IllegalStateException("String_Node_Str");
  }
  SootClass cl=declaringClass;
  while (cl != null) {
    if (trace != null) {
      trace.append("String_Node_Str" + cl + "String_Node_Str"+ cl.getMethods()+ "String_Node_Str");
    }
    SootMethod sm=cl.getMethodUnsafe(getSubSignature());
    if (sm != null) {
      return checkStatic(sm);
    }
    if (Scene.v().allowsPhantomRefs() && cl.isPhantom()) {
      SootMethod m=Scene.v().makeSootMethod(name,parameterTypes,returnType,isStatic() ? Modifier.STATIC : 0);
      m.setPhantom(true);
      m=cl.getOrAddMethod(m);
      return checkStatic(m);
    }
    cl=cl.getSuperclassUnsafe();
  }
  cl=declaringClass;
  while (cl != null) {
    ArrayDeque<SootClass> queue=new ArrayDeque<SootClass>();
    queue.addAll(cl.getInterfaces());
    while (!queue.isEmpty()) {
      SootClass iface=queue.poll();
      if (trace != null) {
        trace.append("String_Node_Str" + iface + "String_Node_Str"+ iface.getMethods()+ "String_Node_Str");
      }
      SootMethod sm=iface.getMethodUnsafe(getSubSignature());
      if (sm != null) {
        return checkStatic(sm);
      }
      queue.addAll(iface.getInterfaces());
    }
    cl=cl.getSuperclassUnsafe();
  }
  if (cl == null && Scene.v().allowsPhantomRefs() && Options.v().ignore_resolution_errors()) {
    SootMethod m=Scene.v().makeSootMethod(name,parameterTypes,returnType,isStatic() ? Modifier.STATIC : 0);
    m.setPhantom(true);
    m=declaringClass.getOrAddMethod(m);
    return checkStatic(m);
  }
  return null;
}