Buggy code:
class AlterTableConstantAction extends DDLSingleTableConstantAction implements RowLocationRetRowSource { private SchemaDescriptor sd ; private String tableName ; private UUID schemaId ; private int tableType ; private ColumnInfo [ ] columnInfo ; private ConstraintConstantAction [ ] constraintActions ; private char lockGranularity ; private long tableConglomerateId ; private boolean compressTable ; private int behavior ; private boolean sequential ; private boolean truncateTable ; private boolean purge ; private boolean defragment ; private boolean truncateEndOfTable ; private boolean updateStatistics ; private boolean updateStatisticsAll ; private boolean dropStatistics ; private boolean dropStatisticsAll ; private String indexNameForStatistics ; private boolean doneScan ; private boolean [ ] needToDropSort ; private boolean [ ] validRow ; private int bulkFetchSize = 16 ; private int currentCompressRow ; private int numIndexes ; private int rowCount ; private long estimatedRowCount ; private long [ ] indexConglomerateNumbers ; private long [ ] sortIds ; private FormatableBitSet indexedCols ; private ConglomerateController compressHeapCC ; private ExecIndexRow [ ] indexRows ; private ExecRow [ ] baseRow ; private ExecRow currentRow ; private GroupFetchScanController compressHeapGSC ; private IndexRowGenerator [ ] compressIRGs ; private DataValueDescriptor [ ] [ ] baseRowArray ; private RowLocation [ ] compressRL ; private SortController [ ] sorters ; private int droppedColumnPosition ; private ColumnOrdering [ ] [ ] ordering ; private int [ ] [ ] collation ; private TableDescriptor td ; private LanguageConnectionContext lcc ; private DataDictionary dd ; private DependencyManager dm ; private TransactionController tc ; private Activation activation ; AlterTableConstantAction ( SchemaDescriptor sd , String tableName , UUID tableId , long tableConglomerateId , int tableType , ColumnInfo [ ] columnInfo , ConstraintConstantAction [ ] constraintActions , char lockGranularity , boolean compressTable , int behavior , boolean sequential , boolean truncateTable , boolean purge , boolean defragment , boolean truncateEndOfTable , boolean updateStatistics , boolean updateStatisticsAll , boolean dropStatistics , boolean dropStatisticsAll , String indexNameForStatistics ) { } public String toString ( ) { } public void executeConstantAction ( Activation activation ) throws StandardException { } private void executeConstantActionBody ( Activation activation ) throws StandardException { } private void clearState ( ) { } private void dropStatistics ( ) throws StandardException { } private void updateStatistics ( ) throws StandardException { ConglomerateDescriptor [ ] cds ; td = dd . getTableDescriptor ( tableId ) ; if ( updateStatisticsAll ) { <START_BUG> cds = td . getConglomerateDescriptors ( ) ; <END_BUG> } else { cds = new ConglomerateDescriptor [ 1 ] ; cds [ 0 ] = dd . getConglomerateDescriptor ( indexNameForStatistics , sd , false ) ; } dd . getIndexStatsRefresher ( false ) . runExplicitly ( lcc , td , cds , "ALTER<seq2seq4repair_space>TABLE" ) ; } private void truncateEnd ( TransactionController tc ) throws StandardException { } private void defragmentRows ( TransactionController tc ) throws StandardException { } private static void setup_indexes ( TransactionController tc , TableDescriptor td , int [ ] [ ] index_col_map , ScanController [ ] index_scan , ConglomerateController [ ] index_cc , DataValueDescriptor [ ] [ ] index_row ) throws StandardException { } private static void fixIndex ( DataValueDescriptor [ ] base_row , DataValueDescriptor [ ] index_row , RowLocation old_row_loc , RowLocation new_row_loc , ConglomerateController index_cc , ScanController index_scan , int [ ] index_col_map ) throws StandardException { } private void purgeRows ( TransactionController tc ) throws StandardException { } private void addNewColumnToTable ( int ix ) throws StandardException { } private void dropColumnFromTable ( String columnName ) throws StandardException { } private void columnDroppedAndTriggerDependencies ( TriggerDescriptor trd , boolean cascade , String columnName ) throws StandardException { } private void modifyColumnType ( int ix ) throws StandardException { } private void modifyColumnConstraint ( String colName , boolean nullability ) throws StandardException { } private void modifyColumnDefault ( int ix ) throws StandardException { } private void compressTable ( ) throws StandardException { } private void truncateTable ( ) throws StandardException { } private void updateAllIndexes ( long newHeapConglom , DataDictionary dd ) throws StandardException { } private void updateIndex ( long newHeapConglom , DataDictionary dd , int index , long [ ] newIndexCongloms ) throws StandardException { } private void getAffectedIndexes ( ) throws StandardException { } private void createNewBackingCongloms ( ArrayList newConglomActions , long [ ] ixCongNums ) throws StandardException { } private void setUpAllSorts ( ExecRow sourceRow , RowLocation rl ) throws StandardException { } public FormatableBitSet getValidColumns ( ) { } public DataValueDescriptor [ ] getNextRowFromRowSource ( ) throws StandardException { } public boolean needsToClone ( ) { } public void closeRowSource ( ) { } public boolean needsRowLocation ( ) { } public void rowLocation ( RowLocation rl ) throws StandardException { } private void objectifyStreamingColumns ( ) throws StandardException { } private void insertIntoSorter ( int index , RowLocation rl ) throws StandardException { } private void cleanUp ( ) throws StandardException { } private int getSemiRowCount ( TransactionController tc ) throws StandardException { } private void updateNewColumnToDefault ( ColumnDescriptor columnDescriptor ) throws StandardException { } private static void executeUpdate ( LanguageConnectionContext lcc , String updateStmt ) throws StandardException { } private long getColumnMax ( TableDescriptor td , String columnName , long increment ) throws StandardException { } private void openBulkFetchScan ( long heapConglomNumber ) throws StandardException { } private void closeBulkFetchScan ( ) throws StandardException { } private void updateNewAutoincrementColumn ( String columnName , long initial , long increment ) throws StandardException { } private boolean validateNotNullConstraint ( String [ ] columnNames , boolean [ ] nullCols , int numRows , LanguageConnectionContext lcc , String errorMsg ) throws StandardException { } private Object [ ] compressIndexArrays ( long [ ] indexCIDS , IndexRowGenerator [ ] irgs ) { } }

Fix:
cds = null ;