Integer (@NotNull PsiExpression expression, PsiVariable targetBuilder) { PsiMethodCallExpression maybeEmptyCall = tryCast(BoolUtils.getNegated(expression), PsiMethodCallExpression.class); if (!EMPTY_LENGTH.test(maybeEmptyCall)) return null; // extract call matcher if (!ExpressionUtils.isReferenceTo(maybeEmptyCall.getMethodExpression().getQualifierExpression(), targetBuilder)) return null; return 0; }