Automated Update of Android Deprecated API Usages with Large Language Models

Fuente: arXiv
Saved in:
Bibliographic Details
Main Authors: Mahmud, Tarek, Duan, Bin, Che, Meiru, Yasmin, Awatif, Ngu, Anne H. H., Yang, Guowei
Format: Preprint
Published: 2024
Subjects:
Online Access:
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866929580657344512
author Mahmud, Tarek
Duan, Bin
Che, Meiru
Yasmin, Awatif
Ngu, Anne H. H.
Yang, Guowei
author_facet Mahmud, Tarek
Duan, Bin
Che, Meiru
Yasmin, Awatif
Ngu, Anne H. H.
Yang, Guowei
contents Android apps rely on application programming interfaces (APIs) to access various functionalities of Android devices. These APIs however are regularly updated to incorporate new features while the old APIs get deprecated. Even though the importance of updating deprecated API usages with the recommended replacement APIs has been widely recognized, it is non-trivial to update the deprecated API usages. Therefore, the usages of deprecated APIs linger in Android apps and cause compatibility issues in practice. This paper introduces GUPPY, an automated approach that utilizes large language models (LLMs) to update Android deprecated API usages. By employing carefully crafted prompts, GUPPY leverages GPT-4, one of the most powerful LLMs, to update deprecated-API usages, ensuring compatibility in both the old and new API levels. Additionally, GUPPY uses GPT-4 to generate tests, identify incorrect updates, and refine the API usage through an iterative process until the tests pass or a specified limit is reached. Our evaluation, conducted on 360 benchmark API usages from 20 deprecated APIs and an additional 156 deprecated API usages from the latest API levels 33 and 34, demonstrates GUPPY's advantages over the state-of-the-art techniques.
format Preprint
id arxiv_https___arxiv_org_abs_2411_04387
institution arXiv
publishDate 2024
record_format arxiv
spellingShingle Automated Update of Android Deprecated API Usages with Large Language Models
Mahmud, Tarek
Duan, Bin
Che, Meiru
Yasmin, Awatif
Ngu, Anne H. H.
Yang, Guowei
Software Engineering
Android apps rely on application programming interfaces (APIs) to access various functionalities of Android devices. These APIs however are regularly updated to incorporate new features while the old APIs get deprecated. Even though the importance of updating deprecated API usages with the recommended replacement APIs has been widely recognized, it is non-trivial to update the deprecated API usages. Therefore, the usages of deprecated APIs linger in Android apps and cause compatibility issues in practice. This paper introduces GUPPY, an automated approach that utilizes large language models (LLMs) to update Android deprecated API usages. By employing carefully crafted prompts, GUPPY leverages GPT-4, one of the most powerful LLMs, to update deprecated-API usages, ensuring compatibility in both the old and new API levels. Additionally, GUPPY uses GPT-4 to generate tests, identify incorrect updates, and refine the API usage through an iterative process until the tests pass or a specified limit is reached. Our evaluation, conducted on 360 benchmark API usages from 20 deprecated APIs and an additional 156 deprecated API usages from the latest API levels 33 and 34, demonstrates GUPPY's advantages over the state-of-the-art techniques.
title Automated Update of Android Deprecated API Usages with Large Language Models
topic Software Engineering
url https://arxiv.org/abs/2411.04387