Buggy code:
public class SimpleQParserPlugin extends QParserPlugin { public static String NAME = "simple" ; private static final String AND_OPERATOR = "AND" ; private static final String NOT_OPERATOR = "NOT" ; private static final String OR_OPERATOR = "OR" ; private static final String PREFIX_OPERATOR = "PREFIX" ; private static final String PHRASE_OPERATOR = "PHRASE" ; private static final String PRECEDENCE_OPERATORS = "PRECEDENCE" ; private static final String ESCAPE_OPERATOR = "ESCAPE" ; private static final String WHITESPACE_OPERATOR = "WHITESPACE" ; private static final Map < String , Integer > OPERATORS = new HashMap < String , Integer > ( ) ; @ Override public void init ( NamedList args ) { } @ Override public QParser createParser ( String qstr , SolrParams localParams , SolrParams params , SolrQueryRequest req ) { SolrParams defaultParams = SolrParams . wrapDefaults ( localParams , params ) ; Map < String , Float > queryFields = SolrPluginUtils . parseFieldBoosts ( defaultParams . get ( QF ) ) ; if ( queryFields . isEmpty ( ) ) { String defaultField = QueryParsing . getDefaultField ( req . getSchema ( ) , defaultParams . get ( DF ) ) ; if ( defaultField == null ) { throw new IllegalStateException ( ( ( ( ( "Neither<seq2seq4repair_space>" + ( SimpleParams . QF ) ) + ",<seq2seq4repair_space>" ) + ( CommonParams . DF ) ) + ",<seq2seq4repair_space>nor<seq2seq4repair_space>the<seq2seq4repair_space>default<seq2seq4repair_space>search<seq2seq4repair_space>field<seq2seq4repair_space>are<seq2seq4repair_space>present." ) ) ; } queryFields . put ( defaultField , 1.0F ) ; } else { for ( Map . Entry < String , Float > queryField : queryFields . entrySet ( ) ) { if ( ( queryField . getValue ( ) ) == null ) { queryField . setValue ( 1.0F ) ; } } } int enabledOps = 0 ; String opParam = defaultParams . get ( QO ) ; if ( opParam == null ) { enabledOps = - 1 ; } else { String [ ] operations = opParam . split ( "," ) ; for ( String operation : operations ) { <START_BUG> Integer enabledOp = SimpleQParserPlugin . OPERATORS . get ( operation . trim ( ) . toUpperCase ( Locale . getDefault ( ) ) ) ; <END_BUG> if ( enabledOp != null ) { enabledOps |= enabledOp ; } } } final IndexSchema schema = req . getSchema ( ) ; final SimpleQueryParser parser = new SimpleQueryParser ( req . getSchema ( ) . getAnalyzer ( ) , queryFields , enabledOps ) { @ Override protected Query newPrefixQuery ( String text ) { BooleanQuery bq = new BooleanQuery ( true ) ; for ( Map . Entry < String , Float > entry : weights . entrySet ( ) ) { String field = entry . getKey ( ) ; FieldType type = schema . getFieldType ( field ) ; Query prefix ; if ( type instanceof TextField ) { Analyzer analyzer = ( ( TextField ) ( type ) ) . getMultiTermAnalyzer ( ) ; String term = TextField . analyzeMultiTerm ( field , text , analyzer ) . utf8ToString ( ) ; prefix = new org . apache . lucene . search . PrefixQuery ( new Term ( field , term ) ) ; } else { prefix = new org . apache . lucene . search . PrefixQuery ( new Term ( entry . getKey ( ) , text ) ) ; } prefix . setBoost ( entry . getValue ( ) ) ; bq . add ( prefix , SHOULD ) ; } return simplify ( bq ) ; } } ; QueryParser . Operator defaultOp = QueryParsing . getQueryParserDefaultOperator ( req . getSchema ( ) , defaultParams . get ( OP ) ) ; if ( defaultOp == ( Operator . AND ) ) { parser . setDefaultOperator ( MUST ) ; } return new QParser ( qstr , localParams , params , req ) { public Query parse ( ) throws SyntaxError { return parser . parse ( qstr ) ; } } ; } }

Fix:
Integer enabledOp = SimpleQParserPlugin . OPERATORS . get ( operation . trim ( ) . toUpperCase ( Locale . ROOT ) ) ;