Out of bounds exception
I think the getSize function in HashCounter is going too large because later when trying to sort the output array, the upper bound of the array isn't allocated. Trying an upper bound 1000 elements less prevents the exception, but is obviously not an acceptable solution.