Maaser Sheni, Chapter Three, Mishnah Seven
Our mishnah deals with structures that lie both in and outside of Jerusalem. If we deem them to be within Jerusalem, then maaser sheni produce may be eaten there, but it may not be redeemed. But if we deem them to be outside of Jerusalem, then maaser sheni produce may be redeemed there but not eaten.
The geographical area of Jerusalem was judged, at least while the Temple still stood, by Jerusalems walls.
1) A tree which stood within [Jerusalem] and was bending outwards, or if it stood outside [Jerusalem] and was bending inwards, what is opposite the wall and inwards is deemed as being within, and what is opposite the wall and outwards is deemed as being outside.
2) Olive-presses which have their entrance within and their inner space outside, or which have their entrance outside and their inner space within:
a) Bet Shammai says: the whole is deemed as being within.
b) But Bet Hillel says: what is opposite the wall and inwards is deemed as being within, and what is opposite the wall and outwards is deemed as being outside.
Section one: Quite simply, the parts of the tree that lie within the walls are judged to be within Jerusalem, and the parts that are outside of the walls are considered to be outside of Jerusalem.
Section two: When it comes to olive presses, part of which lie in Jerusalem and part outside, Bet Shammai considers them all to lie within Jerusalem. The Tosefta explains that Bet Shammais ruling only applies to the stringent aspect of this law. The whole olive press is considered to be lying within Jerusalem, and therefore, maaser sheni cannot be redeemed there. But they agree with Bet Hillel that one can eat maaser sheni only in the parts that actually lie within the walls of Jerusalem.
Bet Hillel holds that each part is judged based on where it is. In the part that is within Jerusalem one can eat, but not redeem maaser sheni. In the part outside of Jerusalem, one can redeem but not eat.