Buggy code:
public class PreparedQueryImpl implements PreparedQuery { private static Localizer _loc = Localizer . forPackage ( PreparedQueryImpl . class ) ; private final String _id ; private String _sql ; private boolean _initialized ; private Class < ? > _candidate ; private boolean _subclasses ; private QueryExpressions [ ] _exps ; private Class < ? > [ ] _projTypes ; private Map < Object , int [ ] > _userParamPositions ; private Map < Integer , Object > _template ; private SelectImpl select ; public PreparedQueryImpl ( String id , Query compiled ) { } public PreparedQueryImpl ( String id , String sql , Query compiled ) { } public String getIdentifier ( ) { } public String getLanguage ( ) { } public String getOriginalQuery ( ) { } public String getTargetQuery ( ) { } void setTargetQuery ( String sql ) { } public boolean isInitialized ( ) { } public QueryExpressions [ ] getQueryExpressions ( ) { } public Class [ ] getProjectionTypes ( ) { } public void setInto ( Query q ) { } public Exclusion initialize ( Object result ) { } private Object [ ] extractSelectExecutor ( Object result ) { if ( ( result instanceof ResultList ) == false ) return new Object [ ] { null , PreparedQueryImpl . _loc . get ( "exclude-not-result" ) } ; Object userObject = ( ( ResultList < ? > ) ( result ) ) . getUserObject ( ) ; if ( ( ( userObject == null ) || ( ! ( userObject . getClass ( ) . isArray ( ) ) ) ) || ( ( ( ( Object [ ] ) ( userObject ) ) . length ) != 2 ) ) return new Object [ ] { null , PreparedQueryImpl . _loc . get ( "exclude-no-user-object" ) } ; Object provider = ( ( Object [ ] ) ( userObject ) ) [ 0 ] ; Object executor = ( ( Object [ ] ) ( userObject ) ) [ 1 ] ; if ( ( executor instanceof StoreQuery . Executor ) == false ) return new Object [ ] { null , PreparedQueryImpl . _loc . get ( "exclude-not-executor" ) } ; _exps = ( ( StoreQuery . Executor ) ( executor ) ) . getQueryExpressions ( ) ; if ( ( _exps [ 0 ] . projections . length ) == 0 ) { _projTypes = StoreQuery . EMPTY_CLASSES ; } else { _projTypes = new Class [ _exps [ 0 ] . projections . length ] ; for ( int i = 0 ; i < ( _exps [ 0 ] . projections . length ) ; i ++ ) { _projTypes [ i ] = _exps [ 0 ] . projections [ i ] . getType ( ) ; } } if ( provider instanceof QueryImpl . PackingResultObjectProvider ) { provider = ( ( QueryImpl . PackingResultObjectProvider ) ( provider ) ) . getDelegate ( ) ; } if ( provider instanceof RangeResultObjectProvider ) { provider = ( ( RangeResultObjectProvider ) ( provider ) ) . getDelegate ( ) ; } if ( provider instanceof SelectResultObjectProvider ) { return new Object [ ] { ( ( SelectResultObjectProvider ) ( provider ) ) . getSelect ( ) , null } ; } <START_BUG> return new Object [ ] { null , PreparedQueryImpl . _loc . get ( "exclude-not-select-rop" , provider ) } ; <END_BUG> } private SelectImpl extractImplementation ( SelectExecutor selector ) { } public Map < Integer , Object > reparametrize ( Map user , Broker broker ) { } private void setPersistenceCapableParameter ( Map < Integer , Object > result , Object pc , int [ ] indices , Broker broker ) { } private void setCollectionValuedParameter ( Map < Integer , Object > result , Collection values , int [ ] indices , Object param ) { } void setUserParameterPositions ( List list ) { } void setParameters ( List list ) { } SelectImpl getSelect ( ) { } public String toString ( ) { } }

Fix:
return new Object [ ] { null , PreparedQueryImpl . _loc . get ( "exclude-not-select-rop" , provider . getClass ( ) . getName ( ) ) } ;