Java Edition:Overstacked Emeralds Buy Trade
Due to a bug[1], from 12w50a (a 1.4.6 snapshot) to 1.7.10, librarian villagers could sell enchanted books for an overstacked count of emeralds.
Obtaining
The overstacked emerald count was a result of not including a check on the emerald count generated by the enchanted book trade. Enchanted books with level 5 could generate any emerald count between 17 and 71. All other enchantment levels generate emerald counts within valid stack ranges.
During this version range, villager trades all had a chance to generate when restocking. Rarer trades (a.k.a. the enchanted book trade) were weighted to be more common with the more trades unlocked, so trade with a librarian until the enchanted book trade is generated, which will have a small chance of having the overstacked emerald count.