Program: 56968
Project: 56968
Buggy source:
/** 
 * This methods generates the HTML code of the current b:modal. <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:modal.
 * @throws IOException thrown if something goes wrong when writing the HTML code.
 */
@Override public void encodeBegin(FacesContext context,UIComponent component) throws IOException {
  if (!component.isRendered()) {
    return;
  }
  ResponseWriter rw=context.getResponseWriter();
  Modal modal=(Modal)component;
  String title=modal.getTitle();
  rw.startElement("String_Node_Str",component);
  rw.writeAttribute("String_Node_Str",component.getClientId(context),"String_Node_Str");
  String styleClasses="String_Node_Str";
  if (modal.getStyleClass() != null) {
    styleClasses=modal.getStyleClass() + "String_Node_Str" + styleClasses;
  }
  if (!modal.isBackdrop()) {
    rw.writeAttribute("String_Node_Str","String_Node_Str",null);
  }
  if (!modal.isCloseOnEscape()) {
    rw.writeAttribute("String_Node_Str","String_Node_Str",null);
  }
  rw.writeAttribute("String_Node_Str",styleClasses,"String_Node_Str");
  if (modal.getStyle() != null) {
    rw.writeAttribute("String_Node_Str",modal.getStyle(),"String_Node_Str");
  }
  rw.writeAttribute("String_Node_Str","String_Node_Str",null);
  rw.writeAttribute("String_Node_Str","String_Node_Str",null);
  rw.writeAttribute("String_Node_Str",component.getClientId(context) + "String_Node_Str",null);
  rw.writeAttribute("String_Node_Str","String_Node_Str",null);
  rw.startElement("String_Node_Str",component);
  String modalStyleClass="String_Node_Str" + "String_Node_Str";
  if (modal.getSize() != null) {
    modalStyleClass=modalStyleClass + "String_Node_Str" + modal.getSize();
  }
  rw.writeAttribute("String_Node_Str",modalStyleClass,"String_Node_Str");
  rw.startElement("String_Node_Str",component);
  rw.writeAttribute("String_Node_Str","String_Node_Str","String_Node_Str");
  rw.startElement("String_Node_Str",component);
  String headerStyleClasses="String_Node_Str";
  if (modal.getHeaderClass() != null) {
    headerStyleClasses+="String_Node_Str" + modal.getHeaderClass();
  }
  rw.writeAttribute("String_Node_Str",headerStyleClasses,"String_Node_Str");
  String headerStyle="String_Node_Str";
  if (modal.getHeaderStyle() != null) {
    headerStyle+="String_Node_Str" + modal.getHeaderStyle();
  }
  rw.writeAttribute("String_Node_Str",headerStyle,"String_Node_Str");
  if (modal.isClosable()) {
    rw.startElement("String_Node_Str",component);
    rw.writeAttribute("String_Node_Str","String_Node_Str","String_Node_Str");
    rw.writeAttribute("String_Node_Str","String_Node_Str","String_Node_Str");
    rw.writeAttribute("String_Node_Str","String_Node_Str","String_Node_Str");
    rw.write("String_Node_Str");
    rw.endElement("String_Node_Str");
  }
  if (title != null) {
    rw.startElement("String_Node_Str",component);
    rw.writeAttribute("String_Node_Str",component.getClientId(context) + "String_Node_Str","String_Node_Str");
    rw.writeText(title,null);
    rw.endElement("String_Node_Str");
  }
  rw.endElement("String_Node_Str");
  rw.startElement("String_Node_Str",component);
  if (modal.getContentClass() != null) {
    rw.writeAttribute("String_Node_Str","String_Node_Str" + modal.getContentClass(),"String_Node_Str");
  }
 else {
    rw.writeAttribute("String_Node_Str","String_Node_Str","String_Node_Str");
  }
  if (modal.getContentStyle() != null) {
    rw.writeAttribute("String_Node_Str",modal.getContentStyle(),"String_Node_Str");
  }
}

