public static void setValue(StackFrame frame, SlotLocalVariable variable, Value value) throws EvaluateException {
    try {
      if (frame instanceof StackFrameImpl) {
        ((StackFrameImpl)frame).setSlotValue(variable, value);
      }
      else {
        final Long frameId = ReflectionUtil.getField(frame.getClass(), frame, long.class, "id");
        final VirtualMachine vm = frame.virtualMachine();
        final Method stateMethod = vm.getClass().getDeclaredMethod("state");
        stateMethod.setAccessible(true);

        Object slotInfoArray = createSlotInfoArraySet(variable.slot(), value);

        Object ps;
        final Object vmState = stateMethod.invoke(vm);
        synchronized (vmState) {
          ps = ourEnqueueMethodSet.invoke(null, vm, frame.thread(), frameId, slotInfoArray);
        }

        ourWaitForReplyMethodSet.invoke(null, vm, ps);
      }
    }
    catch (Exception e) {
      throw new EvaluateException("Unable to set value", e);
    }
  }
public static void setValue(StackFrame frame, SlotLocalVariable variable, Value value)