void (int @NotNull [] sequence1, int @NotNull [] sequence2, int start1, int count1, int start2, int count2, @NotNull BitSet changes1, @NotNull BitSet changes2) { int index1 = changes1.nextClearBit(start1); int index2 = changes2.nextClearBit(start2); while (index1 < start1 + count1 || index2 < start2 + count2) { assertTrue(index1 < start1 + count1); assertTrue(index2 < start2 + count2); assertEquals(sequence1[index1], sequence2[index2]); index1 = changes1.nextClearBit(index1 + 1); index2 = changes2.nextClearBit(index2 + 1); } assertTrue(index1 >= start1 + count1 && index2 >= start2 + count2); }