code: public List<MonitorInfo> getMonitorLockedElements(final ThreadInfo threadInfo,
                                                      final StackTraceElement stackTraceElement) {
      final Map<StackTraceElement, List<MonitorInfo>> elementMap = monitorLockedElements.get(threadInfo);
      if (null == elementMap) {
        return Collections.EMPTY_LIST;
      }
  
      final List<MonitorInfo> monitorList = elementMap.get(stackTraceElement);
      if (null == monitorList) {
        return Collections.EMPTY_LIST;
      }
  
      return monitorList;
    }
docs: Get a list of monitor locks that were acquired by this thread at this stack element.
  @param threadInfo The thread that created the stack element
  @param stackTraceElement The stack element
  @return List of monitor locks that were acquired by this thread at this stack element
  or an empty list if none were acquired