Initial and Eventual Software Quality Relating to Continuous Integration in GitHub

Yue Yu, Bogdan Vasilescu, Huaimin Wang, Vladimir Filkov, Premkumar T. DevanbuarXiv 2016

Abstract

The constant demand for new features and bug fixes forces software projects to shorten cycles and deliver updates faster while sustaining quality. Continuous Integration (CI) in the cloud has enabled this acceleration. In projects using CI, submitting a pull request (PR) triggers automated build and test steps, creating voluminous archives of successes and failures. This paper presents a large-scale study of these records to understand CI processes, the nature of CI failures, and their relationship to eventual code quality. We find that CI failures are concentrated in specific "hotspot" files and that while CI is a powerful gatekeeper, a "Hard Failure" during the CI process is a significant predictor of future bugs.

Introduction

Continuous Integration has become the heartbeat of modern software development. Tools like Travis-CI automatically build and test code every time a developer submits a PR. While CI helps teams move faster, its relationship with long-term software quality has remained under-explored. This study investigates whether "Initial Quality" (failures caught by CI before merging) serves as a reliable predictor for "Eventual Quality" (bugs discovered by users after the code is merged).

Methodology

The researchers conducted an empirical study using quantitative regression modeling and qualitative case studies. They introduced two key metrics to track quality throughout the development lifecycle:

  • Initial Quality Record (IQR): Derived from Travis-CI logs to capture failures during the PR phase.
  • Eventual Quality Record (EQR): Identified by tracing post-merge bug fixes back to original PRs using the SZZ algorithm.
The CI workflow and the definition of Initial Quality Record (IQR) and Eventual Quality Record (EQR).

The study utilized mixed-effects logistic regression to account for project-level variations, incorporating product metrics (code size), process metrics (contributors, churn), social metrics (reputation), and CI-specific metrics (maturity, configuration complexity).

Datasets

The analysis focused on a filtered dataset of popular GitHub projects with active issue trackers and reliable bug-tagging:

  • 87 projects for the initial quality model (21,119 PRs).
  • 64 projects for the eventual quality model (10,932 PRs).

The dataset spans four years of development history, primarily featuring dynamic languages like Python and Ruby.

Key Insights and Results

The "Hard Failure" Warning

The most striking finding is the correlation between "Hard Failures"—where a PR initially fails CI, is fixed, and then passes—and future bugs. PRs that experience a Hard Failure have 31.5% greater odds of being associated with an eventual post-merge bug. This suggests that code struggling to pass automated gates often harbors deeper architectural flaws that CI eventually misses.

Regression results showing the impact of CI results on the likelihood of post-merge bugs.

The Pareto Principle of CI

Similar to traditional bugs, CI failures are highly concentrated. A small fraction of "hotspot" files accounts for the vast majority of failures. However, at the individual file level, there is a weak correlation between where CI failures happen and where eventual bugs appear. CI is effective at catching syntax or basic logic errors but may be blind to the complex issues that cause post-merge defects.

Social and Structural Factors

  • Social Influence: PRs from core team members are significantly less likely to fail CI than those from external contributors, though the final merged code quality is similar, highlighting CI's role as an equalizer.
  • CI Maturity: Projects with longer-running CI suites and more complex configurations (e.g., larger .travis.yml files) are more effective at catching defects early.

Limitations and Future Work

The study primarily focused on projects using Travis-CI, which may introduce a bias toward dynamic languages. Future research should examine statically typed languages (C++, Java) where build-time failures might differ. Additionally, while automated CI is a vital gatekeeper, the interplay between automated tests and human code review remains an open challenge for understanding how bugs ultimately escape into production.

Summary updated

BibTeX
@misc{yu2016initial,
  author = {Yue Yu and Bogdan Vasilescu and Huaimin Wang and Vladimir Filkov and Premkumar T. Devanbu},
  title = {{Initial and Eventual Software Quality Relating to Continuous Integration in GitHub}},
  year = {2016},
  eprint = {1606.00521},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1606.00521},
}
Figure