Year: 2024
Type: article
Abstract: It is common in contemporary software development to reuse features provided by third-party libraries.Reusing features instead of re-implementing them from scratch can reduce development time and may improve the overall system quality.However, selecting an appropriate library to reuse features from can be difficult for developers due to the lack of automated tool support.Some library indices propose rankings of libraries, but these are biased towards the number of library downloads, attributed stars, etc.This may lead developers to select the most popular library instead of the library with the feature they were hoping to reuse.This thesis makes three contributions.The first, called LiFUSO, is an automated approach to enumerating and describing the features provided by a library based on publicly available information on social coding platforms such as Stack Overflow (SO) and GitHub.LiFUSO analyses library usages within SO posts and extracts usage patterns indicative of library features.To this end, it considers both the code snippets and the surrounding natural language within each SO post that discusses the library.RESICO, the second contribution of the thesis, is an automated approach to resolving API type references within a code snippet to their corresponding fully-qualified name.As a learning-based text classification approach, RESICO needs to be trained on a corpus of programs for which a compiler has determined the correct type information.Once trained, it can take syntactically incorrect code snippets as input.The final contribution combines LiFUSO and RESICO so the former is no longer limited in scope to SO posts that have been tagged with a library's name but can also extract information from posts in which it has recognised many library types.We evaluate the impact of broadening the scope of the analysis on the quantity and quality of the uncovered library features.The contributions are relevant to the software engineering community at large.RESI-CO's type resolution can be adopted by tools that need to analyse potentially incomplete code snippets, or by tools that need to determine the libraries used within a code snippet -just like in our third contribution.LiFUSO paves the way for tool support for selecting a library from many alternatives.Finally, these contributions help understand the benefits and drawbacks of data-centric over algorithmic-centric solutions to software engineering problems.v Samenvatting In de hedendaagse softwareontwikkeling is het gebruikelijk om features van externe bibliotheken te hergebruiken.Features hergebruiken, in plaats van ze helemaal opnieuw te implementeren, kan de ontwikkeltijd verkorten en de algemene systeemkwaliteit verbeteren.Het selecteren van een geschikte bibliotheek om features uit te hergebruiken kan echter moeilijk zijn voor ontwikkelaars vanwege het gebrek aan geautomatiseerde toolondersteuning.Sommige bibliotheekindices stellen ranglijsten van bibliotheken voor, maar deze zijn bevooroordeeld op het aantal bibliotheekdownloads, toegekende sterren, enz.Dit kan ertoe leiden dat ontwikkelaars de populairste bibliotheek selecteren in plaats van de bibliotheek met de feature die ze hoopten te hergebruiken.Deze thesis levert drie bijdragen.De eerste, genaamd LiFUSO, is een geautomatiseerde benadering voor het opsommen en beschrijven van de features die door een bibliotheek worden geboden, op basis van openbaar beschikbare informatie op sociale coderingsplatformen zoals Stack Overflow (SO) en GitHub.LiFUSO analyseert bibliotheekgebruik binnen SO-berichten en extraheert gebruikspatronen die indicatief zijn voor bibliotheekfeatures.Daartoe wordt zowel rekening gehouden met de codefragmenten als met de omringende natuurlijke taal binnen elk SO-bericht waarin de bibliotheek wordt besproken.RESICO, de tweede bijdrage van de thesis, is een geautomatiseerde aanpak voor het omzetten van API-typereferenties binnen een codefragment naar hun overeenkomstige, volledig gekwalificeerde naam.Als een op leren gebaseerde benadering van tekstclassificatie moet RESICO worden getraind op een corpus van programma's waarvoor een compiler de juiste type-informatie heeft bepaald.Eenmaal getraind kan het syntactisch onjuiste codefragmenten als invoer gebruiken.De laatste bijdrage combineert LiFUSO en RESICO zodat de eerste niet langer beperkt is tot SO-berichten die zijn getagd met de naam van een bibliotheek, maar ook informatie kan extraheren uit berichten waarin veel bibliotheektypen zijn herkend.We evalueren de impact van het verbreden van de reikwijdte van de analyse op de kwantiteit en kwaliteit van de ontdekte bibliotheekfeatures.De bijdragen zijn relevant voor de software-engineeringgemeenschap als geheel.De typeresolutie van RESICO kan worden overgenomen door tools die potentieel onvolledige codefragmenten moeten analyseren, of door tools die moeten bepalen welke bibliotheken binnen een codefragment worden gebruikt -net als in onze derde bijdrage.LiFUSO maakt de weg vrij voor toolondersteuning bij het selecteren van een bibliotheek uit vele alternatieven.Ten slotte helpen deze bijdragen bij het begrijpen van de voor-en nadelen van datagerichte dan wel algoritmische oplossingen voor software-engineeringproblemen.viii for always being critical, asking me very difficult questions during our countless meetings and being there despite your busy agenda and life.Ahmed, I would also like to appreciate your hard-working compromise and all the nice conversations we had about research, life, sports, etc.Some words of appreciation also go to Maarten who volunteered to read the dissertation, gave me valuable feedback on the last two chapters, and has helped tremendously in organising the reception and dinner.Many friends made it possible for me to be in Belgium and to start my life here in the best possible way.I would like to thank Roberto Becerra, for always being a friend since my student times in Cuba and for always teaching me a new thing when we met.Humberto, for starting my contact with Coen, helping me during all these years and making my life easier when I started.I want to also thank Scull for helping me with the paperwork for my Ph.D. application, during my first two years at Olguita's house and guiding me in Belgium.No quisiera dejar de mencionar a Olguita, Cirelda y Patrick que me acogieron como uno más de su familia cuando llegué.Son muchos los buenos momentos que compartimos y quisiera agradecerles su gentileza, valiosos consejos y compañía que impidieron que me sintiera lejos de casa.I have gained really good friends in Belgium, and others stayed close despite being far in the distance.My good friends Elio, Alejandro (Paki) and Héctor; even though we are no longer together in Cuba, have continued our friendship, which is a daunting task in the distance.I met Jorge and later Jose here, and they became my friends.We have shared many good moments, which I truly hope to continue to be the case.Michael, thank you for all your help during these years, your delicious food and above all, your good company.Tatiana and Patrick, also took me in as family since we first met in Leuven, to them is my gratitude for all the nice moments together.My previous mentors and professors also made it possible for me to be here today.I want to thank Fofi for introducing me to the research life and giving me the first opportunities as a researcher.To all my previous professors at Universidad de Holguín in Cuba, my deepest appreciation for their teachings during my career.I didn't want to finish my acknowledgements without mentioning all my colleagues at the CAMP group and SOFT.I'm lucky to be part of the researchers at SOFT where many brilliant people gather.More importantly, during my years there I have also witnessed the goodness of the people willing to help at any moment about anything.
Author: Camilo Velázquez-Rodríguez
Language: English
Subfield: Information Systems
Field: Computer Science
Domain: Physical Sciences
Open Access status: green
OpenAlex ID: W7038029461