Fixed version (ground truth):
/** 
 * This methods generates the HTML code of the current b:modal. <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:modal.
 * @throws IOException thrown if something goes wrong when writing the HTML code.
 */
@Override public void encodeBegin(FacesContext context,UIComponent component) throws IOException {
  if (!component.isRendered()) {
    return;
  }
  ResponseWriter rw=context.getResponseWriter();
  Modal modal=(Modal)component;
  String title=modal.getTitle();
  rw.startElement("String_Node_Str",component);
  rw.writeAttribute("String_Node_Str",component.getClientId(context),"String_Node_Str");
  String styleClasses="String_Node_Str";
  if (modal.getStyleClass() != null) {
    styleClasses=modal.getStyleClass() + "String_Node_Str" + styleClasses;
  }
  if (!modal.isBackdrop()) {
    rw.writeAttribute("String_Node_Str","String_Node_Str",null);
  }
  if (!modal.isCloseOnEscape()) {
    rw.writeAttribute("String_Node_Str","String_Node_Str",null);
  }
  rw.writeAttribute("String_Node_Str",styleClasses,"String_Node_Str");
  if (modal.getStyle() != null) {
    rw.writeAttribute("String_Node_Str",modal.getStyle(),"String_Node_Str");
  }
  rw.writeAttribute("String_Node_Str","String_Node_Str",null);
  rw.writeAttribute("String_Node_Str","String_Node_Str",null);
  rw.writeAttribute("String_Node_Str",component.getClientId(context) + "String_Node_Str",null);
  rw.writeAttribute("String_Node_Str","String_Node_Str",null);
  rw.startElement("String_Node_Str",component);
  String modalStyleClass="String_Node_Str" + "String_Node_Str";
  if (modal.getSize() != null) {
    modalStyleClass=modalStyleClass + "String_Node_Str" + modal.getSize();
  }
  rw.writeAttribute("String_Node_Str",modalStyleClass,"String_Node_Str");
  rw.startElement("String_Node_Str",component);
  rw.writeAttribute("String_Node_Str","String_Node_Str","String_Node_Str");
  rw.startElement("String_Node_Str",component);
  String headerStyleClasses="String_Node_Str";
  if (modal.getHeaderClass() != null) {
    headerStyleClasses+="String_Node_Str" + modal.getHeaderClass();
  }
  rw.writeAttribute("String_Node_Str",headerStyleClasses,"String_Node_Str");
  if (modal.getHeaderStyle() != null) {
    rw.writeAttribute("String_Node_Str",modal.getHeaderStyle(),"String_Node_Str");
  }
  if (modal.isClosable()) {
    rw.startElement("String_Node_Str",component);
    rw.writeAttribute("String_Node_Str","String_Node_Str","String_Node_Str");
    rw.writeAttribute("String_Node_Str","String_Node_Str","String_Node_Str");
    rw.writeAttribute("String_Node_Str","String_Node_Str","String_Node_Str");
    rw.write("String_Node_Str");
    rw.endElement("String_Node_Str");
  }
  if (title != null) {
    rw.startElement("String_Node_Str",component);
    rw.writeAttribute("String_Node_Str",component.getClientId(context) + "String_Node_Str","String_Node_Str");
    rw.writeText(title,null);
    rw.endElement("String_Node_Str");
  }
  rw.endElement("String_Node_Str");
  rw.startElement("String_Node_Str",component);
  if (modal.getContentClass() != null) {
    rw.writeAttribute("String_Node_Str","String_Node_Str" + modal.getContentClass(),"String_Node_Str");
  }
 else {
    rw.writeAttribute("String_Node_Str","String_Node_Str","String_Node_Str");
  }
  if (modal.getContentStyle() != null) {
    rw.writeAttribute("String_Node_Str",modal.getContentStyle(),"String_Node_Str");
  }
}