void (@NotNull PsiMethodCallExpression expression) { if (queried) return; super.visitMethodCallExpression(expression); final PsiReferenceExpression methodExpression = expression.getMethodExpression(); final String name = methodExpression.getReferenceName(); if (name == null) return; final PsiExpression qualifierExpression = methodExpression.getQualifierExpression(); if (!queryNames.get(builderType).contains(name)) { if (returnSelfNames.get(builderType).contains(name) && hasReferenceToVariable(variable, qualifierExpression, builderType) && isVariableValueUsed(expression)) { queried = true; } return; } if (hasReferenceToVariable(variable, qualifierExpression, builderType)) { PsiElement parent = PsiTreeUtil.getParentOfType(expression, PsiStatement.class, PsiLambdaExpression.class); if (parent instanceof PsiStatement && !SideEffectChecker.mayHaveSideEffects( parent, e -> e instanceof PsiMethodCallExpression && isSideEffectFreeBuilderMethodCall((PsiMethodCallExpression)e))) { return; } queried = true; } }