Or do you know of a case where some code of different people were exactly alike? To the point that it would seem like plagiarism.
I haven't encountered that. Not even in simple webdev stuff, where there aren't too many ways to do things (excluding some CSS & HTML).
Interested to hear any stories or anecdotes.
He was an external contractor on a (sub-) project I de facto managed. I'd meet him twice a week, checking how the feature implementation is going, and prioritize upcoming work. He delivered exactly what I told him, in a way I would have done it. Even better, whenever he had more time until our next meeting, he would proactively implement some new stuff, which I.would have asked for. Sometimes when I was speaking to him, just because speech is slower than thought, and I haven't expressed my thought yet, he'd "finish my sentence", point out exactly the corner cases I was about to, and also, eerily get stuck at the same problems I would be.
I loved working with him, I kept telling even to my friends outside of work what a great companion I found and how happy I'm at work. The project was "finished" and we don't collaborate anymore. He is a great guy, and definitely there were times I had this doppelgänger-feeling.