Program: 56900
Project: 56900
Buggy source:
private void renderOption(FacesContext context,SelectOneMenu menu,ResponseWriter rw,int index,String itemLabel,final String description,final Object itemValue,boolean isDisabledOption,boolean isEscape,UIComponent itemComponent) throws IOException {
  Object submittedValue=menu.getSubmittedValue();
  Object selectedOption;
  Object optionValue;
  Converter converter=menu.getConverter();
  String itemValueAsString=getOptionAsString(context,menu,itemValue,converter);
  if (submittedValue != null) {
    selectedOption=submittedValue;
    optionValue=itemValueAsString;
  }
 else {
    selectedOption=menu.getValue();
    optionValue=itemValue;
  }
  boolean isSelected=false;
  if (itemValue != null) {
    if (isSelected(context,menu,selectedOption,optionValue,converter)) {
      isSelected=true;
    }
  }
 else   if (itemLabel.equals(selectedOption)) {
    isSelected=true;
  }
  if (menu.isDisabled() || menu.isReadonly()) {
    if (!isSelected) {
      return;
    }
  }
  boolean isItemLabelBlank=itemLabel == null || itemLabel.trim().isEmpty();
  itemLabel=isItemLabelBlank ? itemValueAsString : itemLabel;
  rw.startElement("String_Node_Str",itemComponent);
  rw.writeAttribute("String_Node_Str",itemLabel,null);
  if (description != null) {
    rw.writeAttribute("String_Node_Str",description,null);
  }
  if (itemValue != null) {
    String value;
    if (null != converter) {
      value=converter.getAsString(context,menu,itemValue);
    }
 else     if (itemValue instanceof String) {
      value=(String)itemValue;
    }
 else {
      value=String.valueOf(index);
    }
    rw.writeAttribute("String_Node_Str",value,"String_Node_Str");
  }
  if (isSelected) {
    rw.writeAttribute("String_Node_Str","String_Node_Str","String_Node_Str");
  }
  if (isDisabledOption)   rw.writeAttribute("String_Node_Str","String_Node_Str","String_Node_Str");
  if (isEscape && !isItemLabelBlank) {
    rw.writeText(itemLabel,null);
  }
 else {
    rw.write(itemLabel);
  }
  rw.endElement("String_Node_Str");
}

Fixed version (ground truth):
private void renderOption(FacesContext context,SelectOneMenu menu,ResponseWriter rw,int index,String itemLabel,final String description,final Object itemValue,boolean isDisabledOption,boolean isEscape,UIComponent itemComponent) throws IOException {
  Object submittedValue=menu.getSubmittedValue();
  Object selectedOption;
  Object optionValue;
  Converter converter=menu.getConverter();
  String itemValueAsString=getOptionAsString(context,menu,itemValue,converter);
  if (submittedValue != null) {
    selectedOption=submittedValue;
    optionValue=itemValueAsString;
  }
 else {
    selectedOption=menu.getValue();
    optionValue=itemValue;
  }
  boolean isSelected=false;
  if (itemValue != null) {
    if (isSelected(context,menu,selectedOption,optionValue,converter)) {
      isSelected=true;
    }
  }
 else   if (itemLabel.equals(selectedOption)) {
    isSelected=true;
  }
  boolean isItemLabelBlank=itemLabel == null || itemLabel.trim().isEmpty();
  itemLabel=isItemLabelBlank ? itemValueAsString : itemLabel;
  rw.startElement("String_Node_Str",itemComponent);
  rw.writeAttribute("String_Node_Str",itemLabel,null);
  if (description != null) {
    rw.writeAttribute("String_Node_Str",description,null);
  }
  if (itemValue != null) {
    String value;
    if (null != converter) {
      value=converter.getAsString(context,menu,itemValue);
    }
 else     if (itemValue instanceof String) {
      value=(String)itemValue;
    }
 else {
      value=String.valueOf(index);
    }
    rw.writeAttribute("String_Node_Str",value,"String_Node_Str");
  }
  if (isSelected) {
    rw.writeAttribute("String_Node_Str","String_Node_Str","String_Node_Str");
  }
  if (isDisabledOption)   rw.writeAttribute("String_Node_Str","String_Node_Str","String_Node_Str");
  if (isEscape && !isItemLabelBlank) {
    rw.writeText(itemLabel,null);
  }
 else {
    rw.write(itemLabel);
  }
  rw.endElement("String_Node_Str");
}