Hack it 'til you crack it
You make the code so broken it somehow becomes fixed, like a broken toaster that finally toasts your bread.
I broke the app so badly it somehow fixed the bug.
The code was a disaster, but it worked in the end.
I messed it up so much it became a solution.
xs