private static DependencyGraph loadGraph(String filename) throws Exception {
    File file = new File(filename);
    if (!file.exists()) {
      System.err.println("unable to find " + filename);
      ExitCode.DEPENDENCY_GRAPH_FAILURE.doSystemExit();
    }

    try (FileInputStream fileInputStream = new FileInputStream(file);
        BufferedInputStream bufferedInputStream = new BufferedInputStream(fileInputStream);
        ObjectInputStream ois = new DDObjectInputStream(bufferedInputStream)) {
      return (DependencyGraph) ois.readObject();
    }
  }
Get an object suitable for querying the findDependencies method for a given thread.
geode-core/src/main/java/org/apache/geode/distributed/internal/deadlock/DeadlockDetector.java