Buggy code:
final DTree _tree ; final int [ ] _leafs ; final DHistogram [ ] [ ] [ ] _hcs ; final Frame _fr2 ; final boolean _subset ; final boolean _build_tree_one_node ; float [ ] _improvPerVar ; boolean _did_split ; ScoreBuildOneTree ( SharedTree st , int k , int nbins , DTree tree , int [ ] leafs , DHistogram [ ] [ ] [ ] hcs , Frame fr2 , boolean subset , boolean build_tree_one_node , float [ ] improvPerVar ) { } @ Override public void compute2 ( ) { } @ Override public void onCompletion ( CountedCompleter caller ) { } } protected int idx_resp ( ) { } protected int idx_oobt ( ) { } protected int idx_tree ( int c ) { } protected int idx_work ( int c ) { } protected int idx_nids ( int c ) { } protected Chunk chk_resp ( Chunk [ ] chks ) { } protected Chunk chk_tree ( Chunk [ ] chks , int c ) { } protected Chunk chk_work ( Chunk [ ] chks , int c ) { } protected Chunk chk_nids ( Chunk [ ] chks , int c ) { } protected Chunk chk_oobt ( Chunk [ ] chks ) { } protected final Vec vec_nids ( Frame fr , int t ) { } protected final Vec vec_resp ( Frame fr ) { } protected final Vec vec_tree ( Frame fr , int c ) { } protected double [ ] data_row ( Chunk [ ] chks , int row , double [ ] data ) { } protected abstract DecidedNode makeDecided ( DTree . UndecidedNode udn , DHistogram [ ] hs ) { } protected abstract double score1 ( Chunk [ ] chks , double [ ] fs , int row ) { } void score2 ( Chunk [ ] chks , double [ ] fs , int row ) { } class ExcludeNAResponse extends MRTask < SharedTree < M , P , O > . ExcludeNAResponse > { @ Override public void map ( Chunk [ ] chks ) { } } transient long _timeLastScoreStart ; transient long _timeLastScoreEnd ; transient long _firstScore ; protected double doScoringAndSaveModel ( boolean finalScoring , boolean oob , boolean build_tree_one_node ) { double training_r2 = Double . NaN ; long now = System . currentTimeMillis ( ) ; if ( ( _firstScore ) == 0 ) _firstScore = now ; long sinceLastScore = now - ( _timeLastScoreStart ) ; boolean updated = false ; if ( ( ( ( _parms . _score_each_iteration ) || finalScoring ) || ( ( now - ( _firstScore ) ) < 4000 ) ) || ( ( sinceLastScore > 4000 ) && ( ( ( ( double ) ( ( _timeLastScoreEnd ) - ( _timeLastScoreStart ) ) ) // sinceLastScore ) < 0.1 ) ) ) { checkMemoryFootPrint ( ) ; _model . update ( _key ) ; updated = true ; Log . info ( "==============================================================<seq2seq4repair_space>" ) ; SharedTreeModel . SharedTreeOutput out = _model . _output ; _timeLastScoreStart = now ; Score sc = new Score ( this , true , oob , _model . _output . getModelCategory ( ) ) . doAll ( SharedTree . train ( ) , build_tree_one_node ) ; ModelMetrics mm = sc . makeModelMetrics ( _model , _parms . train ( ) , _response_column ) ; out . _training_metrics = mm ; if ( oob ) out . _training_metrics . _description = "Metrics<seq2seq4repair_space>reported<seq2seq4repair_space>on<seq2seq4repair_space>Out-Of-Bag<seq2seq4repair_space>training<seq2seq4repair_space>samples" ; out . _scored_train [ out . _ntrees ] . fillFrom ( mm ) ; if ( ( out . _ntrees ) > 0 ) Log . info ( ( "Training<seq2seq4repair_space>" + ( out . _scored_train [ out . _ntrees ] . toString ( ) ) ) ) ; if ( ( _parms . _valid ) != null ) { <START_BUG> Score scv = new Score ( this , false , oob , _model . _output . getModelCategory ( ) ) . doAll ( SharedTree . valid ( ) , build_tree_one_node ) ; <END_BUG> ModelMetrics mmv = scv . makeModelMetrics ( _model , _parms . valid ( ) , _response_column ) ; out . _validation_metrics = mmv ; out . _scored_valid [ out . _ntrees ] . fillFrom ( mmv ) ; if ( ( out . _ntrees ) > 0 ) Log . info ( ( "Validation<seq2seq4repair_space>" + ( out . _scored_valid [ out . _ntrees ] . toString ( ) ) ) ) ; } if ( ( out . _ntrees ) > 0 ) { out . _model_summary = createModelSummaryTable ( out ) ; out . _scoring_history = createScoringHistoryTable ( out ) ; out . _variable_importances = hex . ModelMetrics . calcVarImp ( new hex . VarImp ( _improvPerVar , out . _names ) ) ; Log . info ( out . _model_summary . toString ( ) ) ; } ConfusionMatrix cm = mm . cm ( ) ; if ( cm != null ) { if ( ( cm . _cm . length ) <= ( _parms . _max_confusion_matrix_size ) ) { Log . info ( cm . toASCII ( ) ) ; } else { Log . info ( ( ( ( ( "Confusion<seq2seq4repair_space>Matrix<seq2seq4repair_space>is<seq2seq4repair_space>too<seq2seq4repair_space>large<seq2seq4repair_space>(max_confusion_matrix_size=" + ( _parms . _max_confusion_matrix_size ) ) + "):<seq2seq4repair_space>" ) + ( _nclass ) ) + "<seq2seq4repair_space>classes." ) ) ; } Log . info ( ( ( ( ( ( _nclass ) > 1 ? ( "Total<seq2seq4repair_space>of<seq2seq4repair_space>" + ( cm . errCount ( ) ) ) + "<seq2seq4repair_space>errors" : "Reported" ) + "<seq2seq4repair_space>on<seq2seq4repair_space>" ) + ( cm . totalRows ( ) ) ) + "<seq2seq4repair_space>rows" ) ) ; } _timeLastScoreEnd = System . currentTimeMillis ( ) ; } if ( updated ) _model . update ( _key ) ; return training_r2 ; } static int counter = 0 ; @ SuppressWarnings ( "unused" ) protected static void printGenerateTrees ( DTree [ ] trees ) { } double initial_MSE ( Vec train , Vec test ) { }

Fix:
Score scv = new Score ( this , false , false , _model . _output . getModelCategory ( ) ) . doAll ( SharedTree . valid ( ) , build_tree_one_node ) ;