Intellij IDEA provides lots of code inspections, that can significantly simplify writing code.
Inspections parameters can be found in Preferences
| Editor
| Inspections
section. By default, IDEA has lots of them enabled. And lots of inspections support auto-fixing options, that can be seen on pressing Alt + Enter.
To run inspections for your whole project (or some custom scope), you need to select Analyze
| Inspect code
.