Buggy code:
public class Field implements IndexableField { protected final FieldType type ; protected final String name ; protected Object fieldsData ; protected TokenStream tokenStream ; private transient TokenStream internalTokenStream ; private transient Field . ReusableStringReader internalReader ; protected float boost = 1.0F ; protected Field ( String name , FieldType type ) { } public Field ( String name , Reader reader , FieldType type ) { } public Field ( String name , TokenStream tokenStream , FieldType type ) { } public Field ( String name , byte [ ] value , FieldType type ) { } public Field ( String name , byte [ ] value , int offset , int length , FieldType type ) { } public Field ( String name , BytesRef bytes , FieldType type ) { } public Field ( String name , String value , FieldType type ) { } @ Override public String stringValue ( ) { } @ Override public Reader readerValue ( ) { } public TokenStream tokenStreamValue ( ) { } public void setStringValue ( String value ) { } public void setReaderValue ( Reader value ) { } public void setBytesValue ( byte [ ] value ) { } public void setBytesValue ( BytesRef value ) { if ( ! ( ( fieldsData ) instanceof BytesRef ) ) { throw new IllegalArgumentException ( ( ( "cannot<seq2seq4repair_space>change<seq2seq4repair_space>value<seq2seq4repair_space>type<seq2seq4repair_space>from<seq2seq4repair_space>" + ( fieldsData . getClass ( ) . getSimpleName ( ) ) ) + "<seq2seq4repair_space>to<seq2seq4repair_space>BytesRef" ) ) ; } if ( type . indexed ( ) ) { <START_BUG> throw new IllegalArgumentException ( "cannot<seq2seq4repair_space>set<seq2seq4repair_space>a<seq2seq4repair_space>Reader<seq2seq4repair_space>value<seq2seq4repair_space>on<seq2seq4repair_space>an<seq2seq4repair_space>indexed<seq2seq4repair_space>field" ) ; <END_BUG> } fieldsData = value ; } public void setByteValue ( byte value ) { } public void setShortValue ( short value ) { } public void setIntValue ( int value ) { } public void setLongValue ( long value ) { } public void setFloatValue ( float value ) { } public void setDoubleValue ( double value ) { } public void setTokenStream ( TokenStream tokenStream ) { } @ Override public String name ( ) { } @ Override public float boost ( ) { } public void setBoost ( float boost ) { } @ Override public Number numericValue ( ) { } @ Override public BytesRef binaryValue ( ) { } @ Override public String toString ( ) { } @ Override public FieldType fieldType ( ) { } @ Override public TokenStream tokenStream ( Analyzer analyzer ) throws IOException { } static final class ReusableStringReader extends Reader { private int pos = 0 ; private int size = 0 ; private String s = null ; void setValue ( String s ) { } @ Override public int read ( ) { } @ Override public int read ( char [ ] c , int off , int len ) { } @ Override public void close ( ) { } } static final class StringTokenStream extends TokenStream { private final CharTermAttribute termAttribute = addAttribute ( CharTermAttribute . class ) ; private final OffsetAttribute offsetAttribute = addAttribute ( OffsetAttribute . class ) ; private boolean used = false ; private String value = null ; StringTokenStream ( ) { } void setValue ( String value ) { } @ Override public boolean incrementToken ( ) { } @ Override public void end ( ) { } @ Override public void reset ( ) { } @ Override public void close ( ) { } } public static enum Store { YES , NO ; } @ Deprecated public static enum Index { NO ( ) { @ Override public boolean isIndexed ( ) { } @ Override public boolean isAnalyzed ( ) { } @ Override public boolean omitNorms ( ) { } } , ANALYZED ( ) { @ Override public boolean isIndexed ( ) { } @ Override public boolean isAnalyzed ( ) { } @ Override public boolean omitNorms ( ) { } } , NOT_ANALYZED ( ) { @ Override public boolean isIndexed ( ) { } @ Override public boolean isAnalyzed ( ) { } @ Override public boolean omitNorms ( ) { } } , NOT_ANALYZED_NO_NORMS ( ) { @ Override public boolean isIndexed ( ) { } @ Override public boolean isAnalyzed ( ) { } @ Override public boolean omitNorms ( ) { } } , ANALYZED_NO_NORMS ( ) { @ Override public boolean isIndexed ( ) { } @ Override public boolean isAnalyzed ( ) { } @ Override public boolean omitNorms ( ) { } } ; public static Field . Index toIndex ( boolean indexed , boolean analyzed ) { } public static Field . Index toIndex ( boolean indexed , boolean analyzed , boolean omitNorms ) { } public abstract boolean isIndexed ( ) { } public abstract boolean isAnalyzed ( ) { } public abstract boolean omitNorms ( ) { } } @ Deprecated public static enum TermVector { NO ( ) { @ Override public boolean isStored ( ) { } @ Override public boolean withPositions ( ) { } @ Override public boolean withOffsets ( ) { } } , YES ( ) { @ Override public boolean isStored ( ) { } @ Override public boolean withPositions ( ) { } @ Override public boolean withOffsets ( ) { } } , WITH_POSITIONS ( ) { @ Override public boolean isStored ( ) { } @ Override public boolean withPositions ( ) { } @ Override public boolean withOffsets ( ) { } } , WITH_OFFSETS ( ) { @ Override public boolean isStored ( ) { } @ Override public boolean withPositions ( ) { } @ Override public boolean withOffsets ( ) { } } , WITH_POSITIONS_OFFSETS ( ) { @ Override public boolean isStored ( ) { } @ Override public boolean withPositions ( ) { } @ Override public boolean withOffsets ( ) { } } ;

Fix:
throw new IllegalArgumentException ( "cannot<seq2seq4repair_space>set<seq2seq4repair_space>a<seq2seq4repair_space>BytesRef<seq2seq4repair_space>value<seq2seq4repair_space>on<seq2seq4repair_space>an<seq2seq4repair_space>indexed<seq2seq4repair_space>field" ) ;