void (@NotNull PsiMethodCallExpression expression) { if (myDetector.isTerminationCall(expression)) { myTerminationCalls.add(expression); } final PsiElement parent = expression.getParent(); if (!(parent instanceof PsiReferenceExpression)) return; final PsiElement parentCall = parent.getParent(); if (parentCall instanceof PsiMethodCallExpression parentCallExpression && myDetector.isStreamCall((PsiMethodCallExpression)parentCall)) { myPreviousCalls.put(parentCallExpression, expression); updateCallTree(parentCallExpression); } }