Year: 2022
Type: conference-paper
Abstract: Many techniques have contributed to the advancement of automated program repair, such as: generate and validate approaches, constraint-based solvers and even neural machine translation. Simultaneously, artificial intelligence has allowed the creation of general-purpose pre-trained models that support several down-stream tasks. In this paper, we describe a technique that takes advantage of a generative model --- CodeGPT --- to automatically repair buggy programs by making use of its code completion capabilities. We also elaborate on where to perform code completion in a buggy line and how we circumvent the open-ended nature of code generation to appropriately fit the new code in the original program. Furthermore, we validate our approach on the ManySStuBs4J dataset containing real-world open-source projects and show that our tool is able to fix 1739 programs out of 6415 --- a 27% repair rate. The repaired programs range from single-line changes to multiple line modifications. In fact, our technique is able to fix programs which were missing relatively complex expressions prior to being analyzed. In the end, we present case studies that showcase different scenarios our technique was able to handle.
Authors: Francisco Ribeiro, Rui Abreu, João Saraiva
Institutions: University of Minho, Universidade do Porto
Language: English
Subfield: Software
Field: Computer Science
Domain: Physical Sciences
Open Access status: bronze
Awards: SecurityAware: Abordagem refinada para detectar e corrigir vulnerabilidades, FaultLocker: Ferramentas para localização e reparo de falhas em software crítico, Instituto de Engenharia de Sistemas e Computadores, Investigação e Desenvolvimento em Lisboa, Explaining Software Faults in Source Code, G5454278309, INESC TEC - Instituto de Engenharia de Sistemas e Computadores, Tecnologia e Ciência (INESC TEC)
OpenAlex ID: W4312962198
