void () { @Language("Java") String content = """ import java.util.*; import java.util.function.*; import java.util.stream.*; /** @noinspection ConstantConditions*/ class X { List<Integer> testTryCatchInStream(List<String> input) { return input.stream().map(a -> { try { return Integer.parseInt(a); } catch (NumberFormatException ex) { return -1; } }).filter(Objects::nonNull).collect(Collectors.toList()); } } """; PsiJavaFile file = (PsiJavaFile)PsiFileFactory.getInstance(getProject()).createFileFromText("X.java", JavaFileType.INSTANCE, content); PsiMethod method = file.getClasses()[0].getMethods()[0]; PsiCodeBlock body = method.getBody(); assertNotNull(body); var runner = new StandardDataFlowRunner(getProject()); Predicate<StackTraceElement> stackTraceElementCondition = ste -> ste.getClassName().equals(ControlFlowAnalyzer.class.getName()) && ste.getMethodName().equals("processTryWithResources"); BombedProgressIndicator.explodeOnStackElement(stackTraceElementCondition).runBombed(() -> { runner.analyzeMethod(body, DfaListener.EMPTY); fail("Should not be reachable"); }); }