Buggy code:
public enum FoldAssignmentScheme { AUTO , Random , Modulo , Stratified ; } public Model . Parameters . FoldAssignmentScheme _fold_assignment = Model . Parameters . FoldAssignmentScheme . AUTO ; public Family _distribution = Family . AUTO ; public double _tweedie_power = 1.5F ; public String [ ] _ignored_columns ; public boolean _ignore_const_cols ; public String _weights_column ; public String _offset_column ; public String _fold_column ; public boolean _score_each_iteration ; public String _response_column ; public boolean _balance_classes = false ; public float _max_after_balance_size = 5.0F ; public float [ ] _class_sampling_factors ; public int _max_hit_ratio_k = 10 ; public int _max_confusion_matrix_size = 20 ; public Key < ? extends Model > _checkpoint ; 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 ( ) { } public double missingColumnsType ( ) { } public boolean hasCheckpoint ( ) { } public long checksum ( ) { } 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 Key [ ] _cross_validation_models ; public Key [ ] _cross_validation_predictions ; public Output ( ) { } public Output ( boolean hasWeights , boolean hasOffset , boolean hasFold ) { } public Output ( ModelBuilder b ) { } public int nfeatures ( ) { } public String [ ] [ ] _domains ; Key [ ] _model_metrics = new Key [ 0 ] ; public JobState _status ; public long _start_time ; public long _end_time ; public long _run_time ; public ModelMetrics _training_metrics ; public ModelMetrics _validation_metrics ; public ModelMetrics _cross_validation_metrics ; public TwoDimTable _model_summary ; public TwoDimTable _scoring_history ; protected boolean _isSupervised ; public boolean isSupervised ( ) { } protected final boolean _hasOffset ; protected final boolean _hasWeights ; protected final boolean _hasFold ; public boolean hasOffset ( ) { } public boolean hasWeights ( ) { } public boolean hasFold ( ) { } public String responseName ( ) { } public String weightsName ( ) { } public String offsetName ( ) { } public String foldName ( ) { } public int weightsIdx ( ) { } public int offsetIdx ( ) { } public int foldIdx ( ) { } public int responseIdx ( ) { } public String [ ] classNames ( ) { } public boolean isClassifier ( ) { } public int nclasses ( ) { } public double [ ] _distribution ; public double [ ] _modelClassDist ; public double [ ] _priorClassDist ; public ModelCategory getModelCategory ( ) { } public synchronized ModelMetrics addModelMetrics ( ModelMetrics mm ) { } public synchronized void clearModelMetrics ( ) { <START_BUG> _model_metrics = null ; <END_BUG> } long checksum_impl ( ) { } public 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 double deviance ( double w , double y , double f ) { } public String [ ] adaptTestForTrain ( Frame test , boolean expensive , boolean computeMetrics ) { } public static String [ ] adaptTestForTrain ( String [ ] names , String weights , String offset , String fold , String response , String [ ] [ ] domains , Frame test , double missing , boolean expensive , boolean computeMetrics ) throws IllegalArgumentException { } public Frame score ( Frame fr ) throws IllegalArgumentException { } public Frame score ( Frame fr , String destination_key ) throws IllegalArgumentException { } protected static void cleanup_adapt ( Frame adaptFr , Frame fr ) { } protected Frame predictScoreImpl ( Frame fr , Frame adaptFrm , String destination_key ) { } protected MetricBuilder scoreMetrics ( Frame adaptFrm ) { } private class BigScore extends MRTask < Model < M , P , O > . BigScore > { final String [ ] _domain ; final int _npredcols ; MetricBuilder _mb ; final double [ ] _mean ; final boolean _computeMetrics ; final boolean _hasWeights ; final boolean _makePreds ; BigScore ( String [ ] domain , int ncols , double [ ] mean , boolean testHasWeights , boolean computeMetrics , boolean makePreds ) { } @ Override public void map ( Chunk [ ] chks , NewChunk [ ] cpreds ) { } @ Override public void reduce ( Model < M , P , O > . BigScore bs ) { } @ Override protected void postGlobal ( ) { } } public double [ ] score0 ( Chunk [ ] chks , int row_in_chunk , double [ ] tmp , double [ ] preds ) { } public double [ ] score0 ( Chunk [ ] chks , double weight , double offset , int row_in_chunk , double [ ] tmp , double [ ] preds ) { } protected abstract double [ ] score0 ( double [ ] data , double [ ] preds ) { } protected double [ ] score0 ( double [ ] data , double [ ] preds , double weight , double offset ) { } public double score ( double [ ] data ) { } @ Override protected Futures remove_impl ( Futures fs ) { } @ Override protected long checksum_impl ( ) { } public final String toJava ( boolean preview , boolean verboseCode ) { }

Fix:
_model_metrics = new Key [ 0 ] ;