Yeah, I've been saying that removing accidental similarity isn't improving code but compressing it. "Huffman coding", if you will...
Thank you for putting that into words, and rather few too. I have only felt that anti-pattern before, not had words for it. Does it have a name? If not, we should give it a name!
I believe this pattern is referred to as accidental-duplication. Some existing discussions on this:
https://softwareengineering.stackexchange.com/questions/3000...
But instead what you usually see is minor tweaks to the common functions. Pass in a flag here, tweak the inputs there, add an if statement over yonder... And before you know it, it's all a terrible tangled mess that is full of branches and technical debt. The two use cases have the same functions, but don't even follow the same branches within the functions.