Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Confusion in Code Reviews: Reasons, Impacts, and Coping Strategies

125 views

Published on

Code review is a software quality assurance practice widely employed in both open source and commercial software projects to detect defects, transfer knowledge and encourage adherence to coding standards. Notwithstanding, code reviews can also delay the incorporation of a code change into a code base, thus slowing down the overall development process. Part of this delay is often a consequence of reviewers not understanding, becoming confused by, or being uncertain about the intention, behavior, or effect of a code change.
We investigate the reasons and impacts of confusion in code reviews, as well as the strategies developers adopt to cope with confusion. We employ a concurrent triangulation strategy to combine the analyses of survey responses and of the code review comments, and build a comprehensive confusion framework structured along the dimensions of the review process, the artifact being reviewed, the developers themselves and the relation between the developer and the artifact. The most frequent reasons for confusion are the missing rationale, discussion of non- functional requirements of the solution, and lack of familiarity with existing code. Developers report that confusion delays the merge decision, decreases review quality, and results in additional discussions. To cope with confusion developers request informa- tion, improve familiarity with existing code, and discuss off-line.
Based on the results, we provide a series of implications for tool builders, as well as insights and suggestions for researchers. The results of our work offer empirical justification for the need to improve code review tools to support developers facing confusion.

Published in: Software
  • Be the first to comment

  • Be the first to like this

Confusion in Code Reviews: Reasons, Impacts, and Coping Strategies

  1. 1. Confusion in Code Reviews Reasons, Impacts, and Coping Strategies
  2. 2. Felipe Ebert1 Nicole Novielli2 1 Federal University of Pernambuco, Brazil 2 University of Bari, Italy 3 Eindhoven University of Technology, The Netherlands Fernando Castor1 Alexander Serebrenik3
  3. 3. Code Review 3
  4. 4. Why Code Reviewing?! 4 Find Defects
  5. 5. Why Code Reviewing?! 5 Find Defects Code Improvement Alternative Solutions
  6. 6. Why Code Reviewing?! 6 Knowledge Transfer Find Defects Code Improvement Alternative Solutions
  7. 7. Why Code Reviewing?! 7 Knowledge Transfer Team Awareness Find Defects Code Improvement Alternative Solutions
  8. 8. Code Reviews Are Not Free!!! 8
  9. 9. 9
  10. 10. What is confusion?! a situation where a person is uncertain about or unable to understand something 10
  11. 11. The impacts of confusion! 11
  12. 12. The impacts of confusion! 12
  13. 13. The impacts of confusion! 13
  14. 14. 14 Reasons Impacts Coping strategies
  15. 15. Methodology 15 “what developers say” “what developers do”
  16. 16. Survey • How often do you feel confused...? • What usually makes you confused...? • What is the impact of confusion…? • What do you usually do to overcome confusion…? 16
  17. 17. Code Review Comments[1] • Extracted from Android code reviews • Including expressions of confusion • 156 general comments • 151 inline comments • Discussed and agreed upon by the authors 17 [1] F. Ebert, F. Castor, N. Novielli, and A.Serebrenik. Confusion Detection in Code Reviews. In Proceedings of ICSME 2017, pp. 549–553.
  18. 18. Card sorting! Card sorting! Card sorting! 18
  19. 19. What Developers Say? • 1st survey: – Android developers – 17 responses – Response rate: 0.45% • 2nd survey: – Facebook & Twitter – 24 responses • 3rd survey: – Facebook & Twitter – 13 responses 19
  20. 20. What Developers Say? • 1st survey: – Android developers – 17 responses – Response rate: 0.45% • 2nd survey: – Facebook & Twitter – 24 responses • 3rd survey: – Facebook & Twitter – 13 responses 20
  21. 21. What Developers Say? • 1st survey: – Android developers – 17 responses – Response rate: 0.45% • 2nd survey: – Facebook & Twitter – 24 responses • 3rd survey: – Facebook & Twitter – 13 responses 21
  22. 22. We treat survey respondents as a single population • 2nd and 3rd • ANOSIM R = −0.0171 and p-value = 0.542 • ADONIS p-value = 0.975 • 1st and the later two • ANOSIM R = 0.126 and p-value = 0.01 • ADONIS p-value = 0.191 22
  23. 23. What Developers Do? • 156 General Comments • 151 Inline Comments 23
  24. 24. 24
  25. 25. 30 reasons 14 impacts 13 coping strategies 25
  26. 26. Frequency of Confusion 26 41%
  27. 27. 27
  28. 28. 28
  29. 29. 29
  30. 30. 30
  31. 31. 31
  32. 32. 32
  33. 33. 33
  34. 34. 34
  35. 35. Concluding Remarks • Some topics have not been studied yet! 35 • Confusion is present! – “Developers said!” (survey) – “Developers did!” (code review comments) • Confusion in context: – 30 reasons – 14 impacts – 13 coping strategies

×