Buggy code:
public abstract class Migration { protected static final Logger logger = LoggerFactory . getLogger ( Migration . class ) ; public static final String NAME_VALIDATOR_REGEX = "\\w+" ; public static final String MIGRATIONS_CF = "Migrations" ; public static final String SCHEMA_CF = "Schema" ; public static final ByteBuffer MIGRATIONS_KEY = ByteBufferUtil . bytes ( "Migrations<seq2seq4repair_space>Key" ) ; public static final ByteBuffer LAST_MIGRATION_KEY = ByteBufferUtil . bytes ( "Last<seq2seq4repair_space>Migration" ) ; protected RowMutation rm ; protected UUID newVersion ; protected UUID lastVersion ; protected transient boolean clientMode ; protected Migration ( ) { } Migration ( UUID newVersion , UUID lastVersion ) { } protected final void acquireLocks ( ) { } protected final void releaseLocks ( ) { } public void beforeApplyModels ( ) { } public final void apply ( ) throws IOException , ConfigurationException { if ( ! ( DatabaseDescriptor . getDefsVersion ( ) . equals ( lastVersion ) ) ) throw new ConfigurationException ( "Previous<seq2seq4repair_space>version<seq2seq4repair_space>mismatch.<seq2seq4repair_space>cannot<seq2seq4repair_space>apply." ) ; assert ( rm ) != null ; if ( ! ( clientMode ) ) rm . apply ( ) ; beforeApplyModels ( ) ; if ( ! ( clientMode ) ) { long now = System . currentTimeMillis ( ) ; ByteBuffer buf = serialize ( ) ; RowMutation migration = new RowMutation ( Table . SYSTEM_TABLE , Migration . MIGRATIONS_KEY ) ; migration . add ( new QueryPath ( Migration . MIGRATIONS_CF , null , ByteBuffer . wrap ( UUIDGen . decompose ( newVersion ) ) ) , buf , now ) ; migration . apply ( ) ; <START_BUG> Migration . logger . debug ( ( "Applying<seq2seq4repair_space>migration<seq2seq4repair_space>" + ( newVersion . toString ( ) ) ) ) ; <END_BUG> migration = new RowMutation ( Table . SYSTEM_TABLE , Migration . LAST_MIGRATION_KEY ) ; migration . add ( new QueryPath ( Migration . SCHEMA_CF , null , Migration . LAST_MIGRATION_KEY ) , ByteBuffer . wrap ( UUIDGen . decompose ( newVersion ) ) , now ) ; migration . apply ( ) ; ColumnFamilyStore [ ] schemaStores = new ColumnFamilyStore [ ] { Table . open ( SYSTEM_TABLE ) . getColumnFamilyStore ( Migration . MIGRATIONS_CF ) , Table . open ( SYSTEM_TABLE ) . getColumnFamilyStore ( Migration . SCHEMA_CF ) } ; List < Future > flushes = new ArrayList < Future > ( ) ; for ( ColumnFamilyStore cfs : schemaStores ) flushes . add ( cfs . forceFlush ( ) ) ; for ( Future f : flushes ) { if ( f == null ) continue ; try { f . get ( ) ; } catch ( ExecutionException e ) { throw new IOException ( e ) ; } catch ( InterruptedException e ) { throw new IOException ( e ) ; } } } applyModels ( ) ; } public final void announce ( ) { } public static UUID getLastMigrationId ( ) { } abstract void applyModels ( ) throws IOException { } public abstract void subdeflate ( org . apache . cassandra . db . migration . avro . Migration mi ) { } public abstract void subinflate ( org . apache . cassandra . db . migration . avro . Migration mi ) { } public UUID getVersion ( ) { } static RowMutation makeDefinitionMutation ( KSMetaData add , KSMetaData remove , UUID versionId ) throws IOException { } public ByteBuffer serialize ( ) throws IOException { } public static Migration deserialize ( ByteBuffer bytes ) throws IOException { } public static Collection < IColumn > getLocalMigrations ( UUID start , UUID end ) { } public static ByteBuffer toUTF8Bytes ( UUID version ) { } public static boolean isLegalName ( String s ) { } }

Fix:
Migration . logger . info ( "Applying<seq2seq4repair_space>migration<seq2seq4repair_space>{}<seq2seq4repair_space>{}" , newVersion . toString ( ) , toString ( ) ) ;