Video
Most projects want to have a consistent code style and to follow some conventions and best practices. Often automated tools are used to assist with this process.
These tools typically do static code analysis, as the inspection performed without actually running the code. This approach is in contrast with a dynamic code analysis, which will actually run the code in order to perform the inspection.
One simple one that can be used for Java projects is PMD. PMD can help find unused variables, problematic code blocks and overall to enforce generally accepted best practices.
PMD already has a large set of predefined rules but will also allow you to configure or add new rules, as needed.