An Exploratory Study of Design Discussions That Occur During Peer Code Review

Authors - Farida El Zanaty
Venue - McGill University, pp. 1-87, 2019

Related Tags - Theses 2019 code review

Abstract - Code review is a well-established software quality practice where developers critique each others’ changes. A shift towards automated detection of low-level issues (e.g., integration with linters) has, in theory, freed reviewers up to focus on higher level issues, such as software design. Yet in practice, little is known about the extent to which design is discussed during code review. To bridge this gap, in this thesis, we set out to study the frequency and nature of design discussions in code reviews. We first perform an empirical study on the code reviews of the OpenStack Nova (provisioning management) and Neutron (networking abstraction) projects. We manually classify 2,817 review comments from a randomly selected sample of 220 code reviews. We then train and evaluate classifiers to automatically label review comments as design related or not. Finally, we apply the classifiers to a larger sam- ple of 2,506,308 review comments to study the characteristics of reviews that include design discussions. Our manual analysis indicates that (1) design discussions are still quite rare, with only 9% and 14% of Nova and Neutron review comments being related to software design, respectively; and (2) design feedback is often constructive, with 73% of the design-related comments also providing suggestions to address the concerns. Furthermore, code changes that have design-related feedback have a statistically significantly increased rate of abandonment (Pearson 2 test, DF=1, p < 0.001). To further explore the phenomenon, we survey 94 software developers and triangulate the responses with respect to our quantitative and qualitative results. The results indicate that 1) discussing design is indeed perceived to be an important topic in code review, which benefits the author/reviewer (peer mentorship), the development team (collaborative problem solving, change awareness), and the end-product (improved code quality); and that 2) software developers in an industry setting prioritize the performance of the system over other design concerns. Given the relative sparseness of design discussions during code review and its role as a primary motivation for conducting code review, more may need to be done to foster such discussions among contributors.

Preprint - PDF

Bibtex

@mastersthesis{zanaty2019masters,
  Author = {Farida El Zanaty},
  Title = {{An Exploratory Study of Design Discussions That Occur During Peer Code Review}},
  Year = {2019},
  School = {McGill University},
  Address = {3480 Rue University, Montréal, QC, Canada},
  Month = {December}
}