The Refactor Tutor lets students practice with improving small programs that are already functionally correct, to make them more concise, efficient, and understandable. The student can ask for hints and feedback at each step. Hints are given with increasing detail, and test cases are used to ensure that the behaviour of the program is preserved. The system is based on rules that are extracted from input by teachers collected in a preliminary study, a subset of rules taken from professional tools, and other literature. Rules define how a code construct can be rewritten into a better variant, without changing its functionality. Rules can be combined to form rewrite strategies, similar to refactorings offered by most IDEs.
More info: http://www.hkeuning.nl/rpt/.