Modern software development relies on the reuse of code via Application Programming Interfaces (APIs). Such reuse relieves developers from learning and developing established algorithms and data structures anew, enabling them to focus on their problem at hand. However, there is also the risk of misusing an API due to a lack of understanding or proper documentation. While many techniques target API misuse detection, only limited efforts have been put into automatically repairing API misuses. In this paper, we present our advances on our technique API-Specific Automated Program Repair (ASAP-Repair). ASAP-Repair is intended to fix API misuses based on API Usage Graphs (AUGs) by leveraging API usage templates of state-of-the-art API misuse detectors. We demonstrate that ASAP-Repair is in principle applicable on an established API misuse dataset. Moreover, we discuss next steps and challenges to evolve ASAP-Repair towards a full-fledged Automatic Program Repair (APR) technique.
翻译:现代软件开发依赖于通过应用程序编程接口(API)进行代码复用。这种复用使开发者无需重新学习或开发成熟的算法与数据结构,从而能够专注于手头的问题。然而,由于对API理解不足或文档缺失,也存在误用API的风险。尽管已有多种技术针对API误用检测,但在自动修复API误用方面的研究相对有限。本文提出了一种基于API使用图(AUG)的API特定自动程序修复技术(ASAP-Repair)的进展。ASAP-Repair通过借鉴现有API误用检测技术中的API使用模板,旨在利用API使用图修复API误用。我们证明了ASAP-Repair原则上可应用于已建立的API误用数据集。此外,本文讨论了将ASAP-Repair发展为成熟的自动程序修复(APR)技术的后续步骤与挑战。