Finding articulations points and biconnected components in a graph (in Java)