Seems not right to me.  Can't this end up adding the same sample to both train and test?