Methods as Parameters: A Preprocessing Approach in Java