Buggy code:
public class DatabaseDescriptor { private static Logger logger = LoggerFactory . getLogger ( DatabaseDescriptor . class ) ; public static final String random = "RANDOM" ; public static final String ophf = "OPHF" ; private static IEndpointSnitch snitch ; private static InetAddress listenAddress ; private static InetAddress rpcAddress ; private static Set < InetAddress > seeds = new HashSet < InetAddress > ( ) ; private static int currentIndex = 0 ; private static int consistencyThreads = 4 ; static Map < String , KSMetaData > tables = new HashMap < String , KSMetaData > ( ) ; private static IPartitioner partitioner ; private static String configFileName ; private static DiskAccessMode indexAccessMode ; private static Config conf ; private static IAuthenticator authenticator = new AllowAllAuthenticator ( ) ; private static final String STORAGE_CONF_FILE = "cassandra.yaml" ; private static final UUID INITIAL_VERSION = new UUID ( 4096 , 0 ) ; private static UUID defsVersion = DatabaseDescriptor . INITIAL_VERSION ; static String getStorageConfigPath ( ) throws ConfigurationException { } private static int stageQueueSize_ = 4096 ; private static IEndpointSnitch createEndpointSnitch ( String endpointSnitchClassName ) throws ConfigurationException { } public static void loadSchemas ( ) throws IOException { } public static Collection < KSMetaData > readTablesFromYaml ( ) throws ConfigurationException { List < KSMetaData > defs = new ArrayList < KSMetaData > ( ) ; for ( Keyspace keyspace : DatabaseDescriptor . conf . keyspaces ) { if ( ( keyspace . name ) == null ) { throw new ConfigurationException ( "Keyspace<seq2seq4repair_space>name<seq2seq4repair_space>attribute<seq2seq4repair_space>is<seq2seq4repair_space>required" ) ; } if ( keyspace . name . equalsIgnoreCase ( SYSTEM_TABLE ) ) { throw new ConfigurationException ( "'system'<seq2seq4repair_space>is<seq2seq4repair_space>a<seq2seq4repair_space>reserved<seq2seq4repair_space>table<seq2seq4repair_space>name<seq2seq4repair_space>for<seq2seq4repair_space>Cassandra<seq2seq4repair_space>internals" ) ; } if ( ( keyspace . replica_placement_strategy ) == null ) { throw new ConfigurationException ( ( "Missing<seq2seq4repair_space>replica_placement_strategy<seq2seq4repair_space>directive<seq2seq4repair_space>for<seq2seq4repair_space>" + ( keyspace . name ) ) ) ; } Class < ? extends AbstractReplicationStrategy > strategyClass = null ; try { strategyClass = ( ( Class < ? extends AbstractReplicationStrategy > ) ( Class . forName ( keyspace . replica_placement_strategy ) ) ) ; } catch ( ClassNotFoundException e ) { throw new ConfigurationException ( ( "Invalid<seq2seq4repair_space>replicaplacementstrategy<seq2seq4repair_space>class<seq2seq4repair_space>" + ( keyspace . replica_placement_strategy ) ) ) ; } if ( ( keyspace . replication_factor ) == null ) { throw new ConfigurationException ( ( "Missing<seq2seq4repair_space>replication_factor<seq2seq4repair_space>directory<seq2seq4repair_space>for<seq2seq4repair_space>keyspace<seq2seq4repair_space>" + ( keyspace . name ) ) ) ; } int size2 = keyspace . column_families . length ; CFMetaData [ ] cfDefs = new CFMetaData [ size2 ] ; int j = 0 ; for ( ColumnFamily cf : keyspace . column_families ) { if ( ( cf . name ) == null ) { throw new ConfigurationException ( "ColumnFamily<seq2seq4repair_space>name<seq2seq4repair_space>attribute<seq2seq4repair_space>is<seq2seq4repair_space>required" ) ; } if ( cf . name . contains ( "-" ) ) { throw new ConfigurationException ( "ColumnFamily<seq2seq4repair_space>names<seq2seq4repair_space>cannot<seq2seq4repair_space>contain<seq2seq4repair_space>hyphens" ) ; } String columnType = org . apache . cassandra . db . ColumnFamily . getColumnType ( cf . column_type ) ; if ( columnType == null ) { throw new ConfigurationException ( ( ( ( "ColumnFamily<seq2seq4repair_space>" + ( cf . name ) ) + "<seq2seq4repair_space>has<seq2seq4repair_space>invalid<seq2seq4repair_space>type<seq2seq4repair_space>" ) + ( cf . column_type ) ) ) ; } AbstractType comparator = DatabaseDescriptor . getComparator ( cf . compare_with ) ; AbstractType subcolumnComparator = null ; if ( columnType . equals ( "Super" ) ) { subcolumnComparator = DatabaseDescriptor . getComparator ( cf . compare_subcolumns_with ) ; } else if ( ( cf . compare_subcolumns_with ) != null ) { throw new ConfigurationException ( ( ( "compare_subcolumns_with<seq2seq4repair_space>is<seq2seq4repair_space>only<seq2seq4repair_space>a<seq2seq4repair_space>valid<seq2seq4repair_space>attribute<seq2seq4repair_space>on<seq2seq4repair_space>super<seq2seq4repair_space>columnfamilies<seq2seq4repair_space>(not<seq2seq4repair_space>regular<seq2seq4repair_space>columnfamily<seq2seq4repair_space>" + ( cf . name ) ) + ")" ) ) ; } if ( ( ( cf . read_repair_chance ) < 0.0 ) || ( ( cf . read_repair_chance ) > 1.0 ) ) { throw new ConfigurationException ( "read_repair_chance<seq2seq4repair_space>must<seq2seq4repair_space>be<seq2seq4repair_space>between<seq2seq4repair_space>0.0<seq2seq4repair_space>and<seq2seq4repair_space>1.0" ) ; } <START_BUG> cfDefs [ ( j ++ ) ] = new CFMetaData ( keyspace . name , cf . name , columnType , comparator , subcolumnComparator , cf . comment , cf . rows_cached , cf . preloadRowCache , cf . keys_cached , cf . read_repair_chance ) ; <END_BUG> } defs . add ( new KSMetaData ( keyspace . name , strategyClass , keyspace . replication_factor , cfDefs ) ) ; } return defs ; } public static IAuthenticator getAuthenticator ( ) { } public static boolean isThriftFramed ( ) { } public static AbstractType getComparator ( String compareWith ) throws ConfigurationException { } public static void createAllDirectories ( ) throws IOException { } public static int getGcGraceInSeconds ( ) { } public static IPartitioner getPartitioner ( ) { } public static IEndpointSnitch getEndpointSnitch ( ) { } public static Class < ? extends AbstractReplicationStrategy > getReplicaPlacementStrategyClass ( String table ) { } public static String getJobTrackerAddress ( ) { } public static int getColumnIndexSize ( ) { } public static int getMemtableLifetimeMS ( ) { } public static String getInitialToken ( ) { } public static int getMemtableThroughput ( ) { } public static double getMemtableOperations ( ) { } public static String getClusterName ( ) { } public static String getConfigFileName ( ) { } public static String getJobJarLocation ( ) { } public static Map < String , CFMetaData > getTableMetaData ( String tableName ) { } public static CFMetaData getCFMetaData ( String tableName , String cfName ) { } public static String getColumnType ( String tableName , String cfName ) { } public static Set < String > getTables ( ) { } public static List < String > getNonSystemTables ( ) { } public static int getStoragePort ( ) { } public static int getRpcPort ( ) { } public static int getReplicationFactor ( String table ) { } public static int getQuorum ( String table ) { } public static long getRpcTimeout ( ) { } public static int getConsistencyThreads ( ) { } public static int getConcurrentReaders ( ) { } public static int getConcurrentWriters ( ) { } public static long getRowWarningThreshold ( ) { } public static String [ ] getAllDataFileLocations ( ) { }

Fix:
cfDefs [ ( j ++ ) ] = new CFMetaData ( keyspace . name , cf . name , columnType , comparator , subcolumnComparator , cf . comment , cf . rows_cached , cf . preload_row_cache , cf . keys_cached , cf . read_repair_chance ) ;