We are expecting a solution, to not take dependency of source application but it will have only pure code with errors.
In this case we can avoid unnecessary dependencies. Or we can ask user as a confirmation when paste the code like, "Do you want to copy only code or with full dependency?".
This will solve many problems.
Thanks.