Skip to main content
QUICK REVIEW

[Paper Review] Code Red: The Business Impact of Code Quality -- A Quantitative Study of 39 Proprietary Production Codebases

Adam Tornhill, Markus Borg|arXiv (Cornell University)|Mar 8, 2022
Software Engineering ResearchComputer Science4 citations
TL;DR

This quantitative study analyzes 39 proprietary production codebases using code health metrics, version control data, and Jira issue tracking to demonstrate that low code quality drastically increases defect rates, development time, and unpredictability. It finds that low-quality code has 15× more defects, requires 124% longer resolution times, and exhibits 9× longer maximum cycle times, proving code quality is a critical business factor, not just a technical concern.

ABSTRACT

Code quality remains an abstract concept that fails to get traction at the business level. Consequently, software companies keep trading code quality for time-to-market and new features. The resulting technical debt is estimated to waste up to 42% of developers' time. At the same time, there is a global shortage of software developers, meaning that developer productivity is key to software businesses. Our overall mission is to make code quality a business concern, not just a technical aspect. Our first goal is to understand how code quality impacts 1) the number of reported defects, 2) the time to resolve issues, and 3) the predictability of resolving issues on time. We analyze 39 proprietary production codebases from a variety of domains using the CodeScene tool based on a combination of source code analysis, version-control mining, and issue information from Jira. By analyzing activity in 30,737 files, we find that low quality code contains 15 times more defects than high quality code. Furthermore, resolving issues in low quality code takes on average 124% more time in development. Finally, we report that issue resolutions in low quality code involve higher uncertainty manifested as 9 times longer maximum cycle times. This study provides evidence that code quality cannot be dismissed as a technical concern. With 15 times fewer defects, twice the development speed, and substantially more predictable issue resolution times, the business advantage of high quality code should be unmistakably clear.

Motivation & Objective

  • To quantify the business impact of code quality on defect rates, development time, and predictability of issue resolution.
  • To address the lack of measurable KPIs for code quality that resonate with business managers.
  • To demonstrate that technical debt and low code quality waste significant developer time and reduce team productivity.
  • To provide empirical evidence that high code quality improves development speed, defect reduction, and schedule predictability.
  • To advocate for code quality as a fundamental business goal, not just a technical concern.

Proposed method

  • The study uses CodeScene’s Code Health metric as a proxy for code quality, categorizing files into Healthy, Warning, and Red (Alert) levels.
  • It combines source code analysis, version control mining, and Jira issue data to calculate Time-in-Development at the file level.
  • The researchers analyze 30,737 files across 39 proprietary production codebases from diverse domains.
  • They compute defect density, average and maximum cycle times, and variance in development time across code quality levels.
  • Statistical analysis compares development effort and predictability across code health categories.
  • The method enables fine-grained, file-level tracking of development time and issue resolution patterns.

Experimental results

Research questions

  • RQ1How does code quality affect the number of reported defects in production code?
  • RQ2How does code quality impact the average time required to resolve issues?
  • RQ3To what extent does code quality influence the predictability of issue resolution, as measured by cycle time variance?
  • RQ4How does code quality affect the maximum cycle time for issue resolution?
  • RQ5What is the relationship between code quality and the uncertainty in development effort?

Key findings

  • Low-quality code (Red Code Health) contains 15 times more defects than high-quality code (Healthy code).
  • Resolving issues in low-quality code takes on average 124% longer than in high-quality code.
  • The maximum cycle time for issue resolution in low-quality code is 9 times longer than in high-quality code.
  • Development time for changes in low-quality code shows substantially higher variance, indicating greater unpredictability.
  • Even code in the Warning category requires 78% longer development time than Healthy code, indicating that moderate quality issues have significant business impact.
  • The high variance in development time for low-quality code increases stress and reduces planning accuracy, affecting team performance and sustainability.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.