Solution:
It seems "ArrayList<ArrayList<Integer>> " this list doesnt have any element at the (0)th postion and now the compiler throws "out of bounds exception" as it doesn't find any element in that postion.
when you try executing bellow code
list.get(0).set(placeHolder.get(k), (int) (Math.random() * (99999) + 1));
your list is empty so you need to iterate through the inner list to set the values for the list.
Further Readings:
https://github.com/owlcs/owlapi/issues/724