public static <NodeType extends ZyGraphNode<?>> List<NodeType> filterNodes(
      final AbstractZyGraph<NodeType, ?> graph, final Criterion filterBy) {
    final List<NodeType> resultSet = new ArrayList<>();
    internalFilterNodes(graph, filterBy, resultSet);
    return resultSet;
  }
Filter the nodes of an {@code AbstractZyGraph} that match a given filter criterion.

@param graph the graph containing the nodes to be filtered
@param filterBy the criterion to filter by
@return a {@code Collection} of nodes that match the specified criterion. If {@code null}, this
    method only counts the matching nodes.
java/ui/src/main/java/com/google/security/zynamics/bindiff/graph/filter/GraphNodeFilter.java