public List<DependencyGraph> findDependenciesWith(String objectName) {

    // first find a dependency containing the node. If we can't find one
    // we can just quit
    Object obj = null;
    Dependency objDep = null;
    for (Dependency dep : edges) {
      if (dep.depender.toString().contains(objectName)) {
        obj = dep.depender;
        objDep = dep;
        break;
      }
      if (dep.dependsOn.toString().contains(objectName)) {
        obj = dep.dependsOn;
        objDep = dep;
        break;
      }
    }
    if (obj == null) {
      return Collections.emptyList();
    }

    // expand the dependency set to include all incoming
    // references, references to those references, etc.
    // This should give us a collection that includes all
    // top-level nodes that have no references to them
    Set<Object> dependsOnObj = new HashSet<>();
    dependsOnObj.add(obj);
    boolean anyAdded = true;
    while (anyAdded) {
      anyAdded = false;
      for (Dependency dep : edges) {
        if (dependsOnObj.contains(dep.dependsOn) && !dependsOnObj.contains(dep.depender)) {
          anyAdded = true;
          dependsOnObj.add(dep.depender);
        }
      }
    }

    // find all terminal nodes having no incoming
    // dependers.
    Set<Object> allDependents = new HashSet<>();
    for (Dependency dep : edges) {
      if ((dep.dependsOn instanceof LocalThread)) {
        if (dep.depender instanceof MessageKey) {
          allDependents.add(dep.dependsOn);
        }
      } else {
        allDependents.add(dep.dependsOn);
      }
    }

    List<DependencyGraph> result = new LinkedList<>();
    for (Object depender : dependsOnObj) {
      if (!allDependents.contains(depender)) {
        result.add(getSubGraph(depender));
      }
    }

    return result;
  }
This returns a collection of top-level threads and their path to the given object. The object
name is some substring of the toString of the object
geode-core/src/main/java/org/apache/geode/distributed/internal/deadlock/DependencyGraph.java