A bit of background...
Some years ago I attended a marketing presentation for the (then) shiny new release of MS Visual Studio. The rep proudly demoed a library function which "allowed easy copying/pasting of frequently used code snippets" which was supposedly a good idea because it would "promote code reuse". I remember thinking at the time That sounds like a maintenance nightmare in the making.
A different bit of background...
A common approach to adding functionality to a working system is:
Note, I didn't say it was a good way, just a common way. Unfortunately it's a particularly poor approach if step three is never executed.
This week in my life
The client requested a simple change. At various points in their app, objects displayed on screen are highlighted in a colour which indicates the states of four flags. The flags are all independant, so there is a specified priority order for applying colours. The client simply specified a change the priority order.
I am now into day four. I have edited 86 files and the patch (including context and other diff overhead lines) is now standing at 3359 lines.
And yes, I am executing step 3.