Buggy code:
public class IMAPFolder extends AbstractRemoteFolder { private static final Logger LOG = Logger . getLogger ( "org.columba.mail.folder.imap" ) ; private Object aktMessageUid ; private IColumbaMessage aktMessage ; private boolean mailcheck = false ; private IMAPServer store ; protected IHeaderList headerList ; protected boolean existsOnServer = true ; private IHeaderListStorage attributeStorage ; private boolean readOnly ; public boolean isReadOnly ( ) { } public IMAPFolder ( FolderItem folderItem , String path ) { } public IMAPFolder ( String name , String type , String path ) throws Exception { } public void removeFolder ( ) throws Exception { } public void setName ( String name ) throws Exception { } public IMAPServer getServer ( ) { } public IHeaderList getHeaderList ( ) throws Exception { } protected ImapItem getImapItem ( ) { } protected void printStatusMessage ( String message ) { } public void synchronizeHeaderlist ( ) throws IOException , Exception , CommandCancelledException , IMAPException { } public void synchronizeFlags ( ) throws IOException , Exception , CommandCancelledException , IMAPException { } protected void setFlags ( Flags [ ] flagsList ) { } public void save ( ) throws Exception { } private List extractUids ( IHeaderList headerList ) { } protected boolean existsRemotely ( String uid , int startIndex , List uidList ) throws Exception { } protected boolean existsLocally ( String uid , HeaderList list ) throws Exception { } public MimeTree getMimePartTree ( Object uid ) throws Exception { } public MimePart getMimePart ( Object uid , Integer [ ] address ) throws Exception { } public void innerCopy ( IMailbox destiny , Object [ ] uids ) throws Exception { } public void markMessage ( Object [ ] uids , int variant ) throws Exception { } public void expungeFolder ( ) throws Exception { } public IColumbaHeader getMessageHeader ( Object uid ) throws Exception { } public IColumbaMessage getMessage ( Object uid ) throws Exception { } public String getImapPath ( ) throws IOException , CommandCancelledException , IMAPException { } public static XmlElement getDefaultProperties ( ) { } public boolean tryToGetLock ( Object locker ) { } public void releaseLock ( Object locker ) { } public void addSubfolder ( IMailFolder child ) throws Exception { } public StatusObservable getObservable ( ) { } public Object addMessage ( InputStream in , Attributes attributes , Flags flags ) throws Exception { } public Header getHeaderFields ( Object uid , String [ ] keys ) throws Exception { ColumbaHeader header = ( ( ColumbaHeader ) ( getHeaderList ( ) . get ( uid ) ) ) ; Header result = new Header ( ) ; boolean parsingNeeded = false ; <START_BUG> List list = Arrays . asList ( CachedHeaderfields . getCachedHeaderfields ( ) ) ; <END_BUG> for ( int i = 0 ; i < ( keys . length ) ; i ++ ) { if ( ( header . get ( keys [ i ] ) ) != null ) { result . set ( keys [ i ] , header . get ( keys [ i ] ) ) ; } else { if ( ! ( list . contains ( keys [ i ] ) ) ) { parsingNeeded = true ; } } } if ( parsingNeeded ) { return getServer ( ) . getHeaders ( uid , keys , this ) ; } else { return result ; } } public InputStream getMessageSourceStream ( Object uid ) throws Exception { } public InputStream getMimePartSourceStream ( Object uid , Integer [ ] address ) throws Exception { } public InputStream getMimePartBodyStream ( Object uid , Integer [ ] address ) throws Exception { } public boolean isInboxFolder ( ) { } public boolean isTrashFolder ( ) { } public Object addMessage ( InputStream in ) throws Exception { } public IHeaderListStorage getHeaderListStorage ( ) { } public DefaultSearchEngine getSearchEngine ( ) { } public Header getAllHeaderFields ( Object uid ) throws Exception { } public boolean supportsAddFolder ( IMailFolder folder ) { } public void updateFlag ( IMAPFlags flag ) throws IOException , CommandCancelledException , IMAPException { } public void setReadOnly ( boolean readOnly ) { } class RemoteHeaderListStorage extends AbstractHeaderListStorage { protected AbstractHeaderCache headerCache ; private IMAPFolder folder ; public RemoteHeaderListStorage ( IMAPFolder folder ) { } public AbstractHeaderCache getHeaderCacheInstance ( ) { } } }

Fix:
List list = Arrays . asList ( CachedHeaderfields . getDefaultHeaderfields ( ) ) ;