Buggy code:
public class MessageDisplayHelper { private static final int MAX_CACHE_SIZE = 2000 ; private static final LinkedHashMap < String , SoftReference < String > > decryptedBodyCache = new LinkedHashMap < String , SoftReference < String > > ( ) { @ Override protected boolean removeEldestEntry ( Entry < String , SoftReference < String > > eldest ) { } } ; private static boolean isUnreadableAsymmetricMessage ( long type ) { } private static boolean isInProcessAsymmetricMessage ( String body , long type ) { } private static boolean isRogueAsymmetricMessage ( long type ) { } private static boolean isKeyExchange ( String body ) { } private static boolean isProcessedKeyExchange ( String body ) { } private static boolean isStaleKeyExchange ( String body ) { } private static String checkCacheForBody ( String body ) { } public static void setDecryptedMessageBody ( String body , MessageRecord message , MasterCipher bodyCipher ) { try { if ( body . startsWith ( SYMMETRIC_ENCRYPT ) ) { String cacheResult = MessageDisplayHelper . checkCacheForBody ( body ) ; if ( cacheResult != null ) { body = cacheResult ; } else { String decryptedBody = bodyCipher . decryptBody ( body . substring ( SYMMETRIC_ENCRYPT . length ( ) ) ) ; MessageDisplayHelper . decryptedBodyCache . put ( body , new SoftReference < String > ( decryptedBody ) ) ; body = decryptedBody ; } } if ( MessageDisplayHelper . isUnreadableAsymmetricMessage ( message . getType ( ) ) ) { message . setBody ( "Bad<seq2seq4repair_space>encrypted<seq2seq4repair_space>message..." ) ; message . setEmphasis ( true ) ; } else if ( MessageDisplayHelper . isInProcessAsymmetricMessage ( body , message . getType ( ) ) ) { message . setBody ( "Decrypting,<seq2seq4repair_space>please<seq2seq4repair_space>wait..." ) ; message . setEmphasis ( true ) ; } else if ( MessageDisplayHelper . isRogueAsymmetricMessage ( message . getType ( ) ) ) { <START_BUG> message . setBody ( "Message<seq2seq4repair_space>encrypted<seq2seq4repair_space>for<seq2seq4repair_space>non-existent<seq2seq4repair_space>session..." ) ; <END_BUG> message . setEmphasis ( true ) ; } else if ( MessageDisplayHelper . isKeyExchange ( body ) ) { message . setKeyExchange ( true ) ; message . setEmphasis ( true ) ; message . setBody ( body ) ; } else if ( MessageDisplayHelper . isProcessedKeyExchange ( body ) ) { message . setProcessedKeyExchange ( true ) ; message . setEmphasis ( true ) ; message . setBody ( body ) ; } else if ( MessageDisplayHelper . isStaleKeyExchange ( body ) ) { message . setStaleKeyExchange ( true ) ; message . setEmphasis ( true ) ; message . setBody ( body ) ; } else { message . setBody ( body ) ; message . setEmphasis ( false ) ; } } catch ( InvalidMessageException ime ) { message . setBody ( "Decryption<seq2seq4repair_space>error:<seq2seq4repair_space>local<seq2seq4repair_space>message<seq2seq4repair_space>corrupted,<seq2seq4repair_space>MAC<seq2seq4repair_space>doesn't<seq2seq4repair_space>match.<seq2seq4repair_space>Potential<seq2seq4repair_space>tampering?" ) ; message . setEmphasis ( true ) ; } } }

Fix:
message . setBody ( ( "Message<seq2seq4repair_space>encrypted<seq2seq4repair_space>for<seq2seq4repair_space>non-existent<seq2seq4repair_space>session:<seq2seq4repair_space>" + body ) ) ;