Terumos 2:2-3
Terumos 2:2
One may not take terumah from ritually impure produce for pure produce. If one did so unintentionally, the terumah is valid. If he did so intentionally, he has accomplished nothing. Similarly, if a Levite had first tithe from which terumas maaser (for the kohein) had not yet been taken and he takes it from unclean tithes that he put aside, if he did so unintentionally, it is valid; if he did so intentionally, he has accomplished nothing. Rabbi Yehuda says that if he knew the tithe was impure, then even if he did so unintentionally, he has accomplished nothing (because it’s an error one should anticipate).
Terumos 2:3
If a person ritually immersed vessels on Shabbos (which is not permitted), if he did so unintentionally, they may be used (on Shabbos). If he did so intentionally, they may not be used (until after Shabbos). If a person tithed or cooked food on Shabbos, if he did so unintentionally, it may be eaten (on Shabbos); intentionally, it may not be eaten (until after Shabbos). If one planted on Shabbos, unintentionally, he may permit it to grow; intentionally, he must uproot it. If one planted in the sabbatical year, whether unintentionally or intentionally, he must uproot it.