public static List<CombinedDiffNode> getAffectedCombinedNodes(final BinDiffGraph<?, ?> graph) {
    final List<CombinedDiffNode> combinedNodes = new ArrayList<>();

    if (graph instanceof CombinedGraph) {
      for (final CombinedDiffNode node : ((CombinedGraph) graph).getSelectedNodes()) {
        if (node.getRawNode().getMatchState() == EMatchState.MATCHED) {
          combinedNodes.add(node);
        }
      }
    } else if (graph instanceof SingleGraph) {
      for (final SingleDiffNode node : ((SingleGraph) graph).getSelectedNodes()) {
        if (node.getRawNode().getMatchState() == EMatchState.MATCHED) {
          if (node.isSelected()
              && node.isVisible()
              && node.getOtherSideDiffNode().isSelected()
              && node.getOtherSideDiffNode().isVisible()) {
            combinedNodes.add(node.getCombinedDiffNode());
          }
        }
      }
    }

    if (combinedNodes.size() != 0) {
      return combinedNodes;
    }

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