Several methods do similar things but with different values contained in the method body.
Create one method that uses a parameter for the different values.
inverse of Replace Parameter with Explicit Methods
Clarifying the Mechanics
I've since (after a suggestion from Prof Bernd Kahlbrandt) found better mechanics for this refactoring (changes are in bold)
- Create a parameterized method that can be substituted for each repetitive method
- Replace the body of one method with a call to the new method
- Compile and Test
- Use Inline Method on the old method
- Repeat for all the methods.