Write a Blog >>
ICSE 2021
Mon 17 May - Sat 5 June 2021

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.

Wed 26 May

Displayed time zone: Amsterdam, Berlin, Bern, Rome, Stockholm, Vienna change

16:05 - 17:05
2.4.2. API: Evolution and Maintenance #1Journal-First Papers / Technical Track at Blended Sessions Room 2 +12h
Chair(s): Davide Falessi California Polytechnic State University
16:05
20m
Paper
Semantic Patches for Adaptation of JavaScript Programs to Evolving LibrariesArtifact ReusableTechnical Track
Technical Track
Benjamin Barslev Nielsen Aarhus University, Martin Toldam Torp Aarhus University, Anders Møller Aarhus University
Pre-print Media Attached
16:25
20m
Paper
An Empirical Study of Dependency Downgrades in the npm EcosystemJournal-First
Journal-First Papers
Filipe Cogo Centre for Software Excellence, Huawei, Canada, Gustavo A. Oliva Queen's University, Ahmed E. Hassan School of Computing, Queen's University
Link to publication DOI Pre-print Media Attached
16:45
20m
Paper
A3: Assisting Android API Migrations Using Code ExamplesJournal-First
Journal-First Papers
Maxime Lamothe Concordia University, Weiyi Shang Concordia University, Tse-Hsun (Peter) Chen Concordia University
DOI Pre-print Media Attached

Thu 27 May

Displayed time zone: Amsterdam, Berlin, Bern, Rome, Stockholm, Vienna change

04:05 - 05:05
2.4.2. API: Evolution and Maintenance #1Technical Track / Journal-First Papers at Blended Sessions Room 2
04:05
20m
Paper
Semantic Patches for Adaptation of JavaScript Programs to Evolving LibrariesArtifact ReusableTechnical Track
Technical Track
Benjamin Barslev Nielsen Aarhus University, Martin Toldam Torp Aarhus University, Anders Møller Aarhus University
Pre-print Media Attached
04:25
20m
Paper
An Empirical Study of Dependency Downgrades in the npm EcosystemJournal-First
Journal-First Papers
Filipe Cogo Centre for Software Excellence, Huawei, Canada, Gustavo A. Oliva Queen's University, Ahmed E. Hassan School of Computing, Queen's University
Link to publication DOI Pre-print Media Attached
04:45
20m
Paper
A3: Assisting Android API Migrations Using Code ExamplesJournal-First
Journal-First Papers
Maxime Lamothe Concordia University, Weiyi Shang Concordia University, Tse-Hsun (Peter) Chen Concordia University
DOI Pre-print Media Attached