Buggy code:
public class FilePageStore implements IPageStore { private class PageSavingThread implements Runnable { private volatile boolean stop = false ; private long totalSavingTime = 0 ; private int saved ; private int bytesSaved ; public void run ( ) { } public void stop ( ) { } private void savePage ( FilePageStore . SessionPageKey key , byte [ ] bytes ) { } } private class PageSerializingThread implements Runnable { private volatile boolean stop = false ; private int serializedInThread = 0 ; public void run ( ) { } public void stop ( ) { } } private static class SessionPageKey { private final String sessionId ; private final int id ; private final int versionNumber ; private final int ajaxVersionNumber ; private final String pageMap ; private final Class pageClass ; private volatile Object data ; SessionPageKey ( String sessionId , int id , int versionNumber , int ajaxVersionNumber , String pagemap , Class pageClass ) { } SessionPageKey ( String sessionId , int id , int versionNumber , int ajaxVersionNumber , String pagemap , Class pageClass , Page page ) { } SessionPageKey ( String sessionId , Page page ) { } public boolean equals ( Object obj ) { } public Object getObject ( ) { } public int hashCode ( ) { } public void setObject ( Object o ) { } public String toString ( ) { } } private static final Object SERIALIZING = new Object ( ) ; protected static Log log = LogFactory . getLog ( FilePageStore . class ) ; private final File defaultWorkDir ; private final FilePageStore . PageSerializingThread serThread ; private final ConcurrentHashMap pagesToBeSerialized ; private final FilePageStore . PageSavingThread saveThread ; private final ConcurrentHashMap pagesToBeSaved ; private final String appName ; private volatile int serialized ; private volatile long totalSerializationTime = 0 ; public FilePageStore ( ) { } public FilePageStore ( File dir ) { } public void destroy ( ) { } public Page getPage ( String sessionId , String pagemapName , int id , int versionNumber , int ajaxVersionNumber ) { } public void pageAccessed ( String sessionId , Page page ) { } public void removePage ( String sessionId , Page page ) { } public void storePage ( String sessionId , Page page ) { } public void unbind ( String sessionId ) { } private File getPageFile ( FilePageStore . SessionPageKey key , File sessionDir ) { } private void removePage ( String sessionId , int id ) { } private void removePageFromPendingMap ( String sessionId , int id ) { } private void removeSession ( String sessionId ) { } private void removeSessionFromPendingMap ( String sessionId ) { } private byte [ ] serializePage ( FilePageStore . SessionPageKey key , Page page ) { long t1 = System . currentTimeMillis ( ) ; byte [ ] bytes = Objects . objectToByteArray ( page ) ; totalSerializationTime += ( System . currentTimeMillis ( ) ) - t1 ; ( serialized ) ++ ; <START_BUG> if ( FilePageStore . log . isDebugEnabled ( ) ) { <END_BUG> FilePageStore . log . debug ( ( ( ( ( ( ( ( ( ( ( ( ( "serializing<seq2seq4repair_space>page<seq2seq4repair_space>" + ( key . pageClass ) ) + "[" ) + ( key . id ) ) + "," ) + ( key . versionNumber ) ) + "]<seq2seq4repair_space>size:<seq2seq4repair_space>" ) + ( bytes . length ) ) + "<seq2seq4repair_space>for<seq2seq4repair_space>session<seq2seq4repair_space>" ) + ( key . sessionId ) ) + "<seq2seq4repair_space>took<seq2seq4repair_space>" ) + ( ( System . currentTimeMillis ( ) ) - t1 ) ) + "<seq2seq4repair_space>miliseconds<seq2seq4repair_space>to<seq2seq4repair_space>serialize" ) ) ; } return bytes ; } private byte [ ] testMap ( FilePageStore . SessionPageKey currentKey ) { } protected File getWorkDir ( ) { } }

Fix:
if ( ( FilePageStore . log . isDebugEnabled ( ) ) && ( bytes != null ) ) {