I've seen that before too, on a program with all comments lost. What a nightmare to follow. I think the original programmers only did it so they could edit the subroutine online.
And that is precisely the reason to ensure, and MAKE SURE, the AOI code is bomb-proof, faultless, and passes every test of its functional specification.
Then, and only then, should it be deployed on a live process, especially if that process cannot be stopped without a 3-month round of talks, negotiations, and planning.
You cannot change any of the built-in instructions, and making an AOI is like adding to them, so it is right and proper that you cannot edit AOIs online.
The only reason for changing an AOI after deployment is that someone goofed along the way... Either in the Planning, the Specification, the Coding, or, more importantly, in the Testing.
When such a situation arises, I'm always tempted to utter either of the "Five P's" sayings....
"Proper Preparation Prevents P***-Poor Performance"
"Poor Preparation Produces *ditto* "