private static SingleDiffNode buildDiffNode(
      final SingleGraph singleGraph,
      final FunctionMatchData functionMatch,
      final RawCombinedFlowGraph<RawCombinedBasicBlock, RawCombinedJump<RawCombinedBasicBlock>>
          flowgraph,
      final RawCombinedBasicBlock combinedBasicblock) {
    SingleDiffNode diffNode = null;
    ZyLabelContent nodeContent = null;

    final Graph2D graph2D = singleGraph.getGraph();
    final RawBasicBlock rawBasicblock = combinedBasicblock.getRawNode(singleGraph.getSide());

    if (rawBasicblock != null) {
      nodeContent =
          ViewFlowGraphBuilder.buildSingleBasicBlockLabelContent(
              functionMatch, flowgraph, combinedBasicblock, singleGraph.getSide());
      final ZyNormalNodeRealizer<SingleDiffNode> nodeRealizer =
          new ZyNormalNodeRealizer<>(nodeContent);

      final CodeNodeRealizerUpdater updater = new CodeNodeRealizerUpdater();
      nodeRealizer.setUpdater(updater);
      updater.setRealizer(nodeRealizer);

      final Node yNode = graph2D.createNode();
      diffNode =
          new SingleDiffBasicBlockNode(yNode, nodeRealizer, rawBasicblock, singleGraph.getSide());

      nodeRealizer.setUserData(new ZyNodeData<>(diffNode));
    }

    return diffNode;
  }
Utility class to remove basic block matches from BinDiff graphs.
java/ui/src/main/java/com/google/security/zynamics/bindiff/graph/helpers/BasicBlockMatchRemover.java