Set<PsiSwitchLabelStatementBase> (PsiCodeBlock body) { return StreamEx.of(body.getStatements()) .pairMap((s1, s2) -> s2 instanceof PsiSwitchLabelStatement labelStatement && !(s1 instanceof PsiSwitchLabeledRuleStatement) && ControlFlowUtils.statementMayCompleteNormally(s1) ? labelStatement : null) .nonNull().collect(Collectors.toSet()); }