Exploring the Effects of Urgency and Reputation in Code Review An Eye-Tracking and Machine Learning Approach
Year: 2024
Type: dissertation
Abstract: The pull-based development model, a cornerstone of collaboration in modern software engineering (SE), initiates the code review process when a contributor submits pull requests (PRs) for evaluation. While the decision to approve or decline PRs is often seen as grounded in technical quality, prior research reveals a more complex narrative where non-technical factors also play a significant role in influencing acceptance. This research project aims to empirically assess how non-technical factors influence developers' cognition and behavior during code review, including potential biases that affect their actions and outcomes. Drawing from the psychology of compliance, we select and combine cues of urgency (indicated by code priority level) and reputation (indicated by the author's experience level) to explore the impacts of these non-technical factors. We leverage eye-tracking technology—a novel approach in this context—to shed light on the cognitive processes underlying the evaluation of PRs. In an experimentally controlled study involving 37 participants reviewing Java code PRs, we find that the perceived priority level of a PR impacts both the time spent on tasks and the associated cognitive load. Moreover, while participants' behaviors reflect the influence of the priority level and the author's experience, they remain largely unaware of these effects on their decision-making, underscoring the critical importance of understanding these implicit biases in code reviews. Interestingly, despite variations in attention when reviewing contributions from novice versus senior authors, there was no discernible difference in acceptance outcomes based on the author's experience. Building on these insights, we utilize machine learning algorithms to predict PR acceptance. We consider features such as eye-gaze metrics, correctness of patches, task difficulty, priority level, and author's experience. The best model, logistic regression, achieves an accuracy of 84% using eye-gaze metrics and correctness. Feature importance analysis highlights that the correctness of the patch and task difficulty are the most significant predictors. This study advances our understanding of non-technical factors in SE and may inform future research on code review platforms and guidelines, code reuse, and automated code generation.
Author: Yabesi, Sara
Institution: Polytechnique Montréal
Language: French
Subfield: Information Systems
Field: Computer Science
Domain: Physical Sciences
Open Access status: green
OpenAlex ID: W6981778064
