code: public Map<String, Object> getLocals() {
      if (locals == null || locals.length == 0) {
        return null;
      }
  
      Map<String, Object> localsMap = new HashMap<>();
      for (LocalVariable localVariable : locals) {
        if (localVariable != null) {
          localsMap.put(localVariable.getName(), localVariable.getValue());
        }
      }
  
      return localsMap;
    }
docs: Getter.
  
  @return the local variables for this frame.