Buggy code:
} } if ( isUseSSL ( ) ) { props . put ( "mail.pop3s.ssl.socketFactory" , new LocalTrustStoreSSLSocketFactory ( truststore ) ) ; props . put ( "mail.pop3s.ssl.socketFactory.fallback" , "false" ) ; } else if ( isUseStartTLS ( ) ) { props . put ( "mail.pop3s.ssl.socketFactory" , new LocalTrustStoreSSLSocketFactory ( truststore ) ) ; props . put ( "mail.pop3s.ssl.socketFactory.fallback" , "false" ) ; } } Session session = Session . getInstance ( props , null ) ; Store store = session . getStore ( getServerType ( ) ) ; store . connect ( getServer ( ) , getPortAsInt ( ) , getUserName ( ) , getPassword ( ) ) ; Folder folder = store . getFolder ( getFolder ( ) ) ; if ( deleteMessages ) { folder . open ( READ_WRITE ) ; } else { folder . open ( READ_ONLY ) ; } Message [ ] messages = folder . getMessages ( ) ; StringBuilder pdata = new StringBuilder ( ) ; pdata . append ( messages . length ) ; pdata . append ( "<seq2seq4repair_space>messages<seq2seq4repair_space>found\n" ) ; parent . setResponseData ( pdata . toString ( ) , null ) ; parent . setDataType ( TEXT ) ; parent . setContentType ( "text//plain" ) ; int n = getNumMessages ( ) ; if ( ( n == ( MailReaderSampler . ALL_MESSAGES ) ) || ( n > ( messages . length ) ) ) { n = messages . length ; } parent . setSampleCount ( n ) ; busy = true ; for ( int i = 0 ; ( busy ) && ( i < n ) ; i ++ ) { StringBuilder cdata = new StringBuilder ( ) ; SampleResult child = new SampleResult ( ) ; child . sampleStart ( ) ; Message message = messages [ i ] ; cdata . append ( "Message<seq2seq4repair_space>" ) ; cdata . append ( message . getMessageNumber ( ) ) ; child . setSampleLabel ( cdata . toString ( ) ) ; child . setSamplerData ( cdata . toString ( ) ) ; cdata . setLength ( 0 ) ; final String contentType = message . getContentType ( ) ; child . setContentType ( contentType ) ; child . setDataEncoding ( MailReaderSampler . RFC_822_DEFAULT_ENCODING ) ; child . setEncodingAndType ( contentType ) ; if ( isStoreMimeMessage ( ) ) { ByteArrayOutputStream bout = new ByteArrayOutputStream ( ) ; message . writeTo ( bout ) ; child . setResponseData ( bout . toByteArray ( ) ) ; child . setDataType ( TEXT ) ; } else { @ SuppressWarnings ( "unchecked" ) Enumeration < Header > hdrs = message . getAllHeaders ( ) ; while ( hdrs . hasMoreElements ( ) ) { Header hdr = hdrs . nextElement ( ) ; String value = hdr . getValue ( ) ; try { value = MimeUtility . decodeText ( value ) ; } catch ( UnsupportedEncodingException uce ) { } cdata . append ( hdr . getName ( ) ) . append ( ":<seq2seq4repair_space>" ) . append ( value ) . append ( "\n" ) ; } child . setResponseHeaders ( cdata . toString ( ) ) ; cdata . setLength ( 0 ) ; appendMessageData ( child , message ) ; } if ( deleteMessages ) { message . setFlag ( DELETED , true ) ; } child . setResponseOK ( ) ; if ( ( child . getEndTime ( ) ) == 0 ) { child . sampleEnd ( ) ; } parent . addSubResult ( child ) ; } folder . close ( true ) ; store . close ( ) ; parent . setResponseCodeOK ( ) ; parent . setResponseMessageOK ( ) ; isOK = true ; } catch ( NoClassDefFoundError ex ) { MailReaderSampler . log . debug ( "" , ex ) ; parent . setResponseCode ( "500" ) ; parent . setResponseMessage ( ex . toString ( ) ) ; } catch ( MessagingException ex ) { MailReaderSampler . log . debug ( "" , ex ) ; parent . setResponseCode ( "500" ) ; <START_BUG> parent . setResponseMessage ( ex . toString ( ) ) ; <END_BUG> } catch ( IOException ex ) { MailReaderSampler . log . debug ( "" , ex ) ; parent . setResponseCode ( "500" ) ; parent . setResponseMessage ( ex . toString ( ) ) ; } finally { busy = false ; } if ( ( parent . getEndTime ( ) ) == 0 ) { parent . sampleEnd ( ) ; } parent . setSuccessful ( isOK ) ; return parent ; } private void appendMessageData ( SampleResult child , Message message ) throws IOException , MessagingException { } private void appendMultiPart ( SampleResult child , StringBuilder cdata , MimeMultipart mmp ) throws IOException , MessagingException { } public void setServerType ( String serverType ) { } public String getServerType ( ) { } public void setServer ( String server ) { } public String getServer ( ) { } public String getPort ( ) { } private int getPortAsInt ( ) { } public void setPort ( String port ) { } public void setUserName ( String username ) { } public String getUserName ( ) { } public void setPassword ( String password ) { } public String getPassword ( ) { } public void setFolder ( String folder ) { } public String getFolder ( ) { } public void setNumMessages ( int num_messages ) { } public void setNumMessages ( String num_messages ) { } public int getNumMessages ( ) { } public String getNumMessagesString ( ) { } public void setDeleteMessages ( boolean delete ) { } public boolean getDeleteMessages ( ) { } public boolean isStoreMimeMessage ( ) { } public void setStoreMimeMessage ( boolean storeMimeMessage ) { } @ Override public String toString ( ) { } public boolean interrupt ( ) { } }

Fix:
parent . setResponseMessage ( ( ( ( ex . toString ( ) ) + "\n" ) + samplerString ) ) ;