I found a solution. Apparently clearing the list 'transitions' (type ArrayList<Transition>) in QuickSort.java before sorting solves this issue.