Buggy code:
public final class UpdateNode extends DMLModStatementNode { public int [ ] changedColumnIds ; public ExecRow emptyHeapRow ; public boolean deferred ; public ValueNode checkConstraints ; public FKInfo fkInfo ; protected FromTable targetTable ; protected FormatableBitSet readColsBitSet ; protected boolean positionedUpdate ; public static final String COLUMNNAME = "###RowLocationToUpdate" ; public void init ( Object targetTableName , Object resultSet ) { } public String toString ( ) { } public String statementToString ( ) { } public void printSubNodes ( int depth ) { } public void bindStatement ( ) throws StandardException { } int getPrivType ( ) { } public boolean referencesSessionSchema ( ) throws StandardException { } public ConstantAction makeConstantAction ( ) throws StandardException { } protected void setDeferredForUpdateOfIndexColumn ( ) { } public void generate ( ActivationClassBuilder acb , MethodBuilder mb ) throws StandardException { generateCodeForTemporaryTable ( acb , acb . getExecuteMethod ( ) ) ; if ( ! ( isDependentTable ) ) generateParameterValueSet ( acb ) ; acb . newFieldDeclaration ( Modifier . PRIVATE , CursorResultSet , acb . newRowLocationScanResultSetName ( ) ) ; acb . pushGetResultSetFactoryExpression ( mb ) ; resultSet . generate ( acb , mb ) ; if ( null != ( targetVTI ) ) { targetVTI . assignCostEstimate ( resultSet . getNewCostEstimate ( ) ) ; mb . callMethod ( INVOKEINTERFACE , ( ( String ) ( null ) ) , "getUpdateVTIResultSet" , ResultSet , 1 ) ; } else { <START_BUG> generateGenerationClauses ( resultColumnList , resultSet . getResultSetNumber ( ) , acb , mb ) ; <END_BUG> generateCheckConstraints ( checkConstraints , acb , mb ) ; if ( isDependentTable ) { mb . push ( acb . addItem ( makeConstantAction ( ) ) ) ; mb . push ( acb . addItem ( makeResultDescription ( ) ) ) ; mb . callMethod ( INVOKEINTERFACE , ( ( String ) ( null ) ) , "getDeleteCascadeUpdateResultSet" , ResultSet , 5 ) ; } else { mb . callMethod ( INVOKEINTERFACE , ( ( String ) ( null ) ) , "getUpdateResultSet" , ResultSet , 3 ) ; } } } protected final int getStatementType ( ) { } public FormatableBitSet getReadMap ( DataDictionary dd , TableDescriptor baseTable , ResultColumnList updateColumnList , ColumnDescriptorList affectedGeneratedColumns ) throws StandardException { } private int [ ] getChangedColumnIds ( ResultColumnList rcl ) { } public static FormatableBitSet getUpdateReadMap ( TableDescriptor baseTable , ResultColumnList updateColumnList , Vector conglomVector , ConstraintDescriptorList relevantConstraints , GenericDescriptorList relevantTriggers , boolean [ ] needsDeferredProcessing , ColumnDescriptorList affectedGeneratedColumns ) throws StandardException { } private static void addGeneratedColumnPrecursors ( TableDescriptor baseTable , ColumnDescriptorList affectedGeneratedColumns , FormatableBitSet columnMap ) throws StandardException { } private void addGeneratedColumns ( TableDescriptor baseTable , ResultSetNode updateSet , ColumnDescriptorList affectedGeneratedColumns , ColumnDescriptorList addedGeneratedColumns ) throws StandardException { } private void normalizeCorrelatedColumns ( ResultColumnList rcl , FromTable fromTable ) throws StandardException { } private void checkTableNameAndScrubResultColumns ( ResultColumnList rcl ) throws StandardException { } private void normalizeSynonymColumns ( ResultColumnList rcl , FromTable fromTable ) throws StandardException { } }

Fix:
generateGenerationClauses ( resultColumnList , resultSet . getResultSetNumber ( ) , true , acb , mb ) ;