Program: 18010
Project: 18010
Buggy source:
private void appendAtomMandatoryParts(final XMLStreamWriter writer,final EntityInfoAggregator eia,final Map<String,Object> data) throws EntityProviderException {
  try {
    writer.writeStartElement(FormatXml.ATOM_ID);
    location=properties.getServiceRoot().toASCIIString() + createSelfLink(eia,data,null);
    writer.writeCharacters(location);
    writer.writeEndElement();
    writer.writeStartElement(FormatXml.ATOM_TITLE);
    writer.writeAttribute(FormatXml.M_TYPE,"String_Node_Str");
    EntityPropertyInfo titleInfo=eia.getTargetPathInfo(EdmTargetPath.SYNDICATION_TITLE);
    if (titleInfo != null) {
      EdmSimpleType st=(EdmSimpleType)titleInfo.getType();
      Object object=data.get(titleInfo.getName());
      String title=st.valueToString(object,EdmLiteralKind.DEFAULT,titleInfo.getFacets());
      writer.writeCharacters(title);
    }
 else {
      writer.writeCharacters(eia.getEntitySetName());
    }
    writer.writeEndElement();
    writer.writeStartElement(FormatXml.ATOM_UPDATED);
    Object updateDate=null;
    EdmFacets updateFacets=null;
    EntityPropertyInfo updatedInfo=eia.getTargetPathInfo(EdmTargetPath.SYNDICATION_UPDATED);
    if (updatedInfo != null) {
      updateDate=data.get(updatedInfo.getName());
      if (updateDate != null) {
        updateFacets=updatedInfo.getFacets();
      }
    }
    if (updateDate == null) {
      updateDate=new Date();
    }
    writer.writeCharacters(EdmDateTimeOffset.getInstance().valueToString(updateDate,EdmLiteralKind.DEFAULT,updateFacets));
    writer.writeEndElement();
  }
 catch (  XMLStreamException e) {
    throw new EntityProviderException(EntityProviderException.COMMON,e);
  }
catch (  EdmSimpleTypeException e) {
    throw new EntityProviderException(EntityProviderException.COMMON,e);
  }
}

Fixed version (ground truth):
private void appendAtomMandatoryParts(final XMLStreamWriter writer,final EntityInfoAggregator eia,final Map<String,Object> data) throws EntityProviderException {
  try {
    writer.writeStartElement(FormatXml.ATOM_ID);
    location=properties.getServiceRoot().toASCIIString() + createSelfLink(eia,data,null);
    writer.writeCharacters(location);
    writer.writeEndElement();
    writer.writeStartElement(FormatXml.ATOM_TITLE);
    writer.writeAttribute(FormatXml.M_TYPE,"String_Node_Str");
    EntityPropertyInfo titleInfo=eia.getTargetPathInfo(EdmTargetPath.SYNDICATION_TITLE);
    if (titleInfo != null) {
      EdmSimpleType st=(EdmSimpleType)titleInfo.getType();
      Object object=data.get(titleInfo.getName());
      String title=st.valueToString(object,EdmLiteralKind.DEFAULT,titleInfo.getFacets());
      if (title != null) {
        writer.writeCharacters(title);
      }
    }
 else {
      writer.writeCharacters(eia.getEntitySetName());
    }
    writer.writeEndElement();
    writer.writeStartElement(FormatXml.ATOM_UPDATED);
    Object updateDate=null;
    EdmFacets updateFacets=null;
    EntityPropertyInfo updatedInfo=eia.getTargetPathInfo(EdmTargetPath.SYNDICATION_UPDATED);
    if (updatedInfo != null) {
      updateDate=data.get(updatedInfo.getName());
      if (updateDate != null) {
        updateFacets=updatedInfo.getFacets();
      }
    }
    if (updateDate == null) {
      updateDate=new Date();
    }
    writer.writeCharacters(EdmDateTimeOffset.getInstance().valueToString(updateDate,EdmLiteralKind.DEFAULT,updateFacets));
    writer.writeEndElement();
  }
 catch (  XMLStreamException e) {
    throw new EntityProviderException(EntityProviderException.COMMON,e);
  }
catch (  EdmSimpleTypeException e) {
    throw new EntityProviderException(EntityProviderException.COMMON,e);
  }
}