Program: 44089
Project: 44089
Buggy source:
/** 
 * Write simple type file.
 * @param doc the doc
 * @param type the type
 * @throws OutputFormatterException
 */
private void writeSimpleTypeFile(WSDLDocInterface doc,SimpleType type) throws OutputFormatterException {
  logger.entering("String_Node_Str","String_Node_Str",new Object[]{doc,type});
  String typeName=type.getName();
  StringBuffer html=new StringBuffer();
  if (typeName != null && !Utils.isEmpty(typeName)) {
    html=new StringBuffer();
    html.append(HtmlUtils.getStartTags(typeName,doc.getPackageName() + File.separator + "String_Node_Str"));
    String parentType=type.getBase();
    if (!Utils.isEmpty(parentType)) {
      parentType=Utils.removeNameSpace(parentType);
      typeName=typeName + "String_Node_Str" + parentType+ "String_Node_Str";
    }
    html.append(getTextInDiv("String_Node_Str" + typeName,"String_Node_Str"));
    html.append(Constants.HTML_HR);
    html.append(Constants.HTML_DL_START + Constants.HTML_DD_START);
    if (type.getAnnotations().getDocumentation() != null) {
      html.append(getTextInSpan(type.getAnnotations().getDocumentation(),"String_Node_Str"));
    }
    html.append(Constants.HTML_DD_END + Constants.HTML_DL_END);
    StringBuffer deprDet=AnnotationsHelper.processDeprication(type.getAnnotations());
    if (deprDet != null) {
      html.append(getTextInDiv("String_Node_Str","String_Node_Str"));
      html.append(deprDet);
    }
    processRelatedInfo(html,doc,type.getAnnotations());
    html.append(Constants.HTML_HR);
    html.append(Constants.HTML_BR + Constants.HTML_BR);
    List<EnumElement> enumElements=type.getEnums();
    if (enumElements != null && !enumElements.isEmpty()) {
      html.append(getTableTagWithStyle("String_Node_Str"));
      html.append(getTableRowTagWithStyle("String_Node_Str"));
      html.append("String_Node_Str");
      html.append("String_Node_Str");
      html.append(Constants.HTML_TABLE_TH_END);
      html.append(Constants.HTML_TABLE_TR_END);
      html.append(getTableRowTagWithStyle("String_Node_Str"));
      html.append(getTableHeadTagWithStyle("String_Node_Str"));
      html.append("String_Node_Str");
      html.append(Constants.HTML_TABLE_TH_END);
      html.append(getTableHeadTagWithStyle("String_Node_Str"));
      html.append("String_Node_Str");
      html.append(Constants.HTML_TABLE_TH_END);
      html.append(Constants.HTML_TABLE_TR_END);
      for (      EnumElement enumElement : enumElements) {
        html.append(getTableRowTagWithStyle("String_Node_Str"));
        html.append(getTableDataTagWithStyle("String_Node_Str"));
        html.append(enumElement.getValue());
        html.append(Constants.HTML_TABLE_TD_END);
        html.append(getTableDataTagWithStyle("String_Node_Str"));
        if (enumElement.getAnnotations().getDocumentation() != null) {
          html.append(enumElement.getAnnotations().getDocumentation());
        }
        deprDet=AnnotationsHelper.processDeprication(enumElement.getAnnotations());
        if (deprDet != null) {
          html.append(getTextInDiv("String_Node_Str","String_Node_Str"));
          html.append(deprDet);
        }
        processRelatedInfo(html,doc,enumElement.getAnnotations());
        html.append(Constants.HTML_TABLE_TD_END);
        html.append(Constants.HTML_TABLE_TR_END);
      }
      html.append(Constants.HTML_TABLE_END);
    }
    addFooter(html);
    writeFile(html,currentTypesFolderPath,typeName + Constants.DOT_HTML);
  }
  logger.exiting("String_Node_Str","String_Node_Str",html);
}

