But when you have to just do a single task, with no time to think things through and refactor, there's no other way.
True, especially when the old solution/function is not entirely correct or doesn't fit your situation exactly, fixing or refactoring it is so risky as you don't know what else is dependent on it and how much additional things you have to test outside of your task. Being able to talk to the developer that developed it is better than not having anyone to ask, but either way still takes a lot of time! And that's ultimately why duplication of code happens unfortunately :/.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
True, especially when the old solution/function is not entirely correct or doesn't fit your situation exactly, fixing or refactoring it is so risky as you don't know what else is dependent on it and how much additional things you have to test outside of your task. Being able to talk to the developer that developed it is better than not having anyone to ask, but either way still takes a lot of time! And that's ultimately why duplication of code happens unfortunately :/.