Carleton University
Leveraging Language Models to Improve Code Quality Through Code Linting and Automated Test Repair
Abstract
dc:description.abstractThis thesis aims to evaluate how well Language Models (LMs) can help to improve code quality through two tasks: code linting and automated test repair. Code linters identify issues in code, but are often specialized and limited to certain issues. This thesis aims to use LMs to create a code linting approach that can replicate the results of applying multiple code linters. After training LMs on a dataset of code issues, the models achieved 84.9% accuracy in issue detection and 83.6% accuracy in issue identification, outperforming two popular code linters. Automatically repairing test cases helps code quality by allowing developers to focus on code rather than false test failures. LMs are trained to repair broken tests based on changes to the underlying code. LMs are able to repair tests with a 66.1% exact match rate, and a 80.0% plausible repair, showing that LMs can effectively repair test cases.
Degree
thesis:*- Name thesis:degree_name
- Master of Applied Science (M.App.Sc.)
- Level thesis:degree_level
- Master's
- Discipline thesis:degree_discipline
- Engineering, Electrical and Computer
- Grantor dc:publisher
- Carleton University
- Year dc:date.issued
- 2024
Author and committee
dc:creator, dc:contributor.*- Author dc:creator
-
- Holden, Darren Alexander
Subjects
dc:subject × 2Rights
dc:rights- Statement dc:rights
-
- Copyright © 2024 the author(s). Theses may be used for non-commercial research, educational, or related academic purposes only. Such uses include personal study, distribution to students, research and scholarship. Theses may only be shared by linking to the Carleton University Institutional Repository and no part may be copied without proper attribution to the author; no part may be used for commercial purposes directly or indirectly via a for-profit platform; no adaptation or derivative works are permitted without consent from the copyright owner.
- Language dc:language.iso
- en