I recently came across the Coccinelle (H/T which at most general is a C-language source-to-source transformation tool but also has a concrete application that is used for semantic patching of C-language programs. In other words it allows users to write patches that actually understand the structure and syntax of C programs rather than just treating as unstructured text. Probably useful for large C-language projects but also I think for quite a lot beyond that. I will be investigating in a bit more depth soon.