Program: 57050
Project: 57050
Buggy source:
/** 
 * Encodes the HTML for this context
 * @param fc
 * @throws IOException
 */
private void encodeHTML(FacesContext fc) throws IOException {
  Map<String,Object> attrs=getAttributes();
  String clientId=getClientId(fc);
  ResponseWriter rw=fc.getResponseWriter();
  sloc=selectLocale(fc.getViewRoot().getLocale(),A.asString(attrs.get(A.LOCALE)));
  sdf=selectDateFormat(sloc,A.asString(attrs.get(A.DTFORMAT)));
  String dpId;
  Object v=getSubmittedValue();
  if (v == null) {
    v=this.getValue();
  }
  mode=A.asString(attrs.get("String_Node_Str"),A.TOGGLEICON);
  boolean inline=mode.equals(A.INLINE);
  if (inline) {
    dpId=clientId + "String_Node_Str" + "String_Node_Str";
    rw.startElement("String_Node_Str",this);
    rw.writeAttribute("String_Node_Str",dpId,null);
    rw.endElement("String_Node_Str");
  }
 else {
    dpId=clientId;
    if (!mode.equals(A.POPUP)) {
      rw.startElement("String_Node_Str",this);
      rw.writeAttribute("String_Node_Str","String_Node_Str","String_Node_Str");
      if (mode.equals(A.ICONPOP) || mode.equals(A.ICONTOGGLE)) {
        R.addonIcon(rw,this,CALENDAR,false);
      }
    }
  }
  String type=inline ? "String_Node_Str" : "String_Node_Str";
  rw.startElement("String_Node_Str",null);
  rw.writeAttribute("String_Node_Str",clientId,null);
  rw.writeAttribute("String_Node_Str",clientId,null);
  Tooltip.generateTooltip(fc,attrs,rw);
  rw.writeAttribute("String_Node_Str",type,null);
  rw.writeAttribute("String_Node_Str","String_Node_Str","String_Node_Str");
  if (v != null) {
    rw.writeAttribute("String_Node_Str",getDateAsString(v,sdf,sloc),null);
  }
  String ph=A.asString(attrs.get(A.PHOLDER));
  if (ph != null) {
    rw.writeAttribute(H.PHOLDER,ph,null);
  }
  if (A.toBool(attrs.get(A.DISABLED))) {
    rw.writeAttribute(A.DISABLED,A.DISABLED,null);
  }
  if (A.toBool(attrs.get(A.READONLY))) {
    rw.writeAttribute(A.READONLY,A.READONLY,null);
  }
  rw.endElement("String_Node_Str");
  encodeJS(fc,rw,clientId,dpId);
  if (mode.equals(A.POPICON) || mode.equals(A.TOGGLEICON)) {
    R.addonIcon(rw,this,CALENDAR,false);
  }
  if (!inline && !mode.equals(A.POPUP)) {
    rw.endElement("String_Node_Str");
    JQ.datePickerToggler(rw,clientId,clientId + "String_Node_Str" + ADDON);
  }
}

Fixed version (ground truth):
/** 
 * Encodes the HTML for this context
 * @param fc
 * @throws IOException
 */
private void encodeHTML(FacesContext fc) throws IOException {
  Map<String,Object> attrs=getAttributes();
  String clientId=getClientId(fc);
  ResponseWriter rw=fc.getResponseWriter();
  sloc=selectLocale(fc.getViewRoot().getLocale(),A.asString(attrs.get(A.LOCALE)));
  sdf=selectDateFormat(sloc,A.asString(attrs.get(A.DTFORMAT)));
  String dpId;
  Object v=getSubmittedValue();
  if (v == null) {
    v=this.getValue();
  }
  mode=A.asString(attrs.get("String_Node_Str"),A.TOGGLEICON);
  boolean inline=mode.equals(A.INLINE);
  if (inline) {
    dpId=clientId + "String_Node_Str" + "String_Node_Str";
    rw.startElement("String_Node_Str",this);
    rw.writeAttribute("String_Node_Str",dpId,null);
    rw.endElement("String_Node_Str");
  }
 else {
    dpId=clientId;
    if (!mode.equals(A.POPUP)) {
      rw.startElement("String_Node_Str",this);
      rw.writeAttribute("String_Node_Str","String_Node_Str","String_Node_Str");
      if (mode.equals(A.ICONPOP) || mode.equals(A.ICONTOGGLE)) {
        R.addonIcon(rw,this,CALENDAR,false);
      }
    }
  }
  String type=inline ? "String_Node_Str" : "String_Node_Str";
  rw.startElement("String_Node_Str",null);
  rw.writeAttribute("String_Node_Str",clientId,null);
  rw.writeAttribute("String_Node_Str",clientId,null);
  Tooltip.generateTooltip(fc,attrs,rw);
  rw.writeAttribute("String_Node_Str",type,null);
  rw.writeAttribute("String_Node_Str","String_Node_Str","String_Node_Str");
  if (v != null) {
    rw.writeAttribute("String_Node_Str",getDateAsString(v,sdf,sloc),null);
  }
  String ph=A.asString(attrs.get(A.PHOLDER));
  if (ph != null) {
    rw.writeAttribute("String_Node_Str",ph,null);
  }
  if (A.toBool(attrs.get(A.DISABLED))) {
    rw.writeAttribute(A.DISABLED,A.DISABLED,null);
  }
  if (A.toBool(attrs.get(A.READONLY))) {
    rw.writeAttribute(A.READONLY,A.READONLY,null);
  }
  rw.endElement("String_Node_Str");
  encodeJS(fc,rw,clientId,dpId);
  if (mode.equals(A.POPICON) || mode.equals(A.TOGGLEICON)) {
    R.addonIcon(rw,this,CALENDAR,false);
  }
  if (!inline && !mode.equals(A.POPUP)) {
    rw.endElement("String_Node_Str");
    JQ.datePickerToggler(rw,clientId,clientId + "String_Node_Str" + ADDON);
  }
}