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

The fast-paced evolution of Android APIs has posed a challenging task for Android app developers. To leverage Androids frequently released APIs, developers must often spend considerable effort on API migrations. Prior research and Android official documentation typically provide enough information to guide developers in identifying the API calls that must be migrated and the corresponding API calls in an updated version of Android (what to migrate). However, API migration remains a challenging task because developers lack the knowledge of how to migrate the API calls. There exist code examples, such as Google Samples, that illustrate the usage of APIs. We posit that by analyzing the changes of API usage in code examples, we can learn API migration patterns to assist developers with API Migrations.

In our paper, we propose an approach that learns API migration patterns from code examples, applies these patterns to the source code of Android apps for API migration, and presents the results to users as potential migration solutions. To evaluate our approach, we migrate API calls in open-source Android apps by learning API migration patterns from code examples. We find that our approach can successfully learn API migration patterns and provide API migration assistance in 71 out of 80 cases. Our approach can either migrate API calls with little to no extra modifications needed or provide guidance to assist with the migrations. Through a user study, we find that adopting our approach can reduce the time spent on migrating APIs, on average, by 29%. Moreover, our interviews with app developers highlight the benefits of our approach when seeking API migrations. Our approach demonstrates the value of leveraging the knowledge contained in software repositories to facilitate API migrations.

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 R. 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 R. 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