private String normalize(String description) {
    int index = description.indexOf('\n');
    if (index < 0) {
      return description;
    }
    int prev = 0;
    StringBuilder builder = new StringBuilder(description.length() << 1);
    for (;index > 0; index = description.indexOf('\n', prev = index + 1)) {
      builder.append("\n      ").append(description.substring(prev, index));
    }
    if (prev < description.length()) {
      builder.append("\n      ").append(description.substring(prev));
    }
    builder.append("\n    ");
    return builder.toString();
  }
Generates hive-default.xml.template from HiveConf.ConfVars
common/src/java/org/apache/hadoop/hive/ant/GenHiveTemplate.java