Buggy code:
public class HibernateCaster { private static final int NULL = - 178696 ; private static final Key ENTITY_NAME = KeyImpl . intern ( "entityname" ) ; public static Object toCFML ( Object src ) { } public static Array toCFML ( List src ) { } public static String getEntityName ( Component cfc ) { } private static String getName ( Component cfc ) { } public static int cascade ( HibernateORMEngine engine , String cascade ) throws ORMException { } public static int cascade ( String cascade , int defaultValue ) { } public static int collectionType ( HibernateORMEngine engine , String strCollectionType ) throws ORMException { } public static int collectionType ( String strCollectionType , int defaultValue ) { } public static String toHibernateType ( ColumnInfo info , String type , String defaultValue ) { } public static int toSQLType ( String type , int defaultValue ) { } public static String toHibernateType ( ColumnInfo info , String defaultValue ) { } public static String toHibernateType ( int type , int size , String defaultValue ) { } public static String toHibernateType ( HibernateORMEngine engine , String type ) throws ORMException { } public static String toHibernateType ( String type , String defaultValue ) { } public static Object toSQL ( HibernateORMEngine engine , ColumnInfo ci , Object value ) throws PageException { } public static Object toSQL ( HibernateORMEngine engine , Type type , Object value ) throws PageException { } private static Object toSQL ( HibernateORMEngine engine , int sqlType , Object value ) throws PageException { } public static Query toQuery ( PageContext pc , HibernateORMSession session , Object obj , String name ) throws PageException { Query qry = null ; if ( ! ( Decision . isArray ( obj ) ) ) { qry = HibernateCaster . toQuery ( pc , session , ComponentUtil . toComponentPro ( HibernateCaster . toComponent ( obj ) ) , name , null , 1 , 1 ) ; } else { Array arr = Caster . toArray ( obj ) ; int len = arr . size ( ) ; if ( len > 0 ) { Iterator it = arr . valueIterator ( ) ; int row = 1 ; while ( it . hasNext ( ) ) { qry = HibernateCaster . toQuery ( pc , session , ComponentUtil . toComponentPro ( HibernateCaster . toComponent ( it . next ( ) ) ) , name , qry , len , ( row ++ ) ) ; } } else <START_BUG> qry = new railo . runtime . type . QueryImpl ( new Collection . Key [ 0 ] , 1 , "orm" ) ; <END_BUG> } if ( qry == null ) { if ( ! ( StringUtil . isEmpty ( name ) ) ) throw new ORMException ( session . getEngine ( ) , ( ( "there<seq2seq4repair_space>is<seq2seq4repair_space>no<seq2seq4repair_space>entity<seq2seq4repair_space>inheritance<seq2seq4repair_space>that<seq2seq4repair_space>match<seq2seq4repair_space>the<seq2seq4repair_space>name<seq2seq4repair_space>[" + name ) + "]" ) ) ; throw new ORMException ( session . getEngine ( ) , "cannot<seq2seq4repair_space>create<seq2seq4repair_space>query" ) ; } return qry ; } private static Query toQuery ( PageContext pc , HibernateORMSession session , ComponentPro cfc , String entityName , Query qry , int rowcount , int row ) throws PageException { } private static Query populateQuery ( PageContext pc , HibernateORMSession session , ComponentPro cfc , Query qry ) throws PageException { } private static Query inheritance ( PageContext pc , HibernateORMSession session , ComponentPro cfc , Query qry , String entityName ) throws PageException { } private static Query inheritance ( PageContext pc , HibernateORMSession session , Query qry , ComponentPro parent , ComponentPro child , String entityName ) throws PageException { } public static String toComponentName ( Component cfc ) { } public static Component toComponent ( Object obj ) throws PageException { } }

Fix:
qry = new railo . runtime . type . QueryImpl ( new Collection . Key [ 0 ] , 0 , "orm" ) ;