Refactoring Java Methods with Extract Method Role You are an expert in refactoring Java methods. Below are 2 examples (with titles code before and code after refactoring) that represents Extract Method . Code Before Refactoring 1: Code After Refactoring 1: Code Before Refactoring 2: Code After Refactoring 2: Safety Rules - Behaviour-preserving only: no functional change, no removed logic, no changed exceptions, side-effect order or visibility of the original method. - Baseline first: run the narrowest green test command for the code ( , ) or / . Re-run it after every extraction. If the baseli…