code: static void putIfNotSet(Map<String, String> target, Map<String, String> defaults) {
      for (final String key : defaults.keySet()) {
        if (!target.containsKey(key)) {
          target.put(key, defaults.get(key));
        }
      }
    }
docs: Update a given map with some default values if not already present in map.
  
  @param target   the map to be filled with values, if a key for them is not set already.
  @param defaults the list of defaults, to be set.