Buggy code:
public class Heap extends GenericConglomerate implements StaticCompiledOpenConglomInfo , Conglomerate { protected int conglom_format_id ; private ContainerKey id ; int [ ] format_ids ; protected int [ ] collation_ids ; private boolean hasCollatedTypes ; private static final int BASE_MEMORY_USAGE = ClassSize . estimateBaseFromCatalog ( Heap . class ) ; private static final int CONTAINER_KEY_MEMORY_USAGE = ClassSize . estimateBaseFromCatalog ( ContainerKey . class ) ; public int estimateMemoryUsage ( ) { } public Heap ( ) { } protected void create ( Transaction rawtran , int segmentId , long input_containerid , DataValueDescriptor [ ] template , ColumnOrdering [ ] columnOrder , int [ ] collationIds , Properties properties , int conglom_format_id , int tmpFlag ) throws StandardException { } public void boot_create ( long containerid , DataValueDescriptor [ ] template ) { } public void addColumn ( TransactionManager xact_manager , int column_id , Storable template_column , int collation_id ) throws StandardException { } public void drop ( TransactionManager xact_manager ) throws StandardException { } public boolean fetchMaxOnBTree ( TransactionManager xact_manager , Transaction rawtran , long conglomId , int open_mode , int lock_level , LockingPolicy locking_policy , int isolation_level , FormatableBitSet scanColumnList , DataValueDescriptor [ ] fetchRow ) throws StandardException { } public final ContainerKey getId ( ) { } public final long getContainerid ( ) { } public DynamicCompiledOpenConglomInfo getDynamicCompiledConglomInfo ( ) throws StandardException { } public StaticCompiledOpenConglomInfo getStaticCompiledConglomInfo ( TransactionController tc , long conglomId ) throws StandardException { } public boolean isTemporary ( ) { } public long load ( TransactionManager xact_manager , boolean createConglom , RowLocationRetRowSource rowSource ) throws StandardException { } public ConglomerateController open ( TransactionManager xact_manager , Transaction rawtran , boolean hold , int open_mode , int lock_level , LockingPolicy locking_policy , StaticCompiledOpenConglomInfo static_info , DynamicCompiledOpenConglomInfo dynamic_info ) throws StandardException { } public ScanManager openScan ( TransactionManager xact_manager , Transaction rawtran , boolean hold , int open_mode , int lock_level , LockingPolicy locking_policy , int isolation_level , FormatableBitSet scanColumnList , DataValueDescriptor [ ] startKeyValue , int startSearchOperator , Qualifier [ ] [ ] qualifier , DataValueDescriptor [ ] stopKeyValue , int stopSearchOperator , StaticCompiledOpenConglomInfo static_info , DynamicCompiledOpenConglomInfo dynamic_info ) throws StandardException { } public void purgeConglomerate ( TransactionManager xact_manager , Transaction rawtran ) throws StandardException { OpenConglomerate open_for_ddl_lock = null ; HeapController heapcontroller = null ; TransactionManager nested_xact = null ; try { open_for_ddl_lock = new OpenHeap ( ) ; if ( ( open_for_ddl_lock . init ( ( ( ContainerHandle ) ( null ) ) , this , this . format_ids , this . collation_ids , xact_manager , rawtran , false , OPENMODE_FORUPDATE , MODE_RECORD , null , null ) ) == null ) { throw StandardException . newException ( HEAP_CONTAINER_NOT_FOUND , new Long ( id . getContainerId ( ) ) ) ; } <START_BUG> nested_xact = ( ( TransactionManager ) ( xact_manager . startNestedUserTransaction ( false ) ) ) ; <END_BUG> OpenConglomerate open_conglom = new OpenHeap ( ) ; if ( ( open_conglom . init ( ( ( ContainerHandle ) ( null ) ) , this , this . format_ids , this . collation_ids , nested_xact , nested_xact . getRawStoreXact ( ) , true , OPENMODE_FORUPDATE , MODE_RECORD , nested_xact . getRawStoreXact ( ) . newLockingPolicy ( LockingPolicy . MODE_RECORD , ISOLATION_REPEATABLE_READ , true ) , null ) ) == null ) { throw StandardException . newException ( HEAP_CONTAINER_NOT_FOUND , new Long ( id . getContainerId ( ) ) . toString ( ) ) ; } heapcontroller = new HeapController ( ) ; heapcontroller . init ( open_conglom ) ; Page page = open_conglom . getContainer ( ) . getFirstPage ( ) ; boolean purgingDone = false ; while ( page != null ) { long pageno = page . getPageNumber ( ) ; purgingDone = heapcontroller . purgeCommittedDeletes ( page ) ; if ( purgingDone ) { page = null ; open_conglom . getXactMgr ( ) . commitNoSync ( RELEASE_LOCKS ) ; heapcontroller . closeForEndTransaction ( false ) ; open_conglom . reopen ( ) ; } else { page . unlatch ( ) ; page = null ; } page = open_conglom . getContainer ( ) . getNextPage ( pageno ) ; } } finally { if ( open_for_ddl_lock != null ) open_for_ddl_lock . close ( ) ; if ( heapcontroller != null ) heapcontroller . close ( ) ; if ( nested_xact != null ) { nested_xact . commitNoSync ( RELEASE_LOCKS ) ; nested_xact . destroy ( ) ; } } return ; } public void compressConglomerate ( TransactionManager xact_manager , Transaction rawtran ) throws StandardException { } public ScanManager defragmentConglomerate ( TransactionManager xact_manager , Transaction rawtran , boolean hold , int open_mode , int lock_level , LockingPolicy locking_policy , int isolation_level ) throws StandardException { } public StoreCostController openStoreCost ( TransactionManager xact_manager , Transaction rawtran ) throws StandardException { } public String toString ( ) { } public DataValueDescriptor getConglom ( ) { } public int getTypeFormatId ( ) { } public boolean isNull ( ) { } public void restoreToNull ( ) { } protected void writeExternal_v10_2 ( ObjectOutput out ) throws IOException { } public void writeExternal ( ObjectOutput out ) throws IOException { } private final void localReadExternal ( ObjectInput in ) throws IOException , ClassNotFoundException { } public void readExternal ( ObjectInput in ) throws IOException , ClassNotFoundException { } public void readExternalFromArray ( ArrayInputStream in ) throws IOException , ClassNotFoundException { } }

Fix:
nested_xact = ( ( TransactionManager ) ( xact_manager . startNestedUserTransaction ( false , true ) ) ) ;