SpecialFirstIterationLoop (boolean firstIterationThen, int index, @NotNull List<? extends PsiStatement> statements, @NotNull PsiLocalVariable checkVar) { PsiStatement statement = statements.get(index); PsiIfStatement ifStatement = tryCast(statement, PsiIfStatement.class); if (ifStatement == null) return null; List<PsiStatement> thenStatements = unwrapBlock(ifStatement.getThenBranch()); List<PsiStatement> elseStatements = unwrapBlock(ifStatement.getElseBranch()); return extract(firstIterationThen, index, thenStatements, elseStatements, statements, checkVar); }