I have been trying to implement insertion sort in Java and came across a weird bug in my program. The while loop that did the insertion had the following condition:
while