private CallGraphViewData loadCallGraphViewData(final Diff diff) throws GraphCreationException {
    // Note: Primary and secondary raw call graphs are already loaded with the diff itself.
    final RawCallGraph primaryCallGraph = diff.getCallGraph(ESide.PRIMARY);
    final RawCallGraph secondaryCallGraph = diff.getCallGraph(ESide.SECONDARY);

    setDescription("Building raw call graph...");
    RawCombinedCallGraph combinedCallGraph =
        RawCombinedCallGraphBuilder.buildCombinedCallgraph(
            diff.getMatches(), primaryCallGraph, secondaryCallGraph);

    setDescription("Building view call graph...");
    final GraphsContainer graphs =
        ViewCallGraphBuilder.buildDiffCallGraphs(diff, combinedCallGraph);

    final DiffMetadata meta = diff.getMetadata();
    final CallGraphViewData view =
        new CallGraphViewData(
            primaryCallGraph,
            secondaryCallGraph,
            graphs,
            FlowGraphViewData.getViewName(graphs),
            meta.getDisplayName(ESide.PRIMARY),
            meta.getDisplayName(ESide.SECONDARY),
            EViewType.FUNCTION_DIFF_VIEW);

    diff.getViewManager().addView(view);

    return view;
  }
Loads call graphs into a new view.
java/ui/src/main/java/com/google/security/zynamics/bindiff/project/diff/CallGraphViewLoader.java