code: public @Nonnull SetType getBlockingThreads() {
          Set<ThreadLock> waitingTo = new HashSet<ThreadLock>();
          for (ThreadType thread: threads) {
              if (thread.getWaitingToLock() != null) {
                  waitingTo.add(thread.getWaitingToLock());
              }
          }
  
          Set<ThreadType> blocking = new HashSet<ThreadType>();
          for (ThreadType thread: runtime.getThreads()) {
              Set<ThreadLock> threadHolding = thread.getAcquiredLocks();
              threadHolding.retainAll(waitingTo);
              if (!threadHolding.isEmpty()) {
                  blocking.add(thread);
              }
          }
  
          return runtime.getThreadSet(blocking);
      }
docs: Get threads blocking any of current threads.