@Override
    public void visitMethodCallExpression(
      @NotNull PsiMethodCallExpression call) {
      if (containsUnlock) {
        return;
      }
      super.visitMethodCallExpression(call);
      final PsiReferenceExpression methodExpression =
        call.getMethodExpression();
      @NonNls final String methodName =
        methodExpression.getReferenceName();
      if (!"unlock".equals(methodName)) {
        return;
      }
      final PsiExpression qualifier =
        methodExpression.getQualifierExpression();
      if (qualifier instanceof PsiReferenceExpression reference) {
        if (type != LockType.REGULAR) {
          return;
        }
        final PsiElement target = reference.resolve();
        if (variable.equals(target)) {
          containsUnlock = true;
        }
      }
      else if (qualifier instanceof PsiMethodCallExpression methodCallExpression) {
        final PsiReferenceExpression methodExpression1 =
          methodCallExpression.getMethodExpression();
        @NonNls final String methodName1 =
          methodExpression1.getReferenceName();
        if (type == LockType.READ && "readLock".equals(methodName1) ||
            type == LockType.WRITE &&
            "writeLock".equals(methodName1)) {
          final PsiExpression qualifierExpression =
            methodExpression1.getQualifierExpression();
          if (!(qualifierExpression instanceof PsiReferenceExpression referenceExpression)) {
            return;
          }
          final PsiElement target = referenceExpression.resolve();
          if (variable.equals(target)) {
            containsUnlock = true;
          }
        }
      }
    }
@Override
    public void visitMethodCallExpression(
      @NotNull PsiMethodCallExpression call)