Buggy code:
abstract class DMLModStatementNode extends DMLStatementNode { protected FromVTI targetVTI ; protected TableName targetTableName ; protected ResultColumnList resultColumnList ; protected int lockMode ; protected FKInfo [ ] fkInfo ; protected TriggerInfo triggerInfo ; public TableDescriptor targetTableDescriptor ; public IndexRowGenerator [ ] indicesToMaintain ; public long [ ] indexConglomerateNumbers ; public String [ ] indexNames ; protected ConstraintDescriptorList relevantCdl ; protected GenericDescriptorList relevantTriggers ; private boolean requiresDeferredProcessing ; private int statementType ; private boolean bound ; private ValueNode checkConstraints ; protected String [ ] fkTableNames ; protected int [ ] fkRefActions ; protected ColumnDescriptorList [ ] fkColDescriptors ; protected long [ ] fkIndexConglomNumbers ; protected boolean isDependentTable ; protected int [ ] [ ] fkColArrays ; protected Hashtable graphHashTable ; protected TableName synonymTableName ; public void init ( Object resultSet ) { } public void init ( Object resultSet , Object statementType ) { } void setTarget ( QueryTreeNode targetName ) { } protected void generateCodeForTemporaryTable ( ActivationClassBuilder acb , MethodBuilder mb ) throws StandardException { } void verifyTargetTable ( ) throws StandardException { } public boolean isAtomic ( ) { } public SchemaDescriptor getSchemaDescriptor ( ) throws StandardException { } public static int [ ] getReadColMap ( int column_map_length , FormatableBitSet readColsBitSet ) { } protected void getResultColumnList ( ) throws StandardException { } protected FromBaseTable getResultColumnList ( ResultColumnList inputRcl ) throws StandardException { <START_BUG> FromBaseTable fbt = ( ( FromBaseTable ) ( getNodeFactory ( ) . getNode ( FROM_BASE_TABLE , targetTableName , null , null , null , getContextManager ( ) ) ) ) ; <END_BUG> fbt . bindNonVTITables ( getDataDictionary ( ) , ( ( FromList ) ( getNodeFactory ( ) . getNode ( FROM_LIST , getNodeFactory ( ) . doJoinOrderOptimization ( ) , getContextManager ( ) ) ) ) ) ; getResultColumnList ( fbt , inputRcl ) ; return fbt ; } private void getResultColumnList ( FromBaseTable fromBaseTable , ResultColumnList inputRcl ) throws StandardException { } void parseAndBindGenerationClauses ( DataDictionary dataDictionary , TableDescriptor targetTableDescriptor , ResultColumnList sourceRCL , ResultColumnList targetRCL , boolean forUpdate , ResultSetNode updateResultSet ) throws StandardException { } public ValueNode parseGenerationClause ( String clauseText , TableDescriptor td ) throws StandardException { } ValueNode bindConstraints ( DataDictionary dataDictionary , NodeFactory nodeFactory , TableDescriptor targetTableDescriptor , Dependent dependent , ResultColumnList sourceRCL , int [ ] changedColumnIds , FormatableBitSet readColsBitSet , boolean skipCheckConstraints , boolean includeTriggers ) throws StandardException { } static void bindRowScopedExpression ( NodeFactory nodeFactory , ContextManager contextManager , TableDescriptor targetTableDescriptor , ResultColumnList sourceRCL , ValueNode expression ) throws StandardException { } protected boolean hasCheckConstraints ( DataDictionary dd , TableDescriptor td ) throws StandardException { } protected boolean hasGenerationClauses ( TableDescriptor td ) throws StandardException { } private ValueNode generateCheckTree ( ConstraintDescriptorList cdl , TableDescriptor td ) throws StandardException { } private void generateFKInfo ( ConstraintDescriptorList cdl , DataDictionary dd , TableDescriptor td , FormatableBitSet readColsBitSet ) throws StandardException { } private void fkSetupArrays ( DataDictionary dd , ForeignKeyConstraintDescriptor fkcd , int index , UUID [ ] uuids , long [ ] conglomNumbers , String [ ] fkNames , boolean [ ] isSelfReferencingFK , int [ ] raRules ) throws StandardException { } private void generateTriggerInfo ( GenericDescriptorList triggerList , TableDescriptor td , int [ ] changedCols ) throws StandardException { } public FKInfo [ ] getFKInfo ( ) { } public TriggerInfo getTriggerInfo ( ) { } public ValueNode getCheckConstraints ( ) { } private void createTriggerDependencies ( GenericDescriptorList tdl , Dependent dependent ) throws StandardException { } protected GenericDescriptorList getAllRelevantTriggers ( DataDictionary dd , TableDescriptor td , int [ ] changedColumnIds , boolean includeTriggers ) throws StandardException { } protected void adjustDeferredFlag ( boolean adjustment ) { } private void createConstraintDependencies ( DataDictionary dd , ConstraintDescriptorList cdl , Dependent dependent ) throws StandardException { } protected ConstraintDescriptorList getAllRelevantConstraints ( DataDictionary dd , TableDescriptor td , boolean skipCheckConstraints , int [ ] changedColumnIds ) throws StandardException { } public boolean requiresDeferredProcessing ( ) { } public ValueNode parseCheckConstraint ( String checkConstraintText , TableDescriptor td ) throws StandardException { } public void generateCheckConstraints ( ValueNode checkConstraints , ExpressionClassBuilder ecb , MethodBuilder mb ) throws StandardException { } public MethodBuilder generateCheckConstraints ( ValueNode checkConstraints , ExpressionClassBuilder ecb ) throws StandardException { } public void generateGenerationClauses ( ResultColumnList rcl , int resultSetNumber , boolean isUpdate , ExpressionClassBuilder ecb , MethodBuilder mb ) throws StandardException { } private MethodBuilder generateGenerationClauses ( ResultColumnList rcl , int rsNumber , boolean isUpdate , ExpressionClassBuilder ecb ) throws StandardException { } public void optimizeStatement ( ) throws StandardException { } protected void getAffectedIndexes ( TableDescriptor td , ResultColumnList updatedColumns , FormatableBitSet colBitSet ) throws StandardException { } static void getXAffectedIndexes ( TableDescriptor baseTable , ResultColumnList updatedColumns , FormatableBitSet colBitSet , Vector conglomVector ) throws StandardException { } protected void markAffectedIndexes ( Vector affectedConglomerates ) throws StandardException { } public String statementToString ( ) { } private int [ ] remapReferencedColumns ( ConstraintDescriptor cd , int [ ] rowMap ) { } private int [ ] getRowMap ( FormatableBitSet bitSet , TableDescriptor td ) throws StandardException { } public void setRefActionInfo ( long fkIndexConglomId , int [ ] fkColArray , String parentResultSetId , boolean dependentScan ) { } public void normalizeSynonymColumns ( ResultColumnList rcl , TableName targetTableName ) throws StandardException { } public void printSubNodes ( int depth ) { } void acceptChildren ( Visitor v ) throws StandardException { } }

Fix:
FromBaseTable fbt = ( ( FromBaseTable ) ( getNodeFactory ( ) . getNode ( FROM_BASE_TABLE , ( ( synonymTableName ) != null ? synonymTableName : targetTableName ) , null , null , null , getContextManager ( ) ) ) ) ;