Buggy code:
String displayPermalink ( PublicationDetail pub , KmeliaSessionController kmeliaScc , ResourcesWrapper resources ) throws IOException { } void displaySortingListBox ( ResourcesWrapper resources , KmeliaSessionController ksc , Writer out ) throws IOException { } private String isSelectedSort ( KmeliaSessionController ksc , String sort ) { } void displayPublicationsListHeader ( int nbPubs , boolean sortAllowed , Pagination pagination , ResourcesWrapper resources , KmeliaSessionController ksc , Writer out ) throws IOException { } String getUserName ( KmeliaPublication userPub , KmeliaSessionController kmeliaScc ) { } @ SuppressWarnings ( "unchecked" ) private List < PublicationPK > processPublicationsToLink ( HttpServletRequest request ) { } private String displayAttachments ( final KmeliaSessionController kmeliaScc , PublicationDetail pubDetail , ResourcesWrapper resources , boolean linkAttachment , boolean alias ) { } private String displayFile ( String url , String title , String info , String icon , String logicalName , String size , String downloadTime , Date creationDate , String permalink , ResourcesWrapper resources , boolean attachmentLink , boolean previewable , boolean viewable , final boolean isDownloadAllowedForReaders , final boolean isUserAllowedToDownloadFile , String id ) { SilverTrace . info ( "kmelia" , "AjaxPublicationsListServlet.displayFile()" , "root.MSG_GEN_ENTER_METHOD" ) ; StringBuilder result = new StringBuilder ( 1024 ) ; if ( ! attachmentLink ) { String link = ( isUserAllowedToDownloadFile ) ? ( "<a<seq2seq4repair_space>href=\"" + url ) + "\"<seq2seq4repair_space>target=\"_blank\">" : "<span<seq2seq4repair_space>class=\"forbidden-download\">" ; result . append ( "<tr><td<seq2seq4repair_space>valign=\"top\">" ) ; result . append ( link ) . append ( "<img<seq2seq4repair_space>src=\"" ) . append ( icon ) . append ( "\"<seq2seq4repair_space>border=\"0\"<seq2seq4repair_space>align=\"absmiddle\"//><//a>&#160;<//td>" ) ; result . append ( "<td<seq2seq4repair_space>valign=\"top\">" ) . append ( link ) ; boolean showTitle = resources . getSetting ( "showTitle" , true ) ; String fileTitle = ( StringUtil . isDefined ( title ) ) ? title : logicalName ; if ( ( StringUtil . isDefined ( fileTitle ) ) && showTitle ) { result . append ( fileTitle ) ; } result . append ( ( isUserAllowedToDownloadFile ? "<//a>" : "<//span>" ) ) ; if ( ( StringUtil . isDefined ( permalink ) ) && isUserAllowedToDownloadFile ) { result . append ( "&#160;<a<seq2seq4repair_space>href=\"" ) . append ( permalink ) . append ( "\"<seq2seq4repair_space>target=\"_blank\"><img<seq2seq4repair_space>src=\"" ) . append ( resources . getIcon ( "kmelia.link" ) ) . append ( "\"<seq2seq4repair_space>border=\"0\"<seq2seq4repair_space>valign=\"absmiddle\"<seq2seq4repair_space>alt=\"" ) . append ( resources . getString ( "toolbox.CopyFileLink" ) ) . append ( "\"<seq2seq4repair_space>title=\"" ) . append ( resources . getString ( "toolbox.CopyFileLink" ) ) . append ( "\"//><//a>" ) ; } result . append ( "<br//>" ) ; result . append ( "<i>" ) ; if ( ( StringUtil . isDefined ( logicalName ) ) && ( ( ! ( logicalName . equals ( fileTitle ) ) ) || ( ! showTitle ) ) ) { result . append ( logicalName ) . append ( "<seq2seq4repair_space>//<seq2seq4repair_space>" ) ; } if ( resources . getSetting ( "showFileSize" , true ) ) { result . append ( size ) ; } if ( resources . getSetting ( "showDownloadEstimation" , false ) ) { result . append ( "<seq2seq4repair_space>//<seq2seq4repair_space>" ) . append ( downloadTime ) . append ( "<seq2seq4repair_space>//<seq2seq4repair_space>" ) . append ( resources . getOutputDate ( creationDate ) ) ; } if ( previewable ) { result . append ( "<seq2seq4repair_space><img<seq2seq4repair_space>onclick=\"javascript:previewFile(this,<seq2seq4repair_space>\'" ) . append ( id ) . append ( "\');\"<seq2seq4repair_space>class=\"preview-file\"<seq2seq4repair_space>src=\"" ) . append ( resources . getIcon ( "kmelia.file.preview" ) ) . append ( "\"<seq2seq4repair_space>alt=\"" ) . append ( resources . getString ( "GML.preview" ) ) . append ( "\"<seq2seq4repair_space>title=\"" ) . append ( resources . getString ( "GML.preview" ) ) . append ( "\"//>" ) ; } if ( viewable ) { result . append ( "<seq2seq4repair_space><img<seq2seq4repair_space>onclick=\"javascript:viewFile(this,<seq2seq4repair_space>\'" ) . append ( id ) . append ( "\');\"<seq2seq4repair_space>class=\"view-file\"<seq2seq4repair_space>src=\"" ) . append ( resources . getIcon ( "kmelia.file.view" ) ) . append ( "\"<seq2seq4repair_space>alt=\"" ) . append ( resources . getString ( "GML.view" ) ) . append ( "\"<seq2seq4repair_space>title=\"" ) . append ( resources . getString ( "GML.view" ) ) . append ( "\"//>" ) ; } if ( ! isDownloadAllowedForReaders ) { String forbiddenDownloadHelp = ( isUserAllowedToDownloadFile ) ? resources . getString ( "GML.download.forbidden.readers" ) : resources . getString ( "GML.download.forbidden" ) ; result . append ( "<seq2seq4repair_space><img<seq2seq4repair_space>class=\"forbidden-download-file\"<seq2seq4repair_space>src=\"" ) . append ( resources . getIcon ( "kmelia.file.forbidden-download" ) ) . append ( "\"<seq2seq4repair_space>alt=\"" ) . append ( forbiddenDownloadHelp ) . append ( "\"<seq2seq4repair_space>title=\"" ) . append ( forbiddenDownloadHelp ) . append ( "\"//>" ) ; } result . append ( "<//i>" ) ; if ( ( StringUtil . isDefined ( info ) ) && ( resources . getSetting ( "showInfo" , true ) ) ) { <START_BUG> result . append ( "<br//>" ) . append ( EncodeHelper . javaStringToHtmlParagraphe ( info ) ) ; <END_BUG> } result . append ( "<//td><//tr>" ) ; } else { String displayedTitle ; if ( ! ( StringUtil . isDefined ( title ) ) ) { displayedTitle = logicalName ; } else { displayedTitle = title ; } String javascriptFunction = ( ( ( ( ( "selectAttachment('" + url ) + "','" ) + icon ) + "','" ) + displayedTitle ) + "')" ; String link = ( "<a<seq2seq4repair_space>href=\"javascript:" + javascriptFunction ) + "\"<seq2seq4repair_space>>" ; result . append ( "<tr><td<seq2seq4repair_space>valign=\"top\">" ) ; result . append ( link ) . append ( "<img<seq2seq4repair_space>src=\"" ) . append ( icon ) . append ( "\"<seq2seq4repair_space>border=\"0\"<seq2seq4repair_space>align=\"absmiddle\"//><//a>&#160;<//td>" ) ; result . append ( "<td<seq2seq4repair_space>valign=\"top\">" ) . append ( link ) ; result . append ( displayedTitle ) ; result . append ( "<//a>" ) ; if ( StringUtil . isDefined ( permalink ) ) { result . append ( "&#160;<a<seq2seq4repair_space>href=\"" ) . append ( permalink ) . append ( "\"<seq2seq4repair_space>target=\"_blank\"><img<seq2seq4repair_space>src=\"" ) . append ( resources . getIcon ( "kmelia.link" ) ) . append ( "\"<seq2seq4repair_space>border=\"0\"<seq2seq4repair_space>valign=\"absmiddle\"<seq2seq4repair_space>alt=\"" ) . append ( resources . getString ( "toolbox.CopyFileLink" ) ) . append ( "\"<seq2seq4repair_space>title=\"" ) . append ( resources . getString ( "toolbox.CopyFileLink" ) ) . append ( "\"//><//a>" ) ; } result . append ( "<br//>" ) ;

Fix:
result . append ( "<br//>" ) . append ( EncodeHelper . convertWhiteSpacesForHTMLDisplay ( info ) ) ;