Program: 35784
Project: 35784
Buggy source:
/** 
 * @param page Address of the page containing the template
 * @param parameters parameters to be added to the request
 * @param writer Writer where to write the result
 * @param request originating request object
 * @param renderers the renderers to use to transform the output
 * @throws IOException If an IOException occurs while writing to the writer
 * @throws HttpErrorPage If an Exception occurs while retrieving the template
 */
protected final void render(String page,Map<String,String> parameters,Appendable writer,HttpRequest request,HttpResponse response,Renderer... renderers) throws IOException, HttpErrorPage {
  if (LOG.isInfoEnabled()) {
    String renderersList="String_Node_Str";
    for (int i=0; i < renderers.length; i++) {
      renderersList=renderersList + renderers[i].getClass().getName() + "String_Node_Str";
    }
    LOG.info("String_Node_Str" + config.getInstanceName() + "String_Node_Str"+ page+ renderersList);
  }
  String resultingpage=VariablesResolver.replaceAllVariables(page,request);
  ResourceContext resourceContext=new ResourceContext(this,resultingpage,parameters,request,response);
  resourceContext.setPreserveHost(config.isPreserveHost());
  StringOutput stringOutput=getResourceAsString(resourceContext);
  String currentValue=stringOutput.toString();
  if (config.isFixResources()) {
    ResourceFixupRenderer fixup=new ResourceFixupRenderer(config.getBaseURL(),config.getVisibleBaseURL(),page,config.getFixMode());
    StringWriter stringWriter=new StringWriter();
    fixup.render(resourceContext,currentValue,stringWriter);
    currentValue=stringWriter.toString();
  }
  for (  Renderer renderer : renderers) {
    StringWriter stringWriter=new StringWriter();
    renderer.render(resourceContext,currentValue,stringWriter);
    currentValue=stringWriter.toString();
  }
  writer.append(currentValue);
}

Fixed version (ground truth):
/** 
 * @param page Address of the page containing the template
 * @param parameters parameters to be added to the request
 * @param writer Writer where to write the result
 * @param request originating request object
 * @param renderers the renderers to use to transform the output
 * @throws IOException If an IOException occurs while writing to the writer
 * @throws HttpErrorPage If an Exception occurs while retrieving the template
 */
protected final void render(String page,Map<String,String> parameters,Appendable writer,HttpRequest request,HttpResponse response,Renderer... renderers) throws IOException, HttpErrorPage {
  if (LOG.isInfoEnabled()) {
    List<String> rendererNames=new ArrayList<String>(renderers.length);
    for (    Renderer renderer : renderers) {
      rendererNames.add(renderer.getClass().getName());
    }
    LOG.info("String_Node_Str",new Object[]{config.getInstanceName(),page,rendererNames});
  }
  String resultingpage=VariablesResolver.replaceAllVariables(page,request);
  ResourceContext resourceContext=new ResourceContext(this,resultingpage,parameters,request,response);
  resourceContext.setPreserveHost(config.isPreserveHost());
  StringOutput stringOutput=getResourceAsString(resourceContext);
  String currentValue=stringOutput.toString();
  if (config.isFixResources()) {
    ResourceFixupRenderer fixup=new ResourceFixupRenderer(config.getBaseURL(),config.getVisibleBaseURL(),page,config.getFixMode());
    StringWriter stringWriter=new StringWriter();
    fixup.render(resourceContext,currentValue,stringWriter);
    currentValue=stringWriter.toString();
  }
  for (  Renderer renderer : renderers) {
    StringWriter stringWriter=new StringWriter();
    renderer.render(resourceContext,currentValue,stringWriter);
    currentValue=stringWriter.toString();
  }
  writer.append(currentValue);
}