DataflowResult (@Nullable PsiElement block) { if (block == null) return new DataflowResult(RunnerResult.NOT_APPLICABLE); StandardDataFlowRunner runner = new StandardDataFlowRunner(block.getProject(), ThreeState.UNSURE); var interceptor = new CommonDataflowListener(); RunnerResult result = runner.analyzeMethodRecursively(block, interceptor); if (result != RunnerResult.OK) return new DataflowResult(result); if (!(block instanceof PsiClass)) return interceptor.myResult; DataflowResult dfr = interceptor.myResult.copy(); List<DfaMemoryState> states = interceptor.myEndOfInitializerStates; for (PsiMethod method : ((PsiClass)block).getConstructors()) { List<DfaMemoryState> initialStates; PsiCodeBlock body = method.getBody(); if (body == null) continue; PsiMethodCallExpression call = JavaPsiConstructorUtil.findThisOrSuperCallInConstructor(method); if (JavaPsiConstructorUtil.isChainedConstructorCall(call) || (call == null && hasImplicitImpureSuperCall((PsiClass)block, method))) { initialStates = Collections.singletonList(runner.createMemoryState()); } else { initialStates = ContainerUtil.map(states, DfaMemoryState::createCopy); } if(runner.analyzeBlockRecursively(body, initialStates, interceptor) == RunnerResult.OK) { dfr = interceptor.myResult.copy(); } else { interceptor.myResult = dfr; } } return dfr; }