Buggy code:
public class Table { public static class TableMetadata { public static final String cfName_ = "TableMetadata" ; private static ICompactSerializer < Table . TableMetadata > serializer_ ; private static Table . TableMetadata tableMetadata_ ; private static IFileWriter writer_ ; private static IFileReader reader_ ; public static Table . TableMetadata instance ( ) throws IOException { } static ICompactSerializer < Table . TableMetadata > serializer ( ) { } private static void load ( ) throws IOException { String file = Table . TableMetadata . getFileName ( ) ; File f = new File ( file ) ; if ( f . exists ( ) ) { DataOutputBuffer bufOut = new DataOutputBuffer ( ) ; DataInputBuffer bufIn = new DataInputBuffer ( ) ; if ( ( Table . TableMetadata . reader_ ) == null ) { Table . TableMetadata . reader_ = SequenceFile . reader ( file ) ; } while ( ! ( Table . TableMetadata . reader_ . isEOF ( ) ) ) { Table . TableMetadata . reader_ . next ( bufOut ) ; bufIn . reset ( bufOut . getData ( ) , bufOut . getLength ( ) ) ; <START_BUG> String key = bufIn . readUTF ( ) ; <END_BUG> bufIn . readInt ( ) ; Table . TableMetadata . tableMetadata_ = Table . TableMetadata . serializer ( ) . deserialize ( bufIn ) ; break ; } } } private Map < String , String > cfTypeMap_ = new HashMap < String , String > ( ) ; private Map < String , Integer > cfIdMap_ = new HashMap < String , Integer > ( ) ; private Map < Integer , String > idCfMap_ = new HashMap < Integer , String > ( ) ; private static String getFileName ( ) { } public void add ( String cf , int id ) { } public void add ( String cf , int id , String type ) { } public boolean isEmpty ( ) { } int getColumnFamilyId ( String columnFamily ) { } String getColumnFamilyName ( int id ) { } String getColumnFamilyType ( String cfName ) { } Set < String > getColumnFamilies ( ) { } int size ( ) { } boolean isValidColumnFamily ( String cfName ) { } public void apply ( ) throws IOException { } public String toString ( ) { } } static class TableMetadataSerializer implements ICompactSerializer < Table . TableMetadata > { public void serialize ( Table . TableMetadata tmetadata , DataOutputStream dos ) throws IOException { } public Table . TableMetadata deserialize ( DataInputStream dis ) throws IOException { } } public static class BootstrapCompletionHandler implements IStreamComplete { public void onStreamCompletion ( String host , StreamContextManager . StreamContext streamContext , StreamContextManager . StreamStatus streamStatus ) throws IOException { } } public static class BootStrapInitiateVerbHandler implements IVerbHandler { public void doVerb ( Message message ) { } private Map < String , String > getNewNames ( StreamContextManager [ ] streamContexts ) { } private void addStreamContext ( String host , StreamContextManager . StreamContext streamContext , StreamContextManager . StreamStatus streamStatus ) { } } private static Logger logger_ = Logger . getLogger ( Table . class ) ; public static final String recycleBin_ = "RecycleColumnFamily" ; public static final String hints_ = "HintsColumnFamily" ; private static Lock createLock_ = new ReentrantLock ( ) ; private static Map < String , Table > instances_ = new HashMap < String , Table > ( ) ; private String table_ ; private Table . TableMetadata tableMetadata_ ; private Map < String , ColumnFamilyStore > columnFamilyStores_ = new HashMap < String , ColumnFamilyStore > ( ) ; private DBAnalyticsSource dbAnalyticsSource_ ; public static Table open ( String table ) { } public Set < String > getColumnFamilies ( ) { } Map < String , ColumnFamilyStore > getColumnFamilyStores ( ) { } public ColumnFamilyStore getColumnFamilyStore ( String cfName ) { } String getColumnFamilyType ( String cfName ) { } public String tableStats ( String newLineSeparator , DecimalFormat df ) { } void onStart ( ) throws IOException { } public void doGC ( ) { } public void touch ( String key , boolean fData ) throws IOException { } public void clearSnapshot ( ) { } public boolean forceCompaction ( List < Range > ranges , EndPoint target , List < String > fileList ) { } public void forceCompaction ( ) { } public List < String > getAllSSTablesOnDisk ( ) { } private Table ( String table ) { } String getTableName ( ) { } boolean isApplicationColumnFamily ( String columnFamily ) { } int getNumberOfColumnFamilies ( ) { } int getColumnFamilyId ( String columnFamily ) { } String getColumnFamilyName ( int id ) { } boolean isValidColumnFamily ( String columnFamily ) { } public Row get ( String key ) throws IOException { } public ColumnFamily get ( String key , String cf ) throws IOException { } public Row getRow ( String key , String cf ) throws IOException { } public Row getRow ( String key , String cf , int start , int count ) throws IOException { } public Row getRow ( String key , String cf , long sinceTimeStamp ) throws IOException { } public Row getRow ( String key , String cf , List < String > columns ) throws IOException { } void apply ( Row row ) throws IOException { } void applyNow ( Row row ) throws IOException { } public void flush ( boolean fRecovery ) throws IOException { } void load ( Row row ) throws IOException { } }

Fix:
bufIn . readUTF ( ) ;