Automatic Program Repair For Breaking Dependency Updates With Large Language Models
2024 (English)Independent thesis Advanced level (degree of Master (Two Years)), 20 credits / 30 HE credits
Student thesisAlternative title
Automatisk programreparation för brytande uppdateringar av beroenden med stora språkmodeller (Swedish)
Abstract [en]
External libraries are widely used to expedite software development, but like any software component, they are updated over time, introducing new features and deprecating or removing old ones. When a library introduces breaking changes, all its clients must be updated to avoid disruptions. This update, when it introduces a breaking change, is defined as a Breaking Dependency Update. Repairing such breakages is challenging and time-consuming because the error originates in the dependency, while the fix must be applied to the client codebase. Automatic Program Repair (APR) is a research area focused on developing techniques to repair code failures without human intervention. With the advent of Large Language Models (LLMs), learning-based APR techniques have significantly improved in software repair tasks. However, their effectiveness on Breaking Dependency Updates remains unexplored. This thesis aims to investigate the efficacy of an LLM-based APR approach to Breaking Dependency Updates and to examine the impact of different components on the model’s performance and efficiency. The focus is on the API differences between the old and new versions of the dependency and a set of error-type specific repair strategies. Experiments conducted on a subset of BUMP, a new benchmark for Breaking Dependency Updates, with a strong focus on build failures, demonstrate that a naive approach to these client breakages is insufficient. Additional context from the dependency changes is necessary. Furthermore, error-type specific repair strategies are essential to repair some blocking failures that prevent the tool from completely repairing the projects. Finally, our research found that GPT-4, Gemini, and Llama exhibit similar efficacy levels but differ significantly in cost-efficiency, with GPT-4 having the highest cost per repaired failure among the tested models, almost 30 times higher than Gemini.
Abstract [sv]
Externa bibliotek används i stor utsträckning för att påskynda mjukvaruutveckling, men precis som alla mjukvarukomponenter uppdateras de över tid, nya funktioner introduceras och gamla kan föråldras eller tas bort helt. När ett bibliotek introducerar förändringar som bryter bakåtkompatibilitet, måste alla dess klienter uppdateras för att undvika störningar. Denna uppdatering, när den introducerar en brytande förändring, kallas en brytande beroendeuppdatering. Att reparera sådana fel är utmanande och tidskrävande eftersom felet uppstår i beroendet, medan lösningen måste tillämpas på klientkodbasen. Automatisk programreparation (APR) är ett forskningsområde som fokuserar på att utveckla tekniker för att reparera kodfel utan mänsklig intervention. Med tillkomsten av stora språkmodeller (LLM) har inlärningsbaserade APRtekniker avsevärt förbättrats inom mjukvarureparation. Deras effektivitet vid brytande beroendeuppdateringar är dock ännu outforskad. Denna avhandling syftar till att undersöka effektiviteten hos en LLM-baserad APR-ansats för brytande beroendeuppdateringar och att undersöka påverkan av olika komponenter på modellens prestanda och effektivitet. Fokus ligger på API-skillnader mellan den gamla och nya versionen av beroendet och en uppsättning feltypsspecifika reparationsstrategier. Experiment utförda på ett delmängd av BUMP, ett nytt riktmärke för brytande beroendeuppdateringar, med starkt fokus på byggfel, visar att en naiv ansats till dessa klientbrott är otillräcklig. Ytterligare kontext från beroendeförändringarna är nödvändig. Dessutom är feltypsspecifika reparationsstrategier nödvändiga för att reparera vissa blockerande fel som hindrar verktyget från att fullständigt reparera projekten. Slutligen fann vår forskning att GPT-4, Gemini och Llama uppvisar liknande effektivitetsnivåer men skiljer sig avsevärt i kostnadseffektivitet, där GPT-4 har den högsta kostnaden per reparerat fel bland de testade modellerna.
Place, publisher, year, edition, pages
2024. , p. 63
Series
TRITA-EECS-EX ; 2024:699
Keywords [en]
Breaking Dependency Updates, Automatic Program Repair, Large Language Models, Software Engineering
Keywords [sv]
Brytande uppdateringar av beroenden, automatisk programreparation, stora språkmodeller, mjukvaruutveckling
National Category
Computer and Information Sciences
Identifiers
URN: urn:nbn:se:kth:diva-354835OAI: oai:DiVA.org:kth-354835DiVA, id: diva2:1905601
External cooperation
T4 Group SRL
Supervisors
Examiners
2024-10-172024-10-142024-10-17Bibliographically approved