Regarding "1.extract duplicate code":
You can use static code analyzers, most of them free for Open Source Projects, for finding larger blocks of duplicate.
Most of them are very helpful for standard things like missing null checks etc.
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.
Regarding "1.extract duplicate code":
You can use static code analyzers, most of them free for Open Source Projects, for finding larger blocks of duplicate.
Most of them are very helpful for standard things like missing null checks etc.