A somewhat tounge-in-cheek comment: but I wonder if there could be a git/IDE extension to track cut-and-paste code like this (especially from stackoverflow) so that when things are corrected or flagged as broken at the source, that change is propagated to your use of it.