private static boolean stackContainsAnyObsoleteMethod(SuspendContextImpl context,
                                                        ReferenceType declaringType,
                                                        ObjectReference thisObj) {
    ThreadReferenceProxyImpl thread = context.getThread();
    if (thread == null) {
      return false;
    }
    try {
      List<StackFrameProxyImpl> frames = thread.frames();
      if (frames.size() == 1) {
        return false;
      }
      for (StackFrameProxyImpl frame : frames.subList(1, frames.size())) {
        Method method = frame.location().method();
        if (method.isObsolete() && method.declaringType().equals(declaringType)) {
          return thisObj == null || thisObj.equals(frame.thisObject());
        }
      }
    }
    catch (EvaluateException e) {
      DebuggerUtilsImpl.logError(e);
    }
    return false;
  }
private static boolean stackContainsAnyObsoleteMethod(SuspendContextImpl context,
                                                        ReferenceType declaringType,
                                                        ObjectReference thisObj)