java.lang.ArrayIndexOutOfBoundsException: 18

The code tries to access element number 18 of an array that does not have an element number 18.

Now you look in the code and determine where this is...