Automating Code Review

Staff - Faculty of Informatics

Date: 24 November 2023 / 13:30 - 16:00

USI East Campus Lugano, room D1.14

You are cordially invited to attend the PhD Dissertation Defence of Rosalia Tufano on Friday 24 November 2023 at 13:30 in room D1.14 (USI East Campus)

Several empirical studies have provided evidence that low code quality is generally associated with higher fault-proneness, lower productivity, more rework, and more effort for developers. In response to the need for improving code quality, code review has been widely adopted in open source and industrial projects. While empirical studies showed the undoubted advantages of code review (e.g., less buggy code) its cost is non-negligible. Indeed, code review requires several developers to be allocated, with different roles, on the same coding activity. In particular, a contributor submits a code change to be reviewed and one or more reviewers inspect the change, comment on it (e.g., by providing recommendations for improvement), and judge whether it is of sufficient quality to be merged. The goal of our research is to (partially) automate this time-consuming process. The final goal is not to replace developers during code reviews but work with them in tandem by automatically solving (or identifying) code quality issues that developers would manually catch and fix. In particular, we propose techniques exploiting deep learning models to automate three code review tasks related to (i) commenting in natural language a code change submitted for review with the goal of recommending how to improve its quality as a human reviewer would do; and (ii) automatically implementing code changes usually required in the code review process. We empirically evaluated the proposed solutions both quantitatively and qualitatively, disclosing their strengths and weaknesses. Despite the identified limitations, we show the promise of automating code review tasks using deep learning, pointing to directions for future work in the area. Room: D0.02

Dissertation Committee:
- Prof. Gabriele Bavota, Università della Svizzera italiana, Switzerland (Research Advisor)
- Prof. Carlo Alberto Furia, Università della Svizzera italiana, Switzerland (Internal Member)
- Prof. Paolo Tonella, Università della Svizzera italiana, Switzerland (Internal Member)
- Prof. Massimiliano Di Penta, University of Sannio, Italy (External Member)
- Prof. Sonia Haiduc, Florida State University, USA (External Member)
- Prof. Alexander Serebrenik, Eindhoven University of Technology, The Netherlands (External Member)