code: public void updateSystemVariables(Map<String, ConfigVariable> newVariables) {
          for (String variableName : configVariables.keySet()) {
              if (!newVariables.containsKey(variableName)) {
                  registry.removeVariable(variableName);
              }
          }
          for (Map.Entry<String, ConfigVariable> entry : newVariables.entrySet()) {
              String variableName = entry.getKey();
              String variableValue = entry.getValue().getValue();
              if (variableValue != null)
                  registry.replaceVariable(variableName, variableValue);
              else
                  registry.removeVariable(variableName);
          }
          configVariables = newVariables;
  
          // Override with command line variables if necessary
          for (CommandLineVariable clv : commandLineVariables) {
              registry.replaceVariable(clv.getName(), clv.getValue());
          }
      }
docs: /*
  Override system variables.