Software code review, i.e., the practice of having third-party team members critique changes to a software system, is a well-established best practice in both open source and proprietary software domains. Prior work has shown that the formal code inspections of the past tend to improve the quality of software delivered by students and small teams. However, the formal code inspection process mandates strict review criteria (e.g., in-person meetings and reviewer checklists) to ensure a base level of review quality, while the modern, lightweight code reviewing process does not. Although recent work explores the modern code review process qualitatively, little research quantitatively explores the relationship between properties of the modern code review process and software quality. Hence, in this paper, we study the relationship between software quality and: (1) code review coverage, i.e., the proportion of changes that have been code reviewed, and (2) code review participation, i.e., the degree of reviewer involvement in the code review process. Through a case study of the Qt, VTK, and ITK projects, we find that both code review coverage and participation share a significant link with software quality. Low code review coverage and participation are estimated to produce components with up to two and five additional post-release defects respectively. Our results empirically confirm the intuition that poorly reviewed code has a negative impact on software quality in large systems using modern reviewing tools.
The Impact of Code Review Coverage and Participation on Software Quality
1. The Impact of Code Review
Coverage and Participation
on Software Quality
Shane
McIntosh
Ahmed E.
Hassan
Bram
Adams
Yasutaka
Kamei
@shane_mcintosh
shanemcintosh@acm.org
11. The modern, tool-supported code review process
3
Upstream
Gerrit
Shane
Bram
Yasu
Changes are automatically
integrated after review
criteria are satisfied
20. 7
commit b5b46f398c1a04ab443bf22ec08c5efbf72c161e
Author: Alan Alpert <alan.alpert@nokia.com>
Date: Thu Mar 1 20:09:52 2012 +1000
!
Add a hidden XandYAxis enum value
For Qt 5 XandYAxis is being renamed to XAndYAxis to more consistently
follow capitalization rules. Add an undocumented XandYAxis variable to
ease porting.
Change-Id: Id9e41dd5578373f5f557937da889a9326ff12e53
Reviewed-by: Martin Jones <martin.jones@jollamobile.com>
Gerrit
Upstream
Reviews can be linked to commits in
version control systems
21. 7
commit b5b46f398c1a04ab443bf22ec08c5efbf72c161e
Author: Alan Alpert <alan.alpert@nokia.com>
Date: Thu Mar 1 20:09:52 2012 +1000
!
Add a hidden XandYAxis enum value
For Qt 5 XandYAxis is being renamed to XAndYAxis to more consistently
follow capitalization rules. Add an undocumented XandYAxis variable to
ease porting.
Change-Id: Id9e41dd5578373f5f557937da889a9326ff12e53
Reviewed-by: Martin Jones <martin.jones@jollamobile.com>
Gerrit
Upstream
Reviews can be linked to commits in
version control systems
22. 7
commit b5b46f398c1a04ab443bf22ec08c5efbf72c161e
Author: Alan Alpert <alan.alpert@nokia.com>
Date: Thu Mar 1 20:09:52 2012 +1000
!
Add a hidden XandYAxis enum value
For Qt 5 XandYAxis is being renamed to XAndYAxis to more consistently
follow capitalization rules. Add an undocumented XandYAxis variable to
ease porting.
Change-Id: Id9e41dd5578373f5f557937da889a9326ff12e53
Reviewed-by: Martin Jones <martin.jones@jollamobile.com>
Gerrit
Upstream
Reviews can be linked to commits in
version control systems
23. 7
commit b5b46f398c1a04ab443bf22ec08c5efbf72c161e
Author: Alan Alpert <alan.alpert@nokia.com>
Date: Thu Mar 1 20:09:52 2012 +1000
!
Add a hidden XandYAxis enum value
For Qt 5 XandYAxis is being renamed to XAndYAxis to more consistently
follow capitalization rules. Add an undocumented XandYAxis variable to
ease porting.
Change-Id: Id9e41dd5578373f5f557937da889a9326ff12e53
Reviewed-by: Martin Jones <martin.jones@jollamobile.com>
Gerrit
Upstream
Reviews can be linked to commits in
version control systems
37. 13
Measuring review coverage using the
proportion of reviewed changes
13
Upstream
Development
Gerrit
7 out of 10 changes are!
linked to code reviews
38. 14
Concrete Predicted Defect Count
Defect
Model
Create artificial component setting explanatory
variables to median values
Artificial
Comp.
500SLOC
Explanatory!
Variable Value
Reviewed
changes
100%
Churn 150
39. 15
Defect
Model
Calculate number of predicted defects
Artificial
Comp.
500SLOC
Explanatory!
Variable Value
Reviewed
changes
Churn 150
Reviewed
changes
PredictedDefectCount
Concrete Predicted Defect Count
100%
40. 15
Defect
Model
Calculate number of predicted defects
Artificial
Comp.
500SLOC
Explanatory!
Variable Value
Reviewed
changes
Churn 150
Reviewed
changes
0
PredictedDefectCount
Concrete Predicted Defect Count
100%
41. 15
Defect
Model
Calculate number of predicted defects
Artificial
Comp.
500SLOC
Explanatory!
Variable Value
Reviewed
changes
Churn 150
Reviewed
changes
0
PredictedDefectCount
Concrete Predicted Defect Count
100%
49. ParticipationCoverage
Do lax reviewing practices have an
impact on software quality?
!
Coverage is linked to
quality in two of the four
studied systems, yet it
doesn’t tell the whole
story
50. ParticipationCoverage
Do lax reviewing practices have an
impact on software quality?
!
Coverage is linked to
quality in two of the four
studied systems, yet it
doesn’t tell the whole
story
53. 20
Measuring review participation using
proportions of lax reviews
I❤️
Me
Self-approved
changes
Hastily-reviewed
changes
Changes without
discussion
54. 21
Measuring review participation using
proportions of lax reviews
I❤️
Me
Self-approved
changes
Hastily-reviewed
changes
Changes without
discussion
57. ● ● ●
● ●
● ● ●
● ● ●
● ● ●
● ● ●
0
1
2
3
4
5
0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0
Proportion of Self−Approved Changes
ConcretePredictedDefectCount
22
5 additional
post-release defects
Small increase
leads to defects
Lax participation leads to many
post-release defects in our models
58. ParticipationCoverage
Do lax reviewing practices have an
impact on software quality?
!
Coverage is linked to
quality in two of the four
studied systems, yet it
doesn’t tell the whole
story
59. ParticipationCoverage
Do lax reviewing practices have an
impact on software quality?
!
Coverage is linked to
quality in two of the four
studied systems, yet it
doesn’t tell the whole
story
!
Components w/ lax
review participation are
estimated to have several
additional post-release
defects