@Nullable
  @Override
  public ObjectReference thisObject() throws EvaluateException {
    DebuggerManagerThreadImpl.assertIsManagerThread();
    checkValid();
    try {
      for (int attempt = 0; attempt < 2; attempt++) {
        try {
          if (myThisReference == null) {
            myThisReference = getStackFrame().thisObject();
          }
          break;
        }
        catch (InvalidStackFrameException ignored) {
          clearCaches();
        }
      }
    }
    catch (InternalException e) {
      // suppress some internal errors caused by bugs in specific JDI implementations
      if (e.errorCode() != JvmtiError.INVALID_METHODID && e.errorCode() != JvmtiError.INVALID_SLOT) {
        throw EvaluateExceptionUtil.createEvaluateException(e);
      }
      else {
        LOG.info("Exception while getting this object", e);
      }
    }
    catch (IllegalArgumentException e) {
      LOG.info("Exception while getting this object", e);
    }
    catch (Exception e) {
      if (!getVirtualMachine().canBeModified()) { // do not care in read only vms
        LOG.debug(e);
      }
      else {
        throw e;
      }
    }
    return myThisReference;
  }
@Nullable
  @Override
  public ObjectReference thisObject()