Azul has announced a new feature that catalogs the source code used by production Java applications so that unused code can be removed. Code Inventory collects detailed information about code information within the JVM to provide a report on what is used across the Java workloads running in production.
The report also includes the date that code was first and last run, and can identify code at the class/package and method level.
By cataloging the code that is actually being used by applications, developers can remove unused, or “dead” code. According to Azul, removing dead code can save developers time because it cuts down on the amount of code that needs to be maintained and makes codebases easier to understand.
The company went on to explain that while removing dead code can be beneficial, it can also lead to unintended consequences if code is removed that is actually still in use and needed. Code Inventory will help developers be more confident that what they are removing is actually not used.
“Application developers want to remove dead and unused code to make maintenance easier but are terrified to remove anything for fear of breaking the application,” said Martin Van Ryswyk, chief product officer at Azul. “With Code Inventory, developers now have a sophisticated tool to help pinpoint areas for cleanup.
Code comes as part of Azul Vulnerability Detection, which is a tool that detects known vulnerabilities in code.