private static DependencyGraph loadGraphs(int startingAt, String... mainArgs) throws Exception {
    String filename;
    if (mainArgs.length < startingAt + 1) {
      return loadGraph("thread_dependency_graph.ser");
    }

    DependencyGraph result = new DependencyGraph();

    for (int i = startingAt; i < mainArgs.length; i++) {
      filename = mainArgs[i];
      DependencyGraph gr = loadGraph(filename);
      if (gr == null) {
        return null;
      }
      result.addEdges(gr.getEdges());
    }

    return result;
  }
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