More often than otherwise, I’ve found code duplication preferable over abstraction. I only abstract code when I understand the problem space really, really well (I.e. have solved it before), or when I can have some certainty the wrong abstraction won’t cost me too much time to fix.
Also one can get over-eager with abstractions over things that are not real duplicates. They just happen to look similar at this moment in time.
In this category, I would also put premature automation before learning what it actually is you are automating among other things.
Or more generally: Don't try to be clever about something you don't (yet) understand.