@Override
    public void visitReferenceExpression(@NotNull PsiReferenceExpression expression) {
      super.visitReferenceExpression(expression);
      // Case: variable.close()
      if (!ignoreResourcesWithClose) {
        return;
      }
      if (!ExpressionUtils.isReferenceTo(expression, boundVariable)) return;
      PsiMethodCallExpression call = ExpressionUtils.getCallForQualifier(expression);
      if (call == null) return;
      String callName = call.getMethodExpression().getReferenceName();
      if ("close".equals(callName) && !canBeCloseOutsideLoop(call)) {
        escaped = true;
      }
    }
@Override
    public void visitReferenceExpression(@NotNull PsiReferenceExpression expression)