Program: 56990
Project: 56990
Buggy source:
/** 
 * This methods generates the HTML code of the current b:dataTable. <code>encodeBegin</code> generates the start of the component. After the, the JSF framework calls <code>encodeChildren()</code> to generate the HTML code between the beginning and the end of the component. For instance, in the case of a panel component the content of the panel is generated by <code>encodeChildren()</code>. After that, <code>encodeEnd()</code> is called to generate the rest of the HTML code.
 * @param context the FacesContext.
 * @param component the current b:dataTable.
 * @throws IOException thrown if something goes wrong when writing the HTML code.
 */
@Override public void encodeEnd(FacesContext context,UIComponent component) throws IOException {
  if (!component.isRendered()) {
    return;
  }
  DataTable dataTable=(DataTable)component;
  Map<DataTablePropertyType,Object> dataTableProperties=dataTable.getDataTableProperties();
  Integer page=0;
  Integer pageLength=10;
  String searchTerm="String_Node_Str";
  if (dataTableProperties != null) {
    Object currentPage=dataTableProperties.get(DataTablePropertyType.currentPage);
    Object currentPageLength=dataTableProperties.get(DataTablePropertyType.pageLength);
    Object currentSearchTerm=dataTableProperties.get(DataTablePropertyType.searchTerm);
    if (currentPage != null) {
      page=(Integer)currentPage;
    }
    if (currentPageLength != null) {
      pageLength=(Integer)currentPageLength;
    }
    if (currentSearchTerm != null) {
      searchTerm=String.format("String_Node_Str",(String)currentSearchTerm);
    }
  }
  ResponseWriter rw=context.getResponseWriter();
  String clientId=dataTable.getClientId().replace("String_Node_Str","String_Node_Str");
  rw.endElement("String_Node_Str");
  Tooltip.activateTooltips(context,dataTable);
  rw.startElement("String_Node_Str",component);
  rw.writeText("String_Node_Str",null);
  rw.writeText("String_Node_Str" + clientId + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ clientId+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str",null);
  rw.writeText("String_Node_Str" + page + "String_Node_Str"+ "String_Node_Str"+ searchTerm+ "String_Node_Str"+ "String_Node_Str"+ pageLength+ "String_Node_Str",null);
  rw.writeText("String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str" + DataTablePropertyType.currentPage + "String_Node_Str"+ "String_Node_Str",null);
  rw.writeText("String_Node_Str" + "String_Node_Str" + "String_Node_Str" + DataTablePropertyType.pageLength + "String_Node_Str"+ "String_Node_Str",null);
  rw.writeText("String_Node_Str" + "String_Node_Str" + "String_Node_Str" + DataTablePropertyType.searchTerm + "String_Node_Str"+ "String_Node_Str",null);
  if (dataTable.isMultiColumnSearch()) {
    rw.writeText("String_Node_Str" + clientId + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str",null);
    rw.writeText("String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str",null);
  }
  rw.writeText("String_Node_Str",null);
  rw.endElement("String_Node_Str");
}

Fixed version (ground truth):
/** 
 * This methods generates the HTML code of the current b:dataTable. <code>encodeBegin</code> generates the start of the component. After the, the JSF framework calls <code>encodeChildren()</code> to generate the HTML code between the beginning and the end of the component. For instance, in the case of a panel component the content of the panel is generated by <code>encodeChildren()</code>. After that, <code>encodeEnd()</code> is called to generate the rest of the HTML code.
 * @param context the FacesContext.
 * @param component the current b:dataTable.
 * @throws IOException thrown if something goes wrong when writing the HTML code.
 */
@Override public void encodeEnd(FacesContext context,UIComponent component) throws IOException {
  if (!component.isRendered()) {
    return;
  }
  DataTable dataTable=(DataTable)component;
  Map<DataTablePropertyType,Object> dataTableProperties=dataTable.getDataTableProperties();
  Integer page=0;
  Integer pageLength=10;
  String searchTerm="String_Node_Str";
  if (dataTableProperties != null) {
    Object currentPage=dataTableProperties.get(DataTablePropertyType.currentPage);
    Object currentPageLength=dataTableProperties.get(DataTablePropertyType.pageLength);
    Object currentSearchTerm=dataTableProperties.get(DataTablePropertyType.searchTerm);
    if (currentPage != null) {
      page=(Integer)currentPage;
    }
    if (currentPageLength != null) {
      pageLength=(Integer)currentPageLength;
    }
    if (currentSearchTerm != null) {
      searchTerm=String.format("String_Node_Str",(String)currentSearchTerm);
    }
  }
  ResponseWriter rw=context.getResponseWriter();
  String clientIdRaw=dataTable.getClientId();
  String clientId=clientIdRaw.replace("String_Node_Str","String_Node_Str");
  rw.endElement("String_Node_Str");
  Tooltip.activateTooltips(context,dataTable);
  rw.startElement("String_Node_Str",component);
  rw.writeText("String_Node_Str",null);
  rw.writeText("String_Node_Str" + clientId + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ clientIdRaw.replace("String_Node_Str","String_Node_Str")+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str",null);
  rw.writeText("String_Node_Str" + page + "String_Node_Str"+ "String_Node_Str"+ searchTerm+ "String_Node_Str"+ "String_Node_Str"+ pageLength+ "String_Node_Str",null);
  if (dataTableProperties != null) {
    rw.writeText("String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str" + DataTablePropertyType.currentPage + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str",null);
    rw.writeText("String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str" + DataTablePropertyType.pageLength + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str",null);
    rw.writeText("String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str" + DataTablePropertyType.searchTerm + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str",null);
  }
  if (dataTable.isMultiColumnSearch()) {
    rw.writeText("String_Node_Str" + clientId + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str",null);
    rw.writeText("String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str",null);
  }
  rw.writeText("String_Node_Str",null);
  rw.endElement("String_Node_Str");
}