PatchLine (final PatchHunk hunk, final String line, final PatchLine.Type type) { final PatchLine patchLine = new PatchLine(type, line.length() < 2 ? "" : line.substring(2)); hunk.addLine(patchLine); return patchLine; }