private static boolean isExprentIndependent(Exprent exprent, MethodWrapper method) {
    List<Exprent> lst = exprent.getAllExprents(true);
    lst.add(exprent);

    for (Exprent expr : lst) {
      switch (expr.type) {
        case Exprent.EXPRENT_VAR -> {
          VarVersionPair varPair = new VarVersionPair((VarExprent)expr);
          if (!method.varproc.getExternalVars().contains(varPair)) {
            String varName = method.varproc.getVarName(varPair);
            if (!varName.equals("this") && !varName.endsWith(".this")) { // FIXME: remove direct comparison with strings
              return false;
            }
          }
        }
        case Exprent.EXPRENT_FIELD -> {
          return false;
        }
      }
    }

    return true;
  }
private static boolean isExprentIndependent(Exprent exprent, MethodWrapper method)