A New Code Review Method based on Human Errors

Modern code reviews tend to take a lightweight process, in which the accuracy and efficiency of identifying defects rely heavily on code reviewers’ experience. The human errors of developers, as a significant cause of software defects, is a key to identifying defects. However, there is a lack of understanding of the human error mechanisms underlying defects in code. This paper proposes an innovative code review method for identifying defects by pinpointing the scenarios that developers tend to commit errors. The method was validated by a comprehensive experimental study that involved 49 code reviewers organized in two independent groups, i.e. experimental group vs. controlled group for each other. Forty reviewers have completed the whole experiment and provided the data for statistical analysis on the effects of the approach. The experiment shows that the proposed method has significantly improved True Positives and Sensitivity by about 400%, improved Precision by approximately 200%, and reduced around one-third of False Positives. The effects were consistent across different tasks and different code reviewers.

[1]  R. Couceiro,et al.  Quality Evaluation of Modern Code Reviews Through Intelligent Biometric Program Comprehension , 2023, IEEE Transactions on Software Engineering.

[2]  A. Sami,et al.  Which bugs are missed in code reviews: An empirical study on SmartSHARK dataset , 2022, 2022 IEEE/ACM 19th International Conference on Mining Software Repositories (MSR).

[3]  Lorenzo Strigini,et al.  HEDF: A Method for Early Forecasting Software Defects Based on Human Error Mechanisms , 2021, IEEE Access.

[4]  Fuqun Huang Software Requirement Criteria based on Human Errors , 2021, 2021 IEEE International Symposium on Software Reliability Engineering Workshops (ISSREW).

[5]  M. Castelo‐Branco,et al.  iReview: an Intelligent Code Review Evaluation Tool using Biofeedback , 2021, IEEE International Symposium on Software Reliability Engineering.

[6]  Felipe Ebert,et al.  An exploratory study on confusion in code reviews , 2020, Empirical Software Engineering.

[7]  Fuqun Huang,et al.  Software defect prevention based on human error theories , 2017 .

[8]  Luke Church,et al.  Modern Code Review: A Case Study at Google , 2017, 2018 IEEE/ACM 40th International Conference on Software Engineering: Software Engineering in Practice Track (ICSE-SEIP).

[9]  Kurt Schneider,et al.  Factors influencing code review processes in industry , 2016, SIGSOFT FSE.

[10]  Jeffrey C. Carver,et al.  Using a Cognitive Psychology Perspective on Errors to Improve Requirements Quality: An Empirical Investigation , 2016, 2016 IEEE 27th International Symposium on Software Reliability Engineering (ISSRE).

[11]  M. Godfrey,et al.  Investigating technical and non-technical factors influencing modern code review , 2016, Empirical Software Engineering.

[12]  Fuqun Huang,et al.  Post-Completion Error in Software Development , 2016, 2016 IEEE/ACM Cooperative and Human Aspects of Software Engineering (CHASE).

[13]  Michael W. Godfrey,et al.  Investigating code review quality: Do people and participation matter? , 2015, 2015 IEEE International Conference on Software Maintenance and Evolution (ICSME).

[14]  Michele Lanza,et al.  I know what you did last summer: an investigation of how developers spend their time , 2015, ICPC '15.

[15]  Hajimu Iida,et al.  Who should review my code? A file location-based code-reviewer recommendation approach for Modern Code Review , 2015, 2015 IEEE 22nd International Conference on Software Analysis, Evolution, and Reengineering (SANER).

[16]  Alberto Bacchelli,et al.  Expectations, outcomes, and challenges of modern code review , 2013, 2013 35th International Conference on Software Engineering (ICSE).

[17]  Claes Wohlin,et al.  Experimentation in Software Engineering , 2012, Springer Berlin Heidelberg.

[18]  Jay F. Nunamaker,et al.  Comparing the Defect Reduction Benefits of Code Inspection and Test-Driven Development , 2012, IEEE Transactions on Software Engineering.

[19]  Claes Wohlin,et al.  State‐of‐the‐art: software inspections after 25 years , 2002, Softw. Test. Verification Reliab..

[20]  Barry W. Boehm,et al.  What we have learned about fighting defects , 2002, Proceedings Eighth IEEE Symposium on Software Metrics.

[21]  Oliver Laitenberger,et al.  Perspective-based reading of code documents at Robert Bosch GmbH , 1997, Inf. Softw. Technol..

[22]  Michael E. Fagan Design and Code Inspections to Reduce Errors in Program Development , 1976, IBM Syst. J..

[23]  Michael D. Byrne,et al.  A Working Memory Model of a Common Procedural Error , 1997, Cogn. Sci..

[24]  Standard Glossary of Software Engineering Terminology , 1990 .

[25]  J. Shaoul Human Error , 1973, Nature.