code: String replace(String source) {
          if (source == null)
              return null;
          Matcher m = PATTERN.matcher(source);
          StringBuffer sb = new StringBuffer();
          while (m.find()) {
              String var = m.group(1);
              String value = values.getProperty(var);
              String replacement = (value != null) ? replace(value) : "";
              m.appendReplacement(sb, Matcher.quoteReplacement(replacement));
          }
          m.appendTail(sb);
          return sb.toString();
      }
docs: Replaces all the occurrences of variables with their matching values from the resolver using the given source
  string as a template.
  
  @param source the string to replace in, null returns null
  @return the result of the replace operation