Buggy code:
public class MailEntityProcessor extends EntityProcessorBase { public static interface CustomFilter { public SearchTerm getCustomSearch ( Folder folder ) { } } @ Override public void init ( Context context ) { super . init ( context ) ; user = getStringFromContext ( "user" , null ) ; password = getStringFromContext ( "password" , null ) ; host = getStringFromContext ( "host" , null ) ; protocol = getStringFromContext ( "protocol" , null ) ; folderNames = getStringFromContext ( "folders" , null ) ; if ( ( ( ( ( ( host ) == null ) || ( ( protocol ) == null ) ) || ( ( user ) == null ) ) || ( ( password ) == null ) ) || ( ( folderNames ) == null ) ) throw new DataImportHandlerException ( DataImportHandlerException . SEVERE , "'user|password|protocol|host|folders'<seq2seq4repair_space>are<seq2seq4repair_space>required<seq2seq4repair_space>attributes" ) ; recurse = getBoolFromContext ( "recurse" , true ) ; String excludes = getStringFromContext ( "exclude" , "" ) ; if ( ( excludes != null ) && ( ! ( excludes . trim ( ) . equals ( "" ) ) ) ) { exclude = Arrays . asList ( excludes . split ( "," ) ) ; } String includes = getStringFromContext ( "include" , "" ) ; if ( ( includes != null ) && ( ! ( includes . trim ( ) . equals ( "" ) ) ) ) { include = Arrays . asList ( includes . split ( "," ) ) ; } batchSize = getIntFromContext ( "batchSize" , 20 ) ; customFilter = getStringFromContext ( "customFilter" , "" ) ; <START_BUG> String s = getStringFromContext ( "fetchMailsSince" , "" ) ; <END_BUG> if ( s != null ) try { fetchMailsSince = new SimpleDateFormat ( "yyyy-MM-dd<seq2seq4repair_space>HH:mm:ss" ) . parse ( s ) ; } catch ( ParseException e ) { throw new DataImportHandlerException ( DataImportHandlerException . SEVERE , ( "Invalid<seq2seq4repair_space>value<seq2seq4repair_space>for<seq2seq4repair_space>fetchMailSince:<seq2seq4repair_space>" + s ) , e ) ; } fetchSize = getIntFromContext ( "fetchSize" , ( 32 * 1024 ) ) ; cTimeout = getIntFromContext ( "connectTimeout" , ( 30 * 1000 ) ) ; rTimeout = getIntFromContext ( "readTimeout" , ( 60 * 1000 ) ) ; processAttachment = getBoolFromContext ( ( ( getStringFromContext ( "processAttachment" , null ) ) == null ? "processAttachement" : "processAttachment" ) , true ) ; tika = new Tika ( ) ; logConfig ( ) ; } @ 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 ( ) { } 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 ) { } public boolean hasNext ( ) { } public Folder next ( ) { } 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 { } public boolean hasNext ( ) { } public Message next ( ) { } public void remove ( ) { } private SearchTerm getSearchTerm ( ) { } } class MailsSinceLastCheckFilter implements MailEntityProcessor . CustomFilter { private Date since ; public MailsSinceLastCheckFilter ( Date date ) { } 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:
String s = getStringFromContext ( "fetchMailsSince" , null ) ;