When the list is empty, its size() is = 0.
it’s empty. Nada. Nothing. Niente.
So when you say bulletList.get(0)
you try to access an element that isn’t there (number 0).
This gives you an error.
(apparently it works when you pressed the mouse because then the ArrayList has an entry or a few entries)
TRY
println(bulletList.size());