boolean (PsiMethodCallExpression call) { while(true) { PsiExpression qualifier = PsiUtil.skipParenthesizedExprDown(call.getMethodExpression().getQualifierExpression()); if (qualifier == null) return false; if (StreamApiUtil.getStreamElementType(qualifier.getType()) == null) return false; String name = call.getMethodExpression().getReferenceName(); if (name == null) return false; if (name.equals("sequential")) return false; if (name.equals("parallel")) return true; if (!(qualifier instanceof PsiMethodCallExpression qualifierCall)) return false; if (PARALLEL_STREAM_SOURCE.test(qualifierCall)) return true; call = qualifierCall; } }