Buggy code:
public class NotificationMetaData implements Serializable { private static final long serialVersionUID = 6004274748540324759L ; public static final String BEFORE_MESSAGE_FOOTER_TAG = "<!--BEFORE_MESSAGE_FOOTER-->" ; public static final String AFTER_MESSAGE_FOOTER_TAG = "<!--AFTER_MESSAGE_FOOTER-->" ; private int messageType ; private Date date ; private String sender ; private String source ; private String link ; private String sessionId ; private Collection < UserRecipient > userRecipients ; private Collection < UserRecipient > userRecipientsToExclude ; private Collection < GroupRecipient > groupRecipients ; private Collection < ExternalRecipient > externalRecipients ; private String componentId ; private boolean isAnswerAllowed = false ; private String fileName ; private boolean sendImmediately = false ; private NotifAction action ; private Map < String , NotificationResourceData > notificationResourceData = new HashMap < String , NotificationResourceData > ( ) ; private Map < String , String > titles = new HashMap < String , String > ( ) ; private Map < String , String > contents = new HashMap < String , String > ( ) ; private Map < String , String > linkLabels = new HashMap < String , String > ( ) ; private Map < String , SilverpeasTemplate > templates ; private Map < String , SilverpeasTemplate > templatesMessageFooter ; private String originalExtraMessage = null ; private boolean displayReceiversInFooter = false ; private ResourceLocator settings = new ResourceLocator ( "org.silverpeas.notificationManager.settings.notificationManagerSettings" , "" ) ; public NotificationMetaData ( ) { } public NotificationMetaData ( int messageType , String title , String content ) { } public NotificationMetaData ( int messageType , String title , Map < String , SilverpeasTemplate > templates , String fileName ) { } private void reset ( ) { } public final void addLanguage ( String language , String title , String content ) { } public Set < String > getLanguages ( ) { } public Map < String , SilverpeasTemplate > getTemplates ( ) { } public void setMessageType ( int messageType ) { } public int getMessageType ( ) { } public void setDate ( Date date ) { } public Date getDate ( ) { } public void setTitle ( String title ) { } public void setTitle ( String title , String language ) { } public String getTitle ( ) { } public String getTitle ( String language ) { } public void setContent ( String content ) { } public void setContent ( String content , String language ) { } public String getContent ( ) { } public String getContent ( String language ) { SilverTrace . info ( "notificationManager" , "NotificationMetaData.getContent()" , "root.MSG_GEN_ENTER_METHOD" , ( "language<seq2seq4repair_space>=<seq2seq4repair_space>" + language ) ) ; StringBuilder result = new StringBuilder ( ) ; if ( ( ( templates ) != null ) && ( ! ( templates . isEmpty ( ) ) ) ) { SilverpeasTemplate template = templates . get ( language ) ; if ( template != null ) { result . append ( template . applyFileTemplate ( ( ( ( fileName ) + '_' ) + language ) ) ) ; } } else { String content = contents . get ( language ) ; if ( content != null ) { result . append ( content ) ; } <START_BUG> if ( ( getOriginalExtraMessage ( ) ) != null ) { <END_BUG> result . append ( "<div<seq2seq4repair_space>style=\"padding=10px<seq2seq4repair_space>0<seq2seq4repair_space>10px<seq2seq4repair_space>0;\">" ) . append ( "<div<seq2seq4repair_space>style=\"background-color:#FFF9D7;<seq2seq4repair_space>border:1px<seq2seq4repair_space>solid<seq2seq4repair_space>#E2C822;<seq2seq4repair_space>padding:5px;<seq2seq4repair_space>width:390px;\">" ) . append ( getOriginalExtraMessage ( ) ) . append ( "<//div><//div>" ) ; } } result . append ( NotificationMetaData . BEFORE_MESSAGE_FOOTER_TAG ) ; SilverpeasTemplate templateMessageFooter = getTemplateMessageFooter ( language ) ; if ( ( templateMessageFooter != null ) && ( this . displayReceiversInFooter ) ) { try { String receiver_users = addReceiverUsers ( ) ; if ( StringUtil . isDefined ( receiver_users ) ) { templateMessageFooter . setAttribute ( NotificationTemplateKey . notification_receiver_users . toString ( ) , receiver_users ) ; } String receiver_groups = addReceiverGroups ( ) ; if ( StringUtil . isDefined ( receiver_groups ) ) { templateMessageFooter . setAttribute ( NotificationTemplateKey . notification_receiver_groups . toString ( ) , receiver_groups ) ; } } catch ( NotificationManagerException e ) { SilverTrace . warn ( "notificationManager" , "NotificationMetaData.getContent()" , "root.EX_ADD_USERS_FAILED" , e ) ; } String messageFooter = templateMessageFooter . applyFileTemplate ( ( ( "messageFooter" + '_' ) + language ) ) . replaceAll ( "[\\n\\r]" , "" ) ; if ( ( messageFooter . length ( ) ) > 0 ) { result . append ( messageFooter ) ; } } result . append ( NotificationMetaData . AFTER_MESSAGE_FOOTER_TAG ) ; SilverTrace . info ( "notificationManager" , "NotificationMetaData.getContent()" , "root.MSG_GEN_EXIT_METHOD" , ( "result<seq2seq4repair_space>=<seq2seq4repair_space>" + result ) ) ; return EncodeHelper . convertWhiteSpacesForHTMLDisplay ( result . toString ( ) ) ; } public void setSource ( String source ) { } public String getSource ( ) { } public void setSender ( String sender ) { } public void setAnswerAllowed ( boolean answerAllowed ) { } public String getSender ( ) { } public boolean isAnswerAllowed ( ) { } public void setLink ( String link ) { } public String getLink ( ) { } public void setLink ( Link link ) { } public void setLink ( Link link , String language ) { } public String getLinkLabel ( ) { } public String getLinkLabel ( String language ) { } public void setSessionId ( String sessionId ) { } public String getSessionId ( ) { } public void setUserRecipients ( Collection < UserRecipient > users ) { } public Collection < UserRecipient > getUserRecipients ( ) { } public void addUserRecipient ( UserRecipient user ) { } public void addUserRecipients ( UserRecipient [ ] users ) { } public void addUserRecipients ( Collection < UserRecipient > users ) { } public void setUserRecipientsToExclude ( Collection < UserRecipient > users ) { } public Collection < UserRecipient > getUserRecipientsToExclude ( ) { } public void addUserRecipientToExclude ( UserRecipient user ) { } public void addUserRecipientsToExclude ( UserRecipient [ ] users ) { }

Fix:
if ( StringUtil . isDefined ( getOriginalExtraMessage ( ) ) ) {