Buggy code:
public class PrintMessageCommand extends FolderCommand { private cPrintObject mailHeader ; private cPrintObject mailFooter ; private DateFormat mailDateFormat ; private String [ ] headerKeys = new String [ ] { "From" , "To" , "Date" , "Subject" } ; private String attHeaderKey = "attachment" ; private String charset ; public PrintMessageCommand ( DefaultCommandReference [ ] references , String charset ) { } public cPrintObject getMailHeader ( ) { } public cPrintObject getMailFooter ( ) { } public String [ ] getHeaderKeys ( ) { } public DateFormat getMailDateFormat ( ) { } public void updatedGUI ( ) throws Exception { } public void execute ( Worker worker ) throws Exception { FolderCommandReference [ ] r = ( ( FolderCommandReference [ ] ) ( getReferences ( ) ) ) ; Object [ ] uids = r [ 0 ] . getUids ( ) ; Folder srcFolder = ( ( Folder ) ( r [ 0 ] . getFolder ( ) ) ) ; ( ( StatusObservableImpl ) ( srcFolder . getObservable ( ) ) ) . setWorker ( worker ) ; for ( int j = 0 ; j < ( uids . length ) ; j ++ ) { Object uid = uids [ j ] ; log . debug ( ( "Printing<seq2seq4repair_space>UID=" + uid ) ) ; ColumbaMessage message = new ColumbaMessage ( ) ; ColumbaHeader header = srcFolder . getMessageHeader ( uid ) ; MimeTree mimePartTree = srcFolder . getMimePartTree ( uid ) ; XmlElement html = MailConfig . getMainFrameOptionsConfig ( ) . getRoot ( ) . getElement ( "//options//html" ) ; <START_BUG> boolean viewhtml = new Boolean ( html . getAttribute ( "prefer" ) ) . booleanValue ( ) ; <END_BUG> MimePart bodyPart = null ; if ( viewhtml ) bodyPart = mimePartTree . getFirstTextPart ( "html" ) ; else bodyPart = mimePartTree . getFirstTextPart ( "plain" ) ; if ( bodyPart == null ) { bodyPart = new LocalMimePart ( new org . columba . ristretto . message . MimeHeader ( header . getHeader ( ) ) ) ; ( ( LocalMimePart ) ( bodyPart ) ) . setBody ( new CharSequenceSource ( "<No<seq2seq4repair_space>Message-Text>" ) ) ; } else bodyPart = srcFolder . getMimePart ( uid , bodyPart . getAddress ( ) ) ; cDocument messageDoc = new cDocument ( ) ; messageDoc . setHeader ( getMailHeader ( ) ) ; messageDoc . setFooter ( getMailFooter ( ) ) ; String [ ] headerKeys = getHeaderKeys ( ) ; cParagraph hKey ; cParagraph hValue ; cHGroup hLine ; Object value ; for ( int i = 0 ; i < ( Array . getLength ( headerKeys ) ) ; i ++ ) { hKey = new cParagraph ( ) ; hKey . setText ( MailResourceLoader . getString ( "header" , headerKeys [ i ] . toLowerCase ( ) ) ) ; hKey . setFontStyle ( Font . BOLD ) ; hValue = new cParagraph ( ) ; if ( headerKeys [ i ] . equalsIgnoreCase ( "date" ) ) { value = header . get ( "columba.date" ) ; } else { value = header . get ( headerKeys [ i ] ) ; } if ( value instanceof Date ) { hValue . setText ( getMailDateFormat ( ) . format ( ( ( Date ) ( value ) ) ) ) ; } else { hValue . setText ( ( ( String ) ( value ) ) ) ; } hValue . setLeftMargin ( new org . columba . core . print . cCmUnit ( 3.0 ) ) ; hLine = new cHGroup ( ) ; hLine . add ( hKey ) ; hLine . add ( hValue ) ; messageDoc . appendPrintObject ( hLine ) ; } AttachmentModel attMod = new AttachmentModel ( ) ; attMod . setCollection ( mimePartTree ) ; List attachments = attMod . getDisplayedMimeParts ( ) ; for ( int i = 0 ; i < ( attachments . size ( ) ) ; i ++ ) { StreamableMimePart mp = ( ( StreamableMimePart ) ( attachments . get ( i ) ) ) ; String contenttype = mp . getHeader ( ) . getMimeType ( ) . getType ( ) ; String contentSubtype = mp . getHeader ( ) . getMimeType ( ) . getSubtype ( ) ; if ( ( mp . getHeader ( ) . getFileName ( ) ) != null ) { hKey = new cParagraph ( ) ; hKey . setText ( MailResourceLoader . getString ( "header" , attHeaderKey ) ) ; hKey . setFontStyle ( Font . BOLD ) ; hValue = new cParagraph ( ) ; hValue . setText ( mp . getHeader ( ) . getFileName ( ) ) ; hValue . setLeftMargin ( new org . columba . core . print . cCmUnit ( 3.0 ) ) ; hLine = new cHGroup ( ) ; hLine . add ( hKey ) ; hLine . add ( hValue ) ; messageDoc . appendPrintObject ( hLine ) ; } } String mimesubtype = bodyPart . getHeader ( ) . getMimeType ( ) . getSubtype ( ) ; if ( mimesubtype . equals ( "html" ) ) { messageDoc . appendPrintObject ( getHTMLBodyPrintObject ( ( ( StreamableMimePart ) ( bodyPart ) ) ) ) ; } else { messageDoc . appendPrintObject ( getPlainBodyPrintObject ( ( ( StreamableMimePart ) ( bodyPart ) ) ) ) ; } messageDoc . print ( ) ; } } private cPrintObject getPlainBodyPrintObject ( StreamableMimePart bodyPart ) throws IOException { } protected boolean isScalingAllowed ( ) { } private cPrintObject getHTMLBodyPrintObject ( StreamableMimePart bodyPart ) throws IOException { } private String getDecodedMessageBody ( StreamableMimePart bodyPart ) throws IOException { } }

Fix:
boolean viewhtml = Boolean . valueOf ( html . getAttribute ( "prefer" ) ) . booleanValue ( ) ;