Buggy code:
@ Deprecated final boolean hasNewAPI = ( VirtualMethod . compareImplementationDistance ( getClass ( ) , QueryParserBase . getFieldQueryWithQuotedMethod , QueryParserBase . getFieldQueryMethod ) ) >= 0 ; boolean autoGeneratePhraseQueries ; protected QueryParserBase ( ) { } public void init ( Version matchVersion , String f , Analyzer a ) { } public abstract void ReInit ( CharStream stream ) { } public abstract Query TopLevelQuery ( String field ) throws ParseException { } public Query parse ( String query ) throws ParseException { } public Analyzer getAnalyzer ( ) { } public String getField ( ) { } public final boolean getAutoGeneratePhraseQueries ( ) { } public final void setAutoGeneratePhraseQueries ( boolean value ) { } public float getFuzzyMinSim ( ) { } public void setFuzzyMinSim ( float fuzzyMinSim ) { } public int getFuzzyPrefixLength ( ) { } public void setFuzzyPrefixLength ( int fuzzyPrefixLength ) { } public void setPhraseSlop ( int phraseSlop ) { } public int getPhraseSlop ( ) { } public void setAllowLeadingWildcard ( boolean allowLeadingWildcard ) { } public boolean getAllowLeadingWildcard ( ) { } public void setEnablePositionIncrements ( boolean enable ) { } public boolean getEnablePositionIncrements ( ) { } public void setDefaultOperator ( Operator op ) { } public Operator getDefaultOperator ( ) { } public void setLowercaseExpandedTerms ( boolean lowercaseExpandedTerms ) { } public boolean getLowercaseExpandedTerms ( ) { } public void setMultiTermRewriteMethod ( MultiTermQuery . RewriteMethod method ) { } public RewriteMethod getMultiTermRewriteMethod ( ) { } public void setLocale ( Locale locale ) { } public Locale getLocale ( ) { } public void setDateResolution ( DateTools . Resolution dateResolution ) { } public void setDateResolution ( String fieldName , DateTools . Resolution dateResolution ) { } public Resolution getDateResolution ( String fieldName ) { } public void setRangeCollator ( Collator rc ) { } public Collator getRangeCollator ( ) { } protected void addClause ( List < BooleanClause > clauses , int conj , int mods , Query q ) { } @ Deprecated protected Query getFieldQuery ( String field , String queryText ) throws ParseException { } protected Query getFieldQuery ( String field , String queryText , boolean quoted ) throws ParseException { } protected Query getFieldQuery ( String field , String queryText , int slop ) throws ParseException { } @ Deprecated protected final Query getRangeQuery ( String field , String part1 , String part2 , boolean inclusive ) throws QueryParserBase . MethodRemovedUseAnother { } protected Query getRangeQuery ( String field , String part1 , String part2 , boolean startInclusive , boolean endInclusive ) throws ParseException { } protected BooleanQuery newBooleanQuery ( boolean disableCoord ) { } protected BooleanClause newBooleanClause ( Query q , BooleanClause . Occur occur ) { } protected Query newTermQuery ( Term term ) { } protected PhraseQuery newPhraseQuery ( ) { } protected MultiPhraseQuery newMultiPhraseQuery ( ) { } protected Query newPrefixQuery ( Term prefix ) { } protected Query newRegexpQuery ( Term regexp ) { } protected Query newFuzzyQuery ( Term term , float minimumSimilarity , int prefixLength ) { } @ Deprecated protected final Query newRangeQuery ( String field , String part1 , String part2 , boolean inclusive ) throws QueryParserBase . MethodRemovedUseAnother { } protected Query newRangeQuery ( String field , String part1 , String part2 , boolean startInclusive , boolean endInclusive ) { } protected Query newMatchAllDocsQuery ( ) { } protected Query newWildcardQuery ( Term t ) { } protected Query getBooleanQuery ( List < BooleanClause > clauses ) throws ParseException { } protected Query getBooleanQuery ( List < BooleanClause > clauses , boolean disableCoord ) throws ParseException { } protected Query getWildcardQuery ( String field , String termStr ) throws ParseException { } protected Query getRegexpQuery ( String field , String termStr ) throws ParseException { } protected Query getPrefixQuery ( String field , String termStr ) throws ParseException { } protected Query getFuzzyQuery ( String field , String termStr , float minSimilarity ) throws ParseException { } Query handleBareTokenQuery ( String qfield , Token term , Token fuzzySlop , boolean prefix , boolean wildcard , boolean fuzzy , boolean regexp ) throws ParseException { Query q ; String termImage = discardEscapeChar ( term . image ) ; if ( wildcard ) { <START_BUG> q = getWildcardQuery ( qfield , termImage ) ; <END_BUG> } else if ( prefix ) { q = getPrefixQuery ( qfield , discardEscapeChar ( term . image . substring ( 0 , ( ( term . image . length ( ) ) - 1 ) ) ) ) ; } else if ( regexp ) { q = getRegexpQuery ( qfield , term . image . substring ( 1 , ( ( term . image . length ( ) ) - 1 ) ) ) ; } else if ( fuzzy ) { float fms = fuzzyMinSim ; try { fms = Float . valueOf ( fuzzySlop . image . substring ( 1 ) ) . floatValue ( ) ; } catch ( Exception ignored ) { } if ( fms < 0.0F ) { throw new ParseException ( "Minimum<seq2seq4repair_space>similarity<seq2seq4repair_space>for<seq2seq4repair_space>a<seq2seq4repair_space>FuzzyQuery<seq2seq4repair_space>has<seq2seq4repair_space>to<seq2seq4repair_space>be<seq2seq4repair_space>between<seq2seq4repair_space>0.0f<seq2seq4repair_space>and<seq2seq4repair_space>1.0f<seq2seq4repair_space>!" ) ; } else if ( ( fms >= 1.0F ) && ( fms != ( ( int ) ( fms ) ) ) ) { throw new ParseException ( "Fractional<seq2seq4repair_space>edit<seq2seq4repair_space>distances<seq2seq4repair_space>are<seq2seq4repair_space>not<seq2seq4repair_space>allowed!" ) ; } q = getFuzzyQuery ( qfield , termImage , fms ) ; } else { q = ( hasNewAPI ) ? getFieldQuery ( qfield , termImage , false ) : getFieldQuery ( qfield , termImage ) ; } return q ; } Query handleQuotedTerm ( String qfield , Token term , Token fuzzySlop ) throws ParseException { } Query handleBoost ( Query q , Token boost ) throws ParseException { } String discardEscapeChar ( String input ) throws ParseException { } static final int hexToInt ( char c ) throws ParseException { } public static String escape ( String s ) { } }

Fix:
q = getWildcardQuery ( qfield , term . image ) ;