} catch (NoSupportForMissingValuesException ex2) {
System.err.println("\nReplacing missing values.");
ReplaceMissingValues rmFilter = new ReplaceMissingValues();
rmFilter.setInputFormat(train);
train = Filter.useFilter(train, rmFilter);
rmFilter.batchFinished();
test = Filter.useFilter(test, rmFilter);
} catch (IllegalArgumentException ex3) {
String msg = ex3.getMessage();
if (msg.indexOf("Not enough instances") != -1) {
System.err.println("\nInflating training data.");