Add a method for extracting statements to a method