Buggy code:
public Key < Frame > _train ; public Key < Frame > _valid ; public String [ ] _ignored_columns ; public boolean _dropNA20Cols ; public boolean _dropConsCols ; public boolean _score_each_iteration ; public int _max_confusion_matrix_size = 20 ; public Parameters ( ) { } public final Frame train ( ) { } public final Frame valid ( ) { } public void read_lock_frames ( Job job ) { } public void read_unlock_frames ( Job job ) { } protected boolean defaultDropNA20Cols ( ) { } protected boolean defaultDropConsCols ( ) { } protected double missingColumnsType ( ) { } protected long checksum_impl ( ) { } } public P _parms ; public String [ ] _warnings = new String [ 0 ] ; public void addWarning ( String s ) { } public static abstract class Output extends Iced { public String [ ] _names ; public int nfeatures ( ) { } public String [ ] [ ] _domains ; public Key [ ] _model_metrics = new Key [ 0 ] ; public JobState _state ; public Output ( ModelBuilder b ) { } public boolean isSupervised ( ) { } public String responseName ( ) { } public String [ ] classNames ( ) { } public boolean isClassifier ( ) { } public int nclasses ( ) { } public Model . ModelCategory getModelCategory ( ) { } public synchronized ModelMetrics addModelMetrics ( ModelMetrics mm ) { } long checksum_impl ( ) { } private void printTwoDimTables ( StringBuilder sb , Object o ) { } @ Override public String toString ( ) { } } public O _output ; public ModelMetrics addMetrics ( ModelMetrics mm ) { } public abstract MetricBuilder makeMetricBuilder ( String [ ] domain ) { } public Model ( Key selfKey , P parms , O output ) { } public String [ ] adaptTestForTrain ( Frame test , boolean expensive ) { } public static String [ ] adaptTestForTrain ( String [ ] names , String [ ] [ ] domains , Frame test , double missing , boolean expensive ) throws IllegalArgumentException { if ( test == null ) return new String [ 0 ] ; String [ ] [ ] tdomains = test . domains ( ) ; if ( ( names == ( test . _names ) ) && ( domains == tdomains ) ) return new String [ 0 ] ; if ( ( Arrays . equals ( names , test . _names ) ) && ( Arrays . deepEquals ( domains , tdomains ) ) ) return new String [ 0 ] ; ArrayList < String > msgs = new ArrayList < > ( ) ; Vec [ ] vvecs = new Vec [ names . length ] ; int good = 0 ; int convNaN = 0 ; for ( int i = 0 ; i < ( names . length ) ; i ++ ) { Vec vec = test . vec ( names [ i ] ) ; if ( vec == null ) { String str = "Validation<seq2seq4repair_space>set<seq2seq4repair_space>is<seq2seq4repair_space>missing<seq2seq4repair_space>training<seq2seq4repair_space>column<seq2seq4repair_space>" + ( names [ i ] ) ; if ( expensive ) { str = str + ":<seq2seq4repair_space>substituting<seq2seq4repair_space>in<seq2seq4repair_space>a<seq2seq4repair_space>column<seq2seq4repair_space>of<seq2seq4repair_space>NAs" ; vec = test . anyVec ( ) . makeCon ( missing ) ; vec . setDomain ( domains [ i ] ) ; convNaN ++ ; } msgs . add ( str ) ; } if ( vec != null ) { if ( ( domains [ i ] ) != null ) { if ( ( ( vec . domain ( ) ) != ( domains [ i ] ) ) && ( ! ( Arrays . equals ( vec . domain ( ) , domains [ i ] ) ) ) ) { EnumWrappedVec evec ; try { evec = vec . adaptTo ( domains [ i ] ) ; } catch ( NumberFormatException nfe ) { <START_BUG> throw new IllegalArgumentException ( ( ( "Validation<seq2seq4repair_space>set<seq2seq4repair_space>has<seq2seq4repair_space>a<seq2seq4repair_space>numeric<seq2seq4repair_space>column<seq2seq4repair_space>" + ( names [ i ] ) ) + "<seq2seq4repair_space>which<seq2seq4repair_space>is<seq2seq4repair_space>categorical<seq2seq4repair_space>in<seq2seq4repair_space>the<seq2seq4repair_space>training<seq2seq4repair_space>data" ) ) ; <END_BUG> } String [ ] ds = evec . domain ( ) ; assert ( ds != null ) && ( ( ds . length ) >= ( domains [ i ] . length ) ) ; if ( ( ds . length ) > ( domains [ i ] . length ) ) msgs . add ( ( ( ( "Validation<seq2seq4repair_space>column<seq2seq4repair_space>" + ( names [ i ] ) ) + "<seq2seq4repair_space>has<seq2seq4repair_space>levels<seq2seq4repair_space>not<seq2seq4repair_space>trained<seq2seq4repair_space>on:<seq2seq4repair_space>" ) + ( Arrays . toString ( Arrays . copyOfRange ( ds , domains [ i ] . length , ds . length ) ) ) ) ) ; if ( expensive ) { vec = evec ; good ++ ; } else { evec . remove ( ) ; vec = null ; } } else { good ++ ; } } else if ( vec . isEnum ( ) ) { throw new IllegalArgumentException ( ( ( "Validation<seq2seq4repair_space>set<seq2seq4repair_space>has<seq2seq4repair_space>categorical<seq2seq4repair_space>column<seq2seq4repair_space>" + ( names [ i ] ) ) + "<seq2seq4repair_space>which<seq2seq4repair_space>is<seq2seq4repair_space>real-valued<seq2seq4repair_space>in<seq2seq4repair_space>the<seq2seq4repair_space>training<seq2seq4repair_space>data" ) ) ; } else { good ++ ; } } vvecs [ i ] = vec ; } if ( good == convNaN ) throw new IllegalArgumentException ( "Validation<seq2seq4repair_space>set<seq2seq4repair_space>has<seq2seq4repair_space>no<seq2seq4repair_space>columns<seq2seq4repair_space>in<seq2seq4repair_space>common<seq2seq4repair_space>with<seq2seq4repair_space>the<seq2seq4repair_space>training<seq2seq4repair_space>set" ) ; if ( good == ( names . length ) ) test . restructure ( names , vvecs ) ; return msgs . toArray ( new String [ msgs . size ( ) ] ) ; } public Frame score ( Frame fr ) throws IllegalArgumentException { } public Frame score ( Frame fr , String destination_key ) throws IllegalArgumentException { } protected Frame scoreImpl ( Frame fr , Frame adaptFrm , String destination_key ) { } private class BigScore extends MRTask < Model < M , P , O > . BigScore > { final String [ ] _domain ; final int _npredcols ; MetricBuilder _mb ; BigScore ( String [ ] domain , int ncols ) { }

Fix:
throw new IllegalArgumentException ( ( ( "Validation<seq2seq4repair_space>set<seq2seq4repair_space>has<seq2seq4repair_space>a<seq2seq4repair_space>non-categorical<seq2seq4repair_space>column<seq2seq4repair_space>" + ( names [ i ] ) ) + "<seq2seq4repair_space>which<seq2seq4repair_space>is<seq2seq4repair_space>categorical<seq2seq4repair_space>in<seq2seq4repair_space>the<seq2seq4repair_space>training<seq2seq4repair_space>data" ) ) ;