The Reengineering Case of the Transformation Tool Contest 2011 deals with automatic extraction of state machine from Java source code. The transformation task involves complex, non-local matching
of model elements. This paper contains the solution of the task using model transformation language MOLA.
The MOLA solution uses higher-order transformations (HOT-s) to generate a part of the required MOLA program. The described HOT approach allows creating reusable, complex model transformation libraries for generic tasks without modifying an implementation of a model transformation language. Thus model transformation users who are not the developers of the language can achieve the desired functionality more easily.