7

Static and Dynamic Analysis

On our way to clean, robust, and maintainable code, we’ll often need to “take a look” at how our software works and how it’s written. After identifying the code smells and doing some refactoring steps (in fact, we should never stop doing this!), it can be useful to scan our code for design flaws, security vulnerabilities, and more.

This analysis can be carried out directly on the code – that is, static analysis – or on the running program – that is, (without involving too much imagination) dynamic analysis.

Static and dynamic analysis tools scrutinize code to identify issues and inefficiencies. Their insights provide the foundation for improvements, and this is where refactoring comes into play.

In this chapter, ...

Get Refactoring in Java now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.