Replace a comment with a method