Aarhus Universitets segl

Semantic Patches for Adaptation of JavaScript Programs to Evolving Libraries

Publikation: Bidrag til bog/antologi/rapport/proceedingKonferencebidrag i proceedingsForskningpeer review

Dokumenter

  • paper

    Accepteret manuskript, 490 KB, PDF-dokument

DOI

JavaScript libraries are often updated and sometimes breaking changes are introduced in the process, resulting in the client developers having to adapt their code to the changes. In addition to locating the affected parts of their code, the client developers must apply suitable patches, which is a tedious, error-prone, and entirely manual process.

To reduce the manual effort, we present JSFIX. Given a collection of semantic patches, which are formalized descriptions of the breaking changes, the tool detects the locations affected by breaking changes and then transforms those parts of the code to become compatible with the new library version. JSFIX relies on an existing static analysis to approximate the set of affected locations, and an interactive process where the user answers questions about the client code to filter away false positives.

An evaluation involving 12 popular JavaScript libraries and 203 clients shows that our notion of semantic patches can accurately express most of the breaking changes that occur in practice, and that JSFIX can successfully adapt most of the clients to the changes. In particular, 31 clients have accepted pull requests made by JSFIX, indicating that the code quality is good enough for practical usage. It takes JSFIX only a few seconds to patch, on average, 3.8 source locations affected by breaking changes in each client, with only 2.7 questions to the user, which suggests that the approach can significantly reduce the manual effort required when adapting JavaScript programs to evolving libraries.

OriginalsprogEngelsk
Titel2021 IEEE/ACM 43rd International Conference on Software Engineering (ICSE)
Antal sider12
ForlagIEEE
Udgivelsesår2021
Sider74-85
ISBN (trykt)9781665402965
DOI
StatusUdgivet - 2021
Begivenhed43rd International Conference on Software Engineering (ICSE) - Madrid, Spanien
Varighed: 22 maj 202130 maj 2021

Konference

Konference43rd International Conference on Software Engineering (ICSE)
LandSpanien
ByMadrid
Periode22/05/202130/05/2021

Se relationer på Aarhus Universitet Citationsformater

Download-statistik

Ingen data tilgængelig

ID: 223741815