Resample in weka uses pretty simple way of creating samples. It just asks for sample size percentage and random seed and uses in a simple function like this:
private void createSubsample() {
int origSize = getInputFormat().numInstances();
int sampleSize = (int) (origSize * m_SampleSizePercent / 100);
Just picking some integer number randomly from the original size and pushing them in a new instance. Evidently, instance is a new set of samples.
Randomize also very simple function just generating a random number within the size of the samples using. The it swaps the instances of the position of random number with its next random position as following:
public void randomize(Random random) {
for (int j = numInstances() - 1; j > 0; j--)
swap(j, random.nextInt(j+1));
}
Finally, the entire sample set is fed into a format of instances to create new sample as follows:
getInputFormat().randomize(m_Random);
for (int i = 0; i < getInputFormat().numInstances(); i++) {
push(getInputFormat().instance(i));
}
If you have further queries about similar kind of questions, I would suggest you to download WEKA source and check the algorithms to understand what's actually they are using. You have to go to the following link and choose other platform (linux,etc) to download a zip file. Then extract weka-src.jar. I have been using, and modifying weka for long time. It is fun