Rename Method

Definition:

Rename Method is the easiest refactoring, which simply involves finding all calls to the particular method, then renaming them as well as the method itself.

Triggers:

the intent of the method is not clear

the method's body is not coherent with the name

the method does more or less than the name implies

Forces:

readability: longer names may reveal intent or may be too noisy, while short names may not explain enough

sole intent: the name should capture all that the method does (at a given level of abstraction); if not, we may need to perform other refactoring (e.g., extract method) to keep it clean