Refactoring: renaming modifyCode(...) to modifyCodeBefore to make the
functions intention clearer.