boolean (String start) { if (start.startsWith(DIFF_GIT_HEADER_LINE)) { myGitDiffFormat = true; return true; } if (start.startsWith("--- ") && (myDiffFormat == null || myDiffFormat == DiffFormat.UNIFIED)) { myDiffFormat = DiffFormat.UNIFIED; return true; } else if (start.startsWith(CONTEXT_FILE_PREFIX) && (myDiffFormat == null || myDiffFormat == DiffFormat.CONTEXT)) { myDiffFormat = DiffFormat.CONTEXT; return true; } return false; }