public List<Statement> getNeighbours(EdgeType type, EdgeDirection direction) {
    cancellationManager.checkCanceled();

    Map<EdgeType, List<Statement>> map = direction == EdgeDirection.BACKWARD ? mapPredStates : mapSuccStates;

    List<Statement> res;
    if ((type.mask() & (type.mask() - 1)) == 0) {
      res = map.get(type);
      res = res == null ? new ArrayList<>() : new ArrayList<>(res);
    }
    else {
      res = new ArrayList<>();
      for (EdgeType edgetype : EdgeType.types()) {
        if ((type.mask() & edgetype.mask()) != 0) {
          List<Statement> lst = map.get(edgetype);
          if (lst != null) {
            res.addAll(lst);
          }
        }
      }
    }

    return res;
  }
public List<Statement> getNeighbours(EdgeType type, EdgeDirection direction)