Manual find-and-replace refactoring is how subtle bugs sneak in. IntelliJ understands your code's structure, so its refactorings update every reference, respect scope, and preview changes before applying them.
Rename that actually works
Shift + F6 renames a symbol and every reference to it — including in comments
and strings if you opt in — across the whole project.
public class OrderSvc { // rename to OrderService
private Repo repo; // rename field, all usages update
}Extract to simplify
Extraction refactorings break large methods into named, testable pieces.
Ctrl/Cmd + Alt + M Extract method
Ctrl/Cmd + Alt + V Extract variable
Ctrl/Cmd + Alt + F Extract field
Ctrl/Cmd + Alt + C Extract constant
Ctrl/Cmd + Alt + P Extract parameterChange signature safely
Ctrl/Cmd + F6 opens Change Signature, where you can add, reorder, or remove
parameters and IntelliJ updates every call site — supplying defaults where
needed.
// add a 'currency' parameter; every caller is updated with a default
public Money total(List<Item> items, Currency currency) { ... }Takeaways
- Refactorings update all references, unlike manual search-and-replace.
- Extract method and variable turn tangled code into readable units.
- Change Signature propagates parameter changes to every call site.
Always run refactorings with a clean working tree so you can diff exactly what the IDE changed and revert cleanly if needed.