void (@NotNull ControlFlow flow, int start, int end, @NotNull IntList exitPoints, @NotNull Collection<? super PsiStatement> exitStatements, @NotNull BranchingInstruction instruction, final PsiStatement statement, Class<? extends PsiStatement> @NotNull ... classesFilter) { if (statement == null) return; int gotoOffset = instruction.offset; if (start > gotoOffset || gotoOffset >= end || isElementOfClass(statement, classesFilter)) { // process chain of goto's gotoOffset = promoteThroughGotoChain(flow, gotoOffset); if (gotoOffset > 0 && (gotoOffset >= end || gotoOffset < start) && !exitPoints.contains(gotoOffset)) { exitPoints.add(gotoOffset); } if (gotoOffset >= end || gotoOffset < start) { processGotoStatement(exitStatements, statement, classesFilter); } else { boolean isReturn = instruction instanceof GoToInstruction && ((GoToInstruction)instruction).isReturn; final Instruction gotoInstruction = flow.getInstructions().get(gotoOffset); isReturn |= gotoInstruction instanceof GoToInstruction && ((GoToInstruction)gotoInstruction).isReturn; if (isReturn) { processGotoStatement(exitStatements, statement, classesFilter); } } } }