Program: 18261
Project: 18261
Buggy source:
/** 
 * Generate templates for request and response part of an exchange record store in the template store : a customized record AND a velocity macro template 
 * @param fieldSuggestions Fields to replace by template expressions (Velocity expression in this case)
 * @param record The exchange record to templatize
 * @param runName The store name to save the template 
 * @return a templatized record
 * @throws Exception If a problem occurs
 */
public ExchangeRecord templatizeRecord(TemplateFieldSuggestions fieldSuggestions,ExchangeRecord record) throws Exception {
  if (fieldSuggestions == null || record == null) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  for (  AbstractTemplateField field : fieldSuggestions.getTemplateFields()) {
    logger.debug("String_Node_Str" + field.getFieldName() + "String_Node_Str"+ field.getDefaultValue());
    logger.debug("String_Node_Str" + field.getParamType() + "String_Node_Str"+ field.getPathParamPosition());
    if (TemplateFieldType.IN_QUERY_PARAM.equals(field.getParamType())) {
      List<QueryParam> paramList=record.getInMessage().getQueryString().getQueryParams();
      for (      QueryParam param : paramList) {
        if (param.getName().equals(field.getFieldName())) {
          param.setValue(VARIABLE_BEAN_PREFIX + field.getFieldName() + VARIABLE_BEAN_SUFFIX);
          break;
        }
      }
    }
 else     if (TemplateFieldType.IN_PATH_PARAM.equals(field.getParamType())) {
      String path=record.getInMessage().getPath();
      record.getInMessage().setPath(path.replace(field.getDefaultValue(),VARIABLE_BEAN_PREFIX + field.getFieldName() + VARIABLE_BEAN_SUFFIX));
    }
 else     if (TemplateFieldType.IN_CONTENT_PARAM.equals(field.getParamType())) {
    }
 else     if (TemplateFieldType.IN_WSDL_PARAM.equals(field.getParamType())) {
    }
 else {
      logger.debug("String_Node_Str" + field.getParamType() + "String_Node_Str");
    }
  }
  return record;
}

Fixed version (ground truth):
/** 
 * Generate templates for request and response part of an exchange record store in the template store : a customized record AND a velocity macro template 
 * @param fieldSuggestions Fields to replace by template expressions (Velocity expression in this case)
 * @param record The exchange record to templatize
 * @param runName The store name to save the template 
 * @return a templatized record
 * @throws Exception If a problem occurs
 */
public ExchangeRecord templatizeRecord(TemplateFieldSuggestions fieldSuggestions,ExchangeRecord record) throws Exception {
  if (fieldSuggestions == null || record == null) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  for (  AbstractTemplateField field : fieldSuggestions.getTemplateFields()) {
    logger.debug("String_Node_Str" + field.getFieldName() + "String_Node_Str"+ field.getDefaultValue());
    logger.debug("String_Node_Str" + field.getParamType() + "String_Node_Str"+ field.getPathParamPosition());
    if (TemplateFieldType.IN_QUERY_PARAM.equals(field.getParamType())) {
      List<QueryParam> paramList=record.getInMessage().getQueryString().getQueryParams();
      for (      QueryParam param : paramList) {
        if (param.getName().equals(field.getFieldName())) {
          param.setValue(VARIABLE_BEAN_PREFIX + field.getFieldName() + VARIABLE_BEAN_SUFFIX);
          break;
        }
      }
    }
 else     if (TemplateFieldType.IN_PATH_PARAM.equals(field.getParamType())) {
      String path=record.getInMessage().getPath();
      record.getInMessage().setPath(path.replace(field.getDefaultValue(),VARIABLE_BEAN_PREFIX + field.getFieldName() + VARIABLE_BEAN_SUFFIX));
    }
 else     if (TemplateFieldType.IN_CONTENT_PARAM.equals(field.getParamType())) {
    }
 else     if (TemplateFieldType.IN_WSDL_PARAM.equals(field.getParamType())) {
    }
 else     if (TemplateFieldType.OUT_PARAM.equals(field.getParamType())) {
      String rawContent=record.getOutMessage().getMessageContent().getRawContent();
    }
 else {
      logger.debug("String_Node_Str" + field.getParamType() + "String_Node_Str");
    }
  }
  return record;
}