Maseches Ma'asros, Chapter 5, Mishnah 2. This mishnah contains two separate topics. The first is a direct continuation of the previous mishnah, while the second is entirely different.
In the previous mishnah we learned that although there is a general rule that one who takes produce and replants it must first tithe it, this does not apply in a case where the plant has not yet finished growing and moving it to another spot is meant to give it better growing conditions. That case was speaking about replanting within one's own property.
The First Topic: Uprooting Turnips and Radishes for Seed:
Turnips and radishes are edible as long as they are pulled out of the ground while they are still young. But if they are left in the ground until they grow old, the bulbs become inedible, though they produce seeds from which many more turnips and radishes can be grown.
Our case is: "Ha'oker lefas u'tzenonos mitoch shelo v'notea l'toch shelo" - a person uproots turnips or radishes from his garden and replants them in his own yard, exactly like the first case in the previous mishnah. Here, though, he does so "lezera" - for seed, because what he wants is the seed of the turnip or radish. For that reason he is "chayav" - obligated to tithe them before replanting them in the ground, "mipnei shehu gornan" - because this is their goren.
The word 'goren' literally means a threshing floor, but here it is a borrowed term meaning the completion of processing. Pulling the radish out of the ground is its small harvest, a form of harvest, and there is nothing beyond it - this is the end of its processing. From this point on, when instead of eating the radish the person decided to plant it, he must tithe it before planting.
Here is the difference between the two mishnayos:
In the previous mishnah: the seedlings he planted will later be uprooted from the ground and eaten, and therefore this is not the completion of processing and there is no obligation to tithe now.
In our mishnah: these radishes will never be eaten, since their entire purpose is the seed, and therefore they must be tithed now.
The Second Topic: Onions That Took Root in the Upper Story:
The case deals with a person who brings onions up to the upper story. The upper story, as the Bartenura explains at the end of his comments, is the second floor of the house, and beneath its floorboards lies a layer of earth, much as it is common today to place sand beneath floor tiles. The onions are set down on the floor to be eaten, but they sprouted a small root and took hold between the floorboards.
Are these onions considered attached to the ground, as though they had been replanted?
This question has wide-ranging practical consequences:
Tumah: Items attached to the ground do not become tamei and do not transmit tumah.
Ma'aseros: Additional growth creates a new obligation to tithe.
Shemittah: The laws of the seventh year apply to what was planted and to its new growth.
Shabbos: One who uproots something attached to the ground transgresses a Torah prohibition, a derivative of the melachah of reaping.
On this the Mishnah says: "Betzalim mishehishrishu ba'aliyah - taharu miletamei" - onions that took root in an upper story are no longer capable of becoming tamei. From the moment they took root in the beams of the floor of the upper story, they lost the ability to receive tumah and to transmit it. From here we learn that only the matter of tumah falls away, but not the matters of Shabbos, shemittah and ma'aseros.
The basis for this is the verse dealing with seeds that are sown: "And any sown seed which is sown." From the extra word Chazal derived that for plants the requirements for taking root, in order to be considered planted, are lower than for other things.
It emerges that even though they took root and are no longer capable of becoming tamei, they are not considered attached for every purpose:
One who uproots them from the floorboards on Shabbos is not liable by Torah law for reaping, since they have already been reaped.
The restrictions that apply to replanting during the shemittah year and to its new growth do not apply here.
So too regarding ma'aser: even though when something is replanted in the ground there would be room to obligate tithing on the added growth, here that does not apply.
However, the Mishnah continues, if they not only took root but "naflah aleihem mapoles" - a collapse fell upon them - the ceiling caved in and the debris covered them with earth, so that the onions were actually planted within that ruined building, their bulbs buried in the soil and their leaves exposed above - this is as though they were planted anew in the ground, and therefore "harei elu kinetuim basadeh" - they are like onions planted in a field. Their status is not different in any way from onions planted in a field in the normal manner; they are planted for every purpose.
From now on, if they produce further growth, the laws of shemittah and the laws of ma'aseros apply to them; and one who uproots them on Shabbos is liable by Torah law for detaching something from the ground. As for tumah, they already became incapable of becoming tamei earlier, at the time they took root.
In summary: This Mishnah contains two topics. The first - one who uproots turnips and radishes from his own field and replants them in his own field for the sake of seed must tithe them first, because their uprooting is the completion of their processing (their 'goren'), and unlike the previous Mishnah they will never be eaten. The second - onions that took root in an upper story are no longer capable of becoming tamei, but that is all; they are not considered attached with regard to Shabbos, shemittah and ma'aseros. But if a collapse fell upon them and earth covered them, they are like onions planted in a field in every respect.