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.

Modern Code Reviews in Open Source Projects: Which Problems Do They Fix?

798 views

Published on

Code review is the manual assessment of source code by humans, mainly intended to identify defects and quality problems. Modern Code Review (MCR), a lightweight variant of the code inspections investigated since the 1970s, prevails today both in industry and open-source software (OSS) systems. In this talk, I outlined the practical benefits that the MCR process produces on reviewed source code. To that end, I present two case studies that we carried out on two OSS systems each, classifying more than 1,400 review-induced source code changes manually. Surprisingly, results show that the types of changes due to the MCR process in OSS are strikingly similar to those in the industry and academic systems from literature, featuring the similar 75:25 ratio of maintainability-related to functional problems. I also reveal that 7–35% of review comments are discarded and that 10–22% of the changes are not triggered by an explicit review comment. Patterns emerged in the review data; we investigated them to get to know the technical factors that influence the number of changes due to the MCR process. We found that bug-fixing tasks lead to fewer changes and tasks with more altered files and a higher code churn have more changes. Contrary to intuition, the person of the reviewer had no impact on the number of changes.

Published in: Software
  • Be the first to comment

  • Be the first to like this

Modern Code Reviews in Open Source Projects: Which Problems Do They Fix?

  1. 1. Modern Code Reviews in Open-Source Projects: Which Problems Do They Fix? Moritz Beller Delft University of Technology @Inventitech Alberto Bacchelli, Andy Zaidman Elmar Juergens, CQSE GmbH
  2. 2. Modern Code Review Workflow
  3. 3. Modern Code Review Workflow
  4. 4. Modern Code Review Workflow
  5. 5. Modern Code Review Workflow
  6. 6. Modern Code Review Workflow
  7. 7. Modern Code Review Workflow
  8. 8. Modern Code Review Workflow
  9. 9. Modern Code Review Workflow
  10. 10. Modern Code Review Workflow
  11. 11. Modern Code Review Workflow
  12. 12. Modern Code Review Workflow
  13. 13. Modern Code Review Workflow +
  14. 14. /** The ui thread for WatchDog registration. */ public Runnable watchDog = new StartupUIThread();
  15. 15. /** The ui thread for WatchDog registration. */ public Runnable watchDog = new StartupUIThread(); /** The ui thread for WatchDog registration. */ // TODO (GG) Provide a more descriptive name public Runnable watchDog = new StartupUIThread();
  16. 16. /** The ui thread for WatchDog registration. */ public Runnable watchDog = new StartupUIThread(); /** The ui thread for WatchDog registration. */ // TODO (GG) Provide a more descriptive name public Runnable watchDog = new StartupUIThread();
  17. 17. /** The ui thread for WatchDog registration. */ public Runnable watchDog = new StartupUIThread(); /** The ui thread for WatchDog registration. */ // TODO (GG) Provide a more descriptive name public Runnable watchDog = new StartupUIThread(); /** The ui thread for WatchDog registration. */ public Runnable watchDogUiThread = new StartupUIThread();
  18. 18. /** The ui thread for WatchDog registration. */ public Runnable watchDog = new StartupUIThread(); /** The ui thread for WatchDog registration. */ // TODO (GG) Provide a more descriptive name public Runnable watchDog = new StartupUIThread(); /** The ui thread for WatchDog registration. */ public Runnable watchDogUiThread = new StartupUIThread();
  19. 19. Review-triggered Change /** The ui thread for WatchDog registration. */ public Runnable watchDog = new StartupUIThread(); /** The ui thread for WatchDog registration. */ // TODO (GG) Provide a more descriptive name public Runnable watchDog = new StartupUIThread(); /** The ui thread for WatchDog registration. */ public Runnable watchDogUiThread = new StartupUIThread();
  20. 20. /** The ui thread for WatchDog registration. */ public Runnable watchDog = new StartupUIThread(); /** The ui thread for WatchDog registration. */ // TODO (GG) Provide a more descriptive name public Runnable watchDog = new StartupUIThread();
  21. 21. /** The ui thread for WatchDog registration. */ public Runnable watchDog = new StartupUIThread(); /** The ui thread for WatchDog registration. */ // TODO (GG) Provide a more descriptive name public Runnable watchDog = new StartupUIThread();
  22. 22. /** The ui thread for WatchDog registration. */ public Runnable watchDog = new StartupUIThread(); /** The ui thread for WatchDog registration. */ // TODO (GG) Provide a more descriptive name public Runnable watchDog = new StartupUIThread(); /** The ui thread for WatchDog registration. */ private Runnable watchDogUiThread = new StartupUIThread();
  23. 23. /** The ui thread for WatchDog registration. */ public Runnable watchDog = new StartupUIThread(); /** The ui thread for WatchDog registration. */ // TODO (GG) Provide a more descriptive name public Runnable watchDog = new StartupUIThread(); /** The ui thread for WatchDog registration. */ private Runnable watchDogUiThread = new StartupUIThread();
  24. 24. Self-motivated + Review-triggered Change /** The ui thread for WatchDog registration. */ public Runnable watchDog = new StartupUIThread(); /** The ui thread for WatchDog registration. */ // TODO (GG) Provide a more descriptive name public Runnable watchDog = new StartupUIThread(); /** The ui thread for WatchDog registration. */ private Runnable watchDogUiThread = new StartupUIThread();
  25. 25. /** The ui thread for WatchDog registration. */ public Runnable watchDog = new StartupUIThread(); /** The ui thread for WatchDog registration. */ // TODO (GG) Provide a more descriptive name public Runnable watchDog = new StartupUIThread();
  26. 26. /** The ui thread for WatchDog registration. */ public Runnable watchDog = new StartupUIThread(); /** The ui thread for WatchDog registration. */ // TODO (GG) Provide a more descriptive name public Runnable watchDog = new StartupUIThread();
  27. 27. /** The ui thread for WatchDog registration. */ public Runnable watchDog = new StartupUIThread(); /** The ui thread for WatchDog registration. */ // TODO (GG) Provide a more descriptive name public Runnable watchDog = new StartupUIThread(); /** * The ui thread for WatchDog registration. From * this thread, the WatchDog program is started. */ public Runnable watchDog = new StartupUIThread();
  28. 28. /** The ui thread for WatchDog registration. */ public Runnable watchDog = new StartupUIThread(); /** The ui thread for WatchDog registration. */ // TODO (GG) Provide a more descriptive name public Runnable watchDog = new StartupUIThread(); /** * The ui thread for WatchDog registration. From * this thread, the WatchDog program is started. */ public Runnable watchDog = new StartupUIThread();
  29. 29. Self-motivated Change /** The ui thread for WatchDog registration. */ public Runnable watchDog = new StartupUIThread(); /** The ui thread for WatchDog registration. */ // TODO (GG) Provide a more descriptive name public Runnable watchDog = new StartupUIThread(); /** * The ui thread for WatchDog registration. From * this thread, the WatchDog program is started. */ public Runnable watchDog = new StartupUIThread();
  30. 30. /** The ui thread for WatchDog registration. */ public Runnable watchDog = new StartupUIThread(); /** The ui thread for WatchDog registration. */ // TODO (GG) Provide a more descriptive name public Runnable watchDog = new StartupUIThread();
  31. 31. /** The ui thread for WatchDog registration. */ public Runnable watchDog = new StartupUIThread(); /** The ui thread for WatchDog registration. */ // TODO (GG) Provide a more descriptive name public Runnable watchDog = new StartupUIThread();
  32. 32. /** The ui thread for WatchDog registration. */ public Runnable watchDog = new StartupUIThread(); /** The ui thread for WatchDog registration. */ // TODO (GG) Provide a more descriptive name public Runnable watchDog = new StartupUIThread(); /** The ui thread for WatchDog registration. */ public Runnable watchDog = new StartupUIThread();
  33. 33. No Change /** The ui thread for WatchDog registration. */ public Runnable watchDog = new StartupUIThread(); /** The ui thread for WatchDog registration. */ // TODO (GG) Provide a more descriptive name public Runnable watchDog = new StartupUIThread(); /** The ui thread for WatchDog registration. */ public Runnable watchDog = new StartupUIThread();
  34. 34. No Change /** The ui thread for WatchDog registration. */ public Runnable watchDog = new StartupUIThread(); /** The ui thread for WatchDog registration. */ // TODO (GG) Provide a more descriptive name public Runnable watchDog = new StartupUIThread(); /** The ui thread for WatchDog registration. */ public Runnable watchDog = new StartupUIThread();
  35. 35. No Change /** The ui thread for WatchDog registration. */ public Runnable watchDog = new StartupUIThread(); /** The ui thread for WatchDog registration. */ // TODO (GG) Provide a more descriptive name public Runnable watchDog = new StartupUIThread(); /** The ui thread for WatchDog registration. */ public Runnable watchDog = new StartupUIThread();
  36. 36. Does it matter?
  37. 37. >1,400 changes >245 tasks
  38. 38. Motivation for Change
  39. 39. Motivation for Change
  40. 40. 78-90% Motivation for Change
  41. 41. 78-90% Motivation for Change 22-10%
  42. 42. 78-90% Motivation for Change 22-10%
  43. 43. Motivation for No Change
  44. 44. Motivation for No Change
  45. 45. Motivation for No Change 7-35%
  46. 46. Motivation for No Change 7-35%
  47. 47. Type of Change
  48. 48. Doc Visual Structure Resource Check Interface Logic Larger Support ConQAT Gromacs 10% 20% 30% 40%
  49. 49. 75 : 25 Doc Visual Structure Resource Check Interface Logic Larger Support ConQAT Gromacs 10% 20% 30% 40%
  50. 50. 75 : 25 Doc Visual Structure Resource Check Interface Logic Larger Support ConQAT Gromacs 10% 20% 30% 40%
  51. 51. 75 : 25 Doc Visual Structure Resource Check Interface Logic Larger Support ConQAT Gromacs 10% 20% 30% 40%
  52. 52. 75 : 25
  53. 53. What Influences Code Review?
  54. 54. What Influences Code Review?
  55. 55. What Influences Code Review?
  56. 56. What Influences Code Review? > 2,800 changes > 970 tasks
  57. 57. What Influences Code Review? > 2,800 changes > 970 tasks
  58. 58. What Influences Code Review? > 2,800 changes > 970 tasks
  59. 59. What Influences Code Review? > 2,800 changes > 970 tasks
  60. 60. What Influences Code Review? > 2,800 changes > 970 tasks
  61. 61. What Influences Code Review? > 2,800 changes > 970 tasks
  62. 62. What Influences Code Review? > 2,800 changes > 970 tasks
  63. 63. What Influences Code Review? > 2,800 changes > 970 tasks
  64. 64. @Inventitech Moritz Beller, TU Delft Modern Code Reviews in Open-Source Projects: Which Problems Do They Fix?
  65. 65. @Inventitech Moritz Beller, TU Delft Modern Code Reviews in Open-Source Projects: Which Problems Do They Fix?
  66. 66. @Inventitech Moritz Beller, TU Delft Modern Code Reviews in Open-Source Projects: Which Problems Do They Fix?
  67. 67. @Inventitech Moritz Beller, TU Delft Modern Code Reviews in Open-Source Projects: Which Problems Do They Fix?

×