If the question is useful or makes any sense without the link, then the best course of action is probably just to edit and remove the broken link.
But in this case, as you mention, the question and the answers it has received are completely worthless without the accompanying code. So you should flag the question and ask a moderator to delete it. Explain that the link is dead, there's no chance of resuscitation, and the question is useless without it.
You could vote to close it, but old questions that already have accepted answers are unlikely to ever generate enough traffic to get the remaining 4 close votes needed, and there's just not much point in this type of question taking the close detour on the way to deletion.
The general rule is this: If you can fix the question by editing, then please do so! Otherwise, questions that are unlikely to help anyone else in the future of the Internet are just noise and should be deleted. (This is even more likely to be the best choice if the questions are over a year old like this one is.)
Also see: Questions linking to external web sites instead of showing code