void (boolean includeEndChange) { int outputOffset = myDataEndOffset; int prevChangeStart = -1; for (int i = myChangeGroupEndIndex; i >= myChangeGroupStartIndex; i--) { TextChangeImpl change = myChanges.get(i); if (prevChangeStart >= 0) { int length = prevChangeStart - change.getEnd(); System.arraycopy(myData, change.getEnd(), myData, outputOffset - length, length); outputOffset -= length; } prevChangeStart = change.getStart(); if (i == myChangeGroupEndIndex && !includeEndChange) { continue; } int length = change.getText().length(); if (length > 0) { CharArrayUtil.getChars(change.getText(), myData, outputOffset - length); outputOffset -= length; } } }