for(String line: beforeLines) {
hunk.addLine(parsePatchLine(line, 2));
}
}
else {
<BUG>while(beforeLineIndex < beforeLines.size() && afterLineIndex < afterLines.size()) {

String beforeLine = beforeLines.get(beforeLineIndex);
String afterLine = afterLines.get(afterLineIndex);
if (beforeLine.startsWith(" ") && afterLine.startsWith(" ")) {
addContextDiffLine(hunk, beforeLine, PatchLine.Type.CONTEXT);</BUG>
beforeLineIndex++;

for(String line: beforeLines) {
hunk.addLine(parsePatchLine(line, 2));
}
}
else {
while(beforeLineIndex < beforeLines.size() || afterLineIndex < afterLines.size()) {
String beforeLine = beforeLineIndex >= beforeLines.size() ? null : beforeLines.get(beforeLineIndex);
String afterLine = afterLineIndex >= afterLines.size() ? null : afterLines.get(afterLineIndex);
if (startsWith(beforeLine, NO_NEWLINE_SIGNATURE) && lastBeforePatchLine != null) {
lastBeforePatchLine.setSuppressNewLine(true);
beforeLineIndex++;
}
else if (startsWith(afterLine, NO_NEWLINE_SIGNATURE) && lastAfterPatchLine != null) {
lastAfterPatchLine.setSuppressNewLine(true);
