Buggy code:
public class FromList extends QueryTreeNodeVector implements OptimizableList { Properties properties ; boolean fixedJoinOrder = true ; boolean useStatistics = true ; public void init ( Object optimizeJoinOrder ) { } public void init ( Object optimizeJoinOrder , Object fromTable ) throws StandardException { } public Optimizable getOptimizable ( int index ) { } public void setOptimizable ( int index , Optimizable optimizable ) { } public void verifyProperties ( DataDictionary dDictionary ) throws StandardException { } public void addFromTable ( FromTable fromTable ) throws StandardException { } public boolean referencesTarget ( String name , boolean baseTable ) throws StandardException { } public boolean referencesSessionSchema ( ) throws StandardException { } protected FromTable getFromTableByName ( String name , String schemaName , boolean exactMatch ) throws StandardException { } public void bindTables ( DataDictionary dataDictionary , FromList fromListParam ) throws StandardException { } public void bindExpressions ( ) throws StandardException { } public void bindResultColumns ( FromList fromListParam ) throws StandardException { } public boolean hasOuterJoins ( ) throws StandardException { } public ResultColumnList expandAll ( TableName allTableName ) throws StandardException { } public ResultColumn bindColumnReference ( ColumnReference columnReference ) throws StandardException { boolean columnNameMatch = false ; boolean tableNameMatch = false ; FromTable fromTable ; int currentLevel = - 1 ; int previousLevel = - 1 ; ResultColumn matchingRC = null ; ResultColumn resultColumn ; String crTableName = columnReference . getTableName ( ) ; int size = size ( ) ; for ( int index = 0 ; index < size ; index ++ ) { fromTable = ( ( FromTable ) ( elementAt ( index ) ) ) ; currentLevel = fromTable . getLevel ( ) ; if ( previousLevel != currentLevel ) { if ( columnNameMatch ) { break ; } if ( tableNameMatch ) { break ; } } previousLevel = currentLevel ; resultColumn = fromTable . getMatchingColumn ( columnReference ) ; if ( resultColumn != null ) { if ( ! columnNameMatch ) { matchingRC = resultColumn ; columnReference . setSource ( resultColumn ) ; columnReference . setType ( resultColumn . getTypeServices ( ) ) ; columnReference . setNestingLevel ( ( ( FromTable ) ( elementAt ( 0 ) ) ) . getLevel ( ) ) ; columnReference . setSourceLevel ( currentLevel ) ; columnNameMatch = true ; } else { <START_BUG> throw StandardException . newException ( LANG_AMBIGUOUS_COLUMN_NAME , columnReference . getFullColumnName ( ) ) ; <END_BUG> } } tableNameMatch = tableNameMatch || ( ( crTableName != null ) && ( crTableName . equals ( fromTable . getExposedName ( ) ) ) ) ; } return matchingRC ; } public void rejectParameters ( ) throws StandardException { } public boolean LOJ_reorderable ( int numTables ) throws StandardException { } public void preprocess ( int numTables , GroupByList gbl , ValueNode predicateTree ) throws StandardException { } public void flattenFromTables ( ResultColumnList rcl , PredicateList predicateList , SubqueryList sql , GroupByList gbl ) throws StandardException { } void pushPredicates ( PredicateList predicateList ) throws StandardException { } public void printSubNodes ( int depth ) { } public void setLevel ( int level ) { } void markStatementResultSet ( ) { } public FromTable getFromTableByResultColumn ( ResultColumn rc ) { } public void setProperties ( Properties props ) throws StandardException { } public void reOrder ( int [ ] joinOrder ) { } public boolean useStatistics ( ) { } public boolean optimizeJoinOrder ( ) { } public boolean legalJoinOrder ( int numTablesInQuery ) { } public void initAccessPaths ( Optimizer optimizer ) { } public void bindUntypedNullsToResultColumns ( ResultColumnList bindingRCL ) throws StandardException { } void decrementLevel ( int decrement ) { } boolean returnsAtMostSingleRow ( ResultColumnList rcl , ValueNode whereClause , PredicateList wherePredicates , DataDictionary dd ) throws StandardException { } int [ ] getTableNumbers ( ) { } void genExistsBaseTables ( JBitSet referencedTableMap , FromList outerFromList , boolean isNotExists ) throws StandardException { } public int updateTargetLockMode ( ) { } boolean hashJoinSpecified ( ) { } public Visitable accept ( Visitor v ) throws StandardException { } }

Fix:
throw StandardException . newException ( LANG_AMBIGUOUS_COLUMN_NAME , columnReference . getSQLColumnName ( ) ) ;