Chapter 3. Technology Behind the Scenes of Auto-Remediation
To manage continuous, automated code remediation at scale, you need technology that crosses boundaries of teams and repositories. This technology must inspire confidence that code changes via automation are comprehensive and correct. It also must evolve with the software ecosystems it supports.
This chapter dives into the following technology concepts in more detail:
-
Rules-based automated code refactoring engine
-
Lossless Semantic Tree, a new, structured representation of a codebase
-
Recipes, which are programs for performing code search and transformation
-
Preserving code style to avoid rejection when auto-remediating
-
Generative AI, which provides support for creating recipes and analyzing code
-
Code warehouse for horizontal scalability and distributed change
-
Data tables output from code examination for analysis and action
The examples we will use throughout this chapter are given as Java refactorings, but the same technology and ideas apply equally to other languages.
A Refactoring Engine Drives Auto-Remediation
Auto-remediation and refactoring are closely aligned concepts. Refactoring is the act of changing the internal structure of the software to make it more efficient and maintainable, which includes making it easier to understand and remediate—all without changing the software’s observable behavior. It’s how we’ve traditionally addressed technical debt.
Refactoring has been done manually (with IDE ...
Get Automated Code Remediation 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.