private void createSingleFunctionDiffFlowGraphView(
      Diff diff,
      FunctionMatchData functionMatch,
      RawFlowGraph priFlowGraph,
      RawFlowGraph secFlowGraph,
      RawCombinedFlowGraph<RawCombinedBasicBlock, RawCombinedJump<RawCombinedBasicBlock>>
          combinedFlowGraph)
      throws GraphCreationException {
    GraphsContainer graphs =
        ViewFlowGraphBuilder.buildViewFlowGraphs(diff, functionMatch, combinedFlowGraph);

    RawFunction priFunction =
        diff.getFunction(functionMatch.getIAddress(ESide.PRIMARY), ESide.PRIMARY);
    RawFunction secFunction =
        diff.getFunction(functionMatch.getIAddress(ESide.SECONDARY), ESide.SECONDARY);

    String name = diff.getMatchesDatabase().getName();
    name =
        BinDiffFileUtils.forceFilenameEndsNotWithExtension(
            name, Constants.BINDIFF_MATCHES_DB_EXTENSION);

    if (!workspace.isLoaded()
        || diff.getMatchesDatabase().getParent().indexOf(workspace.getWorkspaceDirPath()) != 0) {
      name = String.format("%s vs %s", priFunction.getName(), secFunction.getName());
    }

    viewData =
        new FlowGraphViewData(
            priFlowGraph,
            secFlowGraph,
            combinedFlowGraph,
            graphs,
            name,
            EViewType.SINGLE_FUNCTION_DIFF_VIEW);

    diff.getViewManager().addView(viewData);

    var viewTabPanel =
        new FunctionDiffViewTabPanel(
            window, tabPanelManager, workspace, diff, functionMatch, viewData);

    try {
      ViewTabPanelInitializer.initialize(viewData.getGraphs(), this);
    } catch (RuntimeException e) {
      throw new GraphCreationException(e, "An error occurred while initializing the graph.");
    }

    tabPanelManager.addTab(viewTabPanel);

    ViewTabPanelInitializer.centerSingleGraphs(viewData.getGraphs().getSuperGraph());
    ViewTabPanelInitializer.centerCombinedGraph(viewData.getGraphs(), viewTabPanel);

    tabPanelManager.selectTab(viewTabPanel);
  }
Loads flow graphs into a new view.
java/ui/src/main/java/com/google/security/zynamics/bindiff/project/diff/FunctionDiffViewLoader.java