code: public static String replace(final Object source, final Properties valueProperties) {
          if (valueProperties == null) {
              return source.toString();
          }
          final Map<String,String> valueMap = new HashMap<>();
          final Enumeration<?> propNames = valueProperties.propertyNames();
          while (propNames.hasMoreElements()) {
              final String propName = (String)propNames.nextElement();
              final String propValue = valueProperties.getProperty(propName);
              valueMap.put(propName, propValue);
          }
          return StrSubstitutor.replace(source, valueMap);
      }
docs: Replaces all the occurrences of variables in the given source object with their matching
  values from the properties.
  
  @param source the source text containing the variables to substitute, null returns null
  @param valueProperties the properties with values, may be null
  @return the result of the replace operation