Buggy code:
public final class MoreLikeThis { public static final int DEFAULT_MAX_NUM_TOKENS_PARSED = 5000 ; public static final Analyzer DEFAULT_ANALYZER = new StandardAnalyzer ( ) ; public static final int DEFAULT_MIN_TERM_FREQ = 2 ; public static final int DEFAULT_MIN_DOC_FREQ = 5 ; public static final boolean DEFAULT_BOOST = false ; public static final String [ ] DEFAULT_FIELD_NAMES = new String [ ] { "contents" } ; public static final int DEFAULT_MIN_WORD_LENGTH = 0 ; public static final int DEFAULT_MAX_WORD_LENGTH = 0 ; public static final Set DEFAULT_STOP_WORDS = null ; private Set stopWords = MoreLikeThis . DEFAULT_STOP_WORDS ; public static final int DEFAULT_MAX_QUERY_TERMS = 25 ; private Analyzer analyzer = MoreLikeThis . DEFAULT_ANALYZER ; private int minTermFreq = MoreLikeThis . DEFAULT_MIN_TERM_FREQ ; private int minDocFreq = MoreLikeThis . DEFAULT_MIN_DOC_FREQ ; private boolean boost = MoreLikeThis . DEFAULT_BOOST ; private String [ ] fieldNames = MoreLikeThis . DEFAULT_FIELD_NAMES ; private int maxNumTokensParsed = MoreLikeThis . DEFAULT_MAX_NUM_TOKENS_PARSED ; private int minWordLen = MoreLikeThis . DEFAULT_MIN_WORD_LENGTH ; private int maxWordLen = MoreLikeThis . DEFAULT_MAX_WORD_LENGTH ; private int maxQueryTerms = MoreLikeThis . DEFAULT_MAX_QUERY_TERMS ; private Similarity similarity = new DefaultSimilarity ( ) ; private final IndexReader ir ; public MoreLikeThis ( IndexReader ir ) { } public Analyzer getAnalyzer ( ) { } public void setAnalyzer ( Analyzer analyzer ) { } public int getMinTermFreq ( ) { } public void setMinTermFreq ( int minTermFreq ) { } public int getMinDocFreq ( ) { } public void setMinDocFreq ( int minDocFreq ) { } public boolean isBoost ( ) { } public void setBoost ( boolean boost ) { } public String [ ] getFieldNames ( ) { } public void setFieldNames ( String [ ] fieldNames ) { } public int getMinWordLen ( ) { } public void setMinWordLen ( int minWordLen ) { } public int getMaxWordLen ( ) { } public void setMaxWordLen ( int maxWordLen ) { } public void setStopWords ( Set stopWords ) { } public Set getStopWords ( ) { } public int getMaxQueryTerms ( ) { } public void setMaxQueryTerms ( int maxQueryTerms ) { } public int getMaxNumTokensParsed ( ) { } public void setMaxNumTokensParsed ( int i ) { } public Query like ( int docNum ) throws IOException { } public Query like ( File f ) throws IOException { } public Query like ( URL u ) throws IOException { } public Query like ( InputStream is ) throws IOException { } public Query like ( Reader r ) throws IOException { } private Query createQuery ( PriorityQueue q ) { } private PriorityQueue createQueue ( Map words ) throws IOException { } public String describeParams ( ) { StringBuffer sb = new StringBuffer ( ) ; sb . append ( ( ( ( "\t" + "maxQueryTerms<seq2seq4repair_space>:<seq2seq4repair_space>" ) + ( maxQueryTerms ) ) + "\n" ) ) ; sb . append ( ( ( ( "\t" + "minWordLen<seq2seq4repair_space>:<seq2seq4repair_space>" ) + ( minWordLen ) ) + "\n" ) ) ; sb . append ( ( ( ( "\t" + "maxWordLen<seq2seq4repair_space>:<seq2seq4repair_space>" ) + ( maxWordLen ) ) + "\n" ) ) ; <START_BUG> sb . append ( ( "\t" + "fieldNames<seq2seq4repair_space>:<seq2seq4repair_space>\"" ) ) ; <END_BUG> String delim = "" ; for ( int i = 0 ; i < ( fieldNames . length ) ; i ++ ) { String fieldName = fieldNames [ i ] ; sb . append ( delim ) . append ( fieldName ) ; delim = ",<seq2seq4repair_space>" ; } sb . append ( "\n" ) ; sb . append ( ( ( ( "\t" + "boost<seq2seq4repair_space>:<seq2seq4repair_space>" ) + ( boost ) ) + "\n" ) ) ; sb . append ( ( ( ( "\t" + "minTermFreq<seq2seq4repair_space>:<seq2seq4repair_space>" ) + ( minTermFreq ) ) + "\n" ) ) ; sb . append ( ( ( ( "\t" + "minDocFreq<seq2seq4repair_space>:<seq2seq4repair_space>" ) + ( minDocFreq ) ) + "\n" ) ) ; return sb . toString ( ) ; } public static void main ( String [ ] a ) throws Throwable { } private PriorityQueue retrieveTerms ( int docNum ) throws IOException { } private void addTermFrequencies ( Map termFreqMap , TermFreqVector vector ) { } private void addTermFrequencies ( Reader r , Map termFreqMap , String fieldName ) throws IOException { } private boolean isNoiseWord ( String term ) { } public PriorityQueue retrieveTerms ( Reader r ) throws IOException { } public String [ ] retrieveInterestingTerms ( Reader r ) throws IOException { } private static class FreqQ extends PriorityQueue { FreqQ ( int s ) { } protected boolean lessThan ( Object a , Object b ) { } } private static class Int { int x ; Int ( ) { } } }

Fix:
sb . append ( ( "\t" + "fieldNames<seq2seq4repair_space>:<seq2seq4repair_space>" ) ) ;