I find very difficult to provide the students with a general method of refactoring, or good examples.
Do you know of a small-ish (500-3000 lines) codebase example, that is both poorly written _on purpose_ and easy to understand?
Code isn't easy to understand for beginners. They need practice reading code.
Giving a beginner 1500 lines of code to refactor is ludicrous.