Buggy code:
public class MailEntityProcessor extends EntityProcessorBase { public static interface CustomFilter { public SearchTerm getCustomSearch ( Folder folder ) { } } @ Override public void init ( Context context ) { } @ Override public Map < String , Object > nextRow ( ) { } private Message getNextMail ( ) { } private Map < String , Object > getDocumentFromMail ( Message mail ) { } public void addPartToDocument ( Part part , Map < String , Object > row , boolean outerMost ) throws Exception { } private void addEnvelopToDocument ( Part part , Map < String , Object > row ) throws MessagingException { } private void addAddressToList ( Address [ ] adresses , List < String > to ) throws AddressException { } private boolean connectToMailBox ( ) { } private void createFilters ( ) { } private void logConfig ( ) { if ( ! ( MailEntityProcessor . LOG . isInfoEnabled ( ) ) ) return ; <START_BUG> StringBuffer config = new StringBuffer ( ) ; <END_BUG> config . append ( "user<seq2seq4repair_space>:<seq2seq4repair_space>" ) . append ( user ) . append ( System . getProperty ( "line.separator" ) ) ; config . append ( "pwd<seq2seq4repair_space>:<seq2seq4repair_space>" ) . append ( password ) . append ( System . getProperty ( "line.separator" ) ) ; config . append ( "protocol<seq2seq4repair_space>:<seq2seq4repair_space>" ) . append ( protocol ) . append ( System . getProperty ( "line.separator" ) ) ; config . append ( "host<seq2seq4repair_space>:<seq2seq4repair_space>" ) . append ( host ) . append ( System . getProperty ( "line.separator" ) ) ; config . append ( "folders<seq2seq4repair_space>:<seq2seq4repair_space>" ) . append ( folderNames ) . append ( System . getProperty ( "line.separator" ) ) ; config . append ( "recurse<seq2seq4repair_space>:<seq2seq4repair_space>" ) . append ( recurse ) . append ( System . getProperty ( "line.separator" ) ) ; config . append ( "exclude<seq2seq4repair_space>:<seq2seq4repair_space>" ) . append ( exclude . toString ( ) ) . append ( System . getProperty ( "line.separator" ) ) ; config . append ( "include<seq2seq4repair_space>:<seq2seq4repair_space>" ) . append ( include . toString ( ) ) . append ( System . getProperty ( "line.separator" ) ) ; config . append ( "batchSize<seq2seq4repair_space>:<seq2seq4repair_space>" ) . append ( batchSize ) . append ( System . getProperty ( "line.separator" ) ) ; config . append ( "fetchSize<seq2seq4repair_space>:<seq2seq4repair_space>" ) . append ( fetchSize ) . append ( System . getProperty ( "line.separator" ) ) ; config . append ( "read<seq2seq4repair_space>timeout<seq2seq4repair_space>:<seq2seq4repair_space>" ) . append ( rTimeout ) . append ( System . getProperty ( "line.separator" ) ) ; config . append ( "conection<seq2seq4repair_space>timeout<seq2seq4repair_space>:<seq2seq4repair_space>" ) . append ( cTimeout ) . append ( System . getProperty ( "line.separator" ) ) ; config . append ( "custom<seq2seq4repair_space>filter<seq2seq4repair_space>:<seq2seq4repair_space>" ) . append ( customFilter ) . append ( System . getProperty ( "line.separator" ) ) ; config . append ( "fetch<seq2seq4repair_space>mail<seq2seq4repair_space>since<seq2seq4repair_space>:<seq2seq4repair_space>" ) . append ( fetchMailsSince ) . append ( System . getProperty ( "line.separator" ) ) ; MailEntityProcessor . LOG . info ( config . toString ( ) ) ; } class FolderIterator implements Iterator < Folder > { private Store mailbox ; private List < String > topLevelFolders ; private List < Folder > folders = null ; private Folder lastFolder = null ; public FolderIterator ( Store mailBox ) { } @ Override public boolean hasNext ( ) { } @ Override public Folder next ( ) { } @ Override public void remove ( ) { } private void getTopLevelFolders ( Store mailBox ) { } private boolean excludeFolder ( String name ) { } } class MessageIterator implements Iterator < Message > { private Folder folder ; private Message [ ] messagesInCurBatch ; private int current = 0 ; private int currentBatch = 0 ; private int batchSize = 0 ; private int totalInFolder = 0 ; private boolean doBatching = true ; public MessageIterator ( Folder folder , int batchSize ) { } private void getNextBatch ( int batchSize , Folder folder ) throws MessagingException { } @ Override public boolean hasNext ( ) { } @ Override public Message next ( ) { } @ Override public void remove ( ) { } private SearchTerm getSearchTerm ( ) { } } class MailsSinceLastCheckFilter implements MailEntityProcessor . CustomFilter { private Date since ; public MailsSinceLastCheckFilter ( Date date ) { } @ Override public SearchTerm getCustomSearch ( Folder folder ) { } } private String user ; private String password ; private String host ; private String protocol ; private String folderNames ; private List < String > exclude = new ArrayList < String > ( ) ; private List < String > include = new ArrayList < String > ( ) ; private boolean recurse ; private int batchSize ; private int fetchSize ; private int cTimeout ; private int rTimeout ; private Date fetchMailsSince ; private String customFilter ; private boolean processAttachment = true ; private Tika tika ; private Store mailbox ; private boolean connected = false ; private MailEntityProcessor . FolderIterator folderIter ; private MailEntityProcessor . MessageIterator msgIter ; private List < MailEntityProcessor . CustomFilter > filters = new ArrayList < MailEntityProcessor . CustomFilter > ( ) ; private static FetchProfile fp = new FetchProfile ( ) ; private static final Logger LOG = LoggerFactory . getLogger ( DataImporter . class ) ; private int rowCount = 0 ; private static final String MESSAGE_ID = "messageId" ; private static final String SUBJECT = "subject" ; private static final String FROM = "from" ; private static final String SENT_DATE = "sentDate" ; private static final String XMAILER = "xMailer" ; private static final String TO_CC_BCC = "allTo" ; private static final String FLAGS = "flags" ; private static final String CONTENT = "content" ; private static final String ATTACHMENT = "attachment" ; private static final String ATTACHMENT_NAMES = "attachmentNames" ; private static final String FLAG_ANSWERED = "answered" ; private static final String FLAG_DELETED = "deleted" ; private static final String FLAG_DRAFT = "draft" ;

Fix:
StringBuilder config = new StringBuilder ( ) ;