IndexOutOfBoundsException observed in ProcessStats

Sometime, IndexOutOfBoundsException is observed in ProcessStats
while allocating longs array. This could be due to synchronization.
This fix will return if array index is >= size.

Change-Id: I1302e6b88a3e94249f811fe682f1b0944b5d4e8a