Chapter 3Creating an Offender Profile

We just learned how methods from forensic psychology let us find complex, buggy code and guide our refactoring efforts. Now it’s time to put the theory into practice. Together, we’re going to analyze a software system. In our case, the offender is problematic code, not criminals.

We’ll start by mining evolutionary data from a version-control system. We’ll then augment the change data with complexity estimates to identify hotspots. Along the way, we’ll stop to look at existing research to see how the analysis helps us spot maintenance problems and quality issues.

When you finish this chapter, you’ll be able to identify hotspots in your own code. As you’ll see, hotspots point you to the parts of the code ...

Get Your Code as a Crime Scene 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.