boolean (PsiCatchSection catchSection) { final PsiCatchSection[] catchSections = catchSection.getTryStatement().getCatchSections(); if (catchSections.length < 2) return false; final boolean newLine = containsNewLine(catchSections[0].getPrevSibling()); for (int i = 1; i < catchSections.length; i++) { if (newLine != containsNewLine(catchSections[i].getPrevSibling())) return false; } return true; }