If you want to remove all elements from a collection c, use c.clear, not c.removeAll(c).
c
c.clear
c.removeAll(c)