arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2406.17431cs.SE
收藏

Android应用兼容性问题背后语义不兼容API的大规模调查

A Large-scale Investigation of Semantically Incompatible APIs behind Compatibility Issues in Android Apps

Shidong Pan, Tianchen Guo, Lihong Zhang, Pei Liu, Zhenchang Xing, Xiaoyu Sun

AI总结:

针对Android API语义更改引发的兼容性问题,提出结合静态分析和预训练大语言模型的统一检测框架,发现5481个不兼容API,F1分数达0.83,有效补充现有方法检测范围提升92.3%。

摘要:

应用程序编程接口(API)不兼容是Android应用开发中长期存在的问题。Android API的快速演进导致相邻版本之间存在大量API的添加、移除和更改。不幸的是,这种高频更改可能导致兼容性问题,且通常未向开发者提供关于这些更改的充分通知。尽管研究人员已提出一些检测API签名更改引起兼容性问题的工作,但往往忽略了源于复杂语义更改的兼容性问题。为应对这一挑战,我们利用静态分析和预训练大语言模型(LLMs),在相邻版本间对Android开源项目(AOSP)中的不兼容API进行了大规模发现。我们系统地定义了该问题,并提出一个统一框架来检测不兼容API,特别是针对语义更改。值得强调的是,我们的方法在识别Android框架中语义不兼容API方面达到0.83的F1分数。最终,我们的方法检测出从版本4到版本33的5,481个不兼容API。我们进一步证明了其在补充最先进方法检测更广泛兼容性问题(+92.3%)方面的有效性,这些问题此前被忽略。

英文摘要:

Application Programming Interface (API) incompatibility is a long-standing issue in Android application development. The rapid evolution of Android APIs results in a significant number of API additions, removals, and changes between adjacent versions. Unfortunately, this high frequency of alterations may lead to compatibility issues, often without adequate notification to developers regarding these changes. Although researchers have proposed some work on detecting compatibility issues caused by changes in API signatures, they often overlook compatibility issues stemming from sophisticated semantic changes. In response to this challenge, we conducted a large-scale discovery of incompatible APIs in the Android Open Source Project (AOSP) by leveraging static analysis and pre-trained Large Language Models (LLMs) across adjacent versions. We systematically formulate the problem and propose a unified framework to detect incompatible APIs, especially for semantic changes. It's worth highlighting that our approach achieves a 0.83 F1-score in identifying semantically incompatible APIs in the Android framework. Ultimately, our approach detects 5,481 incompatible APIs spanning from version 4 to version 33. We further demonstrate its effectiveness in supplementing the state-of-the-art methods in detecting a broader spectrum of compatibility issues (+92.3%) that have been previously overlooked.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