And again, the same applies for a human as well. It's just the same.
I'm pretty sure I have done that by accident already in the past without noticing. This is not so unusual when you write some code with very common patterns.
And then this even can apply for code which you have not seen before. E.g. write some bubble sort function. Very likely you will find exactly the same code online.