Doctoral thesis

Automating code review

  • 2023

PhD: Università della Svizzera italiana

English 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.
Collections
Language
  • English
Classification
Computer science and technology
License
License undefined
Open access status
green
Identifiers
Persistent URL
https://n2t.net/ark:/12658/srd1327791
Statistics

Document views: 5 File downloads:
  • 2023INF022.pdf: 4