When you run getTwoPair
the first operation you do is checkPair(hand);
This finds the pair (the one you want) removes it, then tries to check again. When this check fails, it returns.
After the return you're left with (1) a hand that has the pair removed and (2) a null return from getTwoPair
. This result leaves you with a condition that causes the main flow to continue, yet fail on finding the single pair, since it was removed.
I suggest making a copy of the array list to search on. If you fail to find two pairs, simply return the original array. If you find tow pairs, return the modified array.