Minecraft wiki entry for Before_1.8, associated text: Example
A maxed out fishing rod (Lure 3, Luck 3, Unbreaking 3) which has been renamed is barely repairable. It has base value 36 (12 for luck, 12 for lure, 6 for unbreaking, 6 for three enchantments). Assuming it's been renamed, repairing it will cost that plus 2 for prior work, and 1 for the repair itself, for a total of exactly 39. If it has not been renamed, then its second combination or repair will make it too expensive to repair. (It might be rescued from this state by combining it with an incompatible book, which will allow simultaneously renaming it. See below for details.)