I have been assigned the task to refactor a Delphi unit. Wow. 10000 lines of code, no documentation, tons of copy and paste code.
THere are many methods made with copy a
Use a tool like Doxygen to help you map the code.
Help on that is here