I have 2 files that cover 5000 lines of code. I have been ask to fix THE problem. The code is object oriented but use hundred of flags, is multi threads, uses variable name without meaning, has recursion problems, etc... The problem is that rewriting the code will take a couple of months and there is not specifications. The specifications are encrypted in the code.
So the big question is do you have any ways or technique to fix/understand such bad code?