Fixed version (ground truth):
/** 
 * Write simple type file.
 * @param doc the doc
 * @param type the type
 * @throws OutputFormatterException
 */
private void writeSimpleTypeFile(WSDLDocInterface doc,SimpleType type) throws OutputFormatterException {
  logger.entering("String_Node_Str","String_Node_Str",new Object[]{doc,type});
  String typeName=type.getName();
  StringBuffer html=new StringBuffer();
  if (typeName != null && !Utils.isEmpty(typeName)) {
    html=new StringBuffer();
    html.append(HtmlUtils.getStartTags(typeName,currentPackageName + File.separator + "String_Node_Str"));
    String parentType=type.getBase();
    if (!Utils.isEmpty(parentType)) {
      parentType=Utils.removeNameSpace(parentType);
      typeName=typeName + "String_Node_Str" + parentType+ "String_Node_Str";
    }
    html.append(getTextInDiv("String_Node_Str" + typeName,"String_Node_Str"));
    html.append(Constants.HTML_HR);
    html.append(Constants.HTML_DL_START + Constants.HTML_DD_START);
    if (type.getAnnotations().getDocumentation() != null) {
      html.append(getTextInSpan(type.getAnnotations().getDocumentation(),"String_Node_Str"));
    }
    html.append(Constants.HTML_DD_END + Constants.HTML_DL_END);
    StringBuffer deprDet=AnnotationsHelper.processDeprication(type.getAnnotations());
    if (deprDet != null) {
      html.append(getTextInDiv("String_Node_Str","String_Node_Str"));
      html.append(deprDet);
    }
    processRelatedInfo(html,doc,type.getAnnotations());
    html.append(Constants.HTML_HR);
    html.append(Constants.HTML_BR + Constants.HTML_BR);
    List<EnumElement> enumElements=type.getEnums();
    if (enumElements != null && !enumElements.isEmpty()) {
      html.append(getTableTagWithStyle("String_Node_Str"));
      html.append(getTableRowTagWithStyle("String_Node_Str"));
      html.append("String_Node_Str");
      html.append("String_Node_Str");
      html.append(Constants.HTML_TABLE_TH_END);
      html.append(Constants.HTML_TABLE_TR_END);
      html.append(getTableRowTagWithStyle("String_Node_Str"));
      html.append(getTableHeadTagWithStyle("String_Node_Str"));
      html.append("String_Node_Str");
      html.append(Constants.HTML_TABLE_TH_END);
      html.append(getTableHeadTagWithStyle("String_Node_Str"));
      html.append("String_Node_Str");
      html.append(Constants.HTML_TABLE_TH_END);
      html.append(Constants.HTML_TABLE_TR_END);
      for (      EnumElement enumElement : enumElements) {
        html.append(getTableRowTagWithStyle("String_Node_Str"));
        html.append(getTableDataTagWithStyle("String_Node_Str"));
        html.append(enumElement.getValue());
        html.append(Constants.HTML_TABLE_TD_END);
        html.append(getTableDataTagWithStyle("String_Node_Str"));
        if (enumElement.getAnnotations().getDocumentation() != null) {
          html.append(enumElement.getAnnotations().getDocumentation());
        }
        deprDet=AnnotationsHelper.processDeprication(enumElement.getAnnotations());
        if (deprDet != null) {
          html.append(getTextInDiv("String_Node_Str","String_Node_Str"));
          html.append(deprDet);
        }
        processRelatedInfo(html,doc,enumElement.getAnnotations());
        html.append(Constants.HTML_TABLE_TD_END);
        html.append(Constants.HTML_TABLE_TR_END);
      }
      html.append(Constants.HTML_TABLE_END);
    }
    addFooter(html);
    writeFile(html,currentTypesFolderPath,typeName + Constants.DOT_HTML);
  }
  logger.exiting("String_Node_Str","String_Node_Str",html);
}