Demai 5:3-4
Demai 5:3
If one buys demai bread from a baker, he may separate tithes from fresh-baked bread for day-old bread - or vice versa. He may even tithe from loaves shaped using one mold for loaves shaped using other molds. (“Mold” here means a hollow form used to shape something semisolid, not fungi.) This is the opinion of Rabbi Meir. Rabbi Yehuda does not permit to tithe from the fresh on the day-old or vice versa because of the likelihood that they came from different crops. Rabbi Shimon does not permit any of this for terumas maaser (because the produce involved likely came from different crops) but he does allow it for challah (because the source of the crop is irrelevant for challah, which becomes an obligation when dough is kneaded).
Demai 5:4
If one buys demai bread from a middleman (who gets his supplies from several bakers), he must take tithes for bread shaped by every different mold; this is the opinion of Rabbi Meir. Rabbi Yehuda says that one may take tithes from one loaf for all of them. Rabbi Yehuda agrees, however, that if one seller has a monopoly on all bread sales in the city, then purchasers must take tithes from bread made of each mold.