code: private VarInfo getVarInfo(Var var) {
      checkNotNull(var);
      boolean isGlobal = var.isGlobal();
      if (var.isExtern()) {
        return canonicalUnremovableVarInfo;
      } else if (isGlobal && !removeGlobals) {
        return canonicalUnremovableVarInfo;
      } else if (!isGlobal && !removeLocalVars) {
        return canonicalUnremovableVarInfo;
      } else if (codingConvention.isExported(var.getName(), !isGlobal)) {
        return canonicalUnremovableVarInfo;
      } else if (var.isArguments()) {
        return canonicalUnremovableVarInfo;
      } else {
        VarInfo varInfo = varInfoMap.get(var);
        if (varInfo == null) {
          varInfo = new VarInfo();
          if (var.getParentNode().isParamList()) {
            varInfo.hasNonLocalOrNonLiteralValue = true;
          }
          varInfoMap.put(var, varInfo);
        }
        return varInfo;
      }
    }
docs: Get the right {@link VarInfo} object to use for the given {@link Var}.
  
  <p>This method is responsible for managing the entries in {@link #varInfoMap}.
  <p>Note: Several {@link Var}s may share the same {@link VarInfo} when they should be treated
  the same way.