API Misuse Correction: A Fuzzy Logic Approach

ACM-SE(2020)

引用 2|浏览33
暂无评分
摘要
ABSTRACTModern software development relies heavily on Application Programming Interface (API) libraries. However, there are often certain constraints on using API elements in such libraries. Failing to follow such constraints (API misuse) could lead to serious programming errors. Many approaches have been proposed to detect API misuses, but they still have low accuracy and cannot repair the detected misuses. In this paper, we propose FAMI, a novel approach to detect and repair API misuses automatically. FAMI uses fuzzy set theory to represent usage rules of five factors involving in any API method call: related method calls, exceptions, pre-conditions, post-conditions, and values of arguments. These fuzzy sets are trained from a large repository of high-quality production code. Then, given a piece of code, FAMI verifies each of its method calls with the trained fuzzy sets. If a factor violates a usage rule defined by a fuzzy set, the corresponding call is considered as an API misuse. FAMI performs an optimal search for editing operations to apply on the code until it has no API issue.
更多
查看译文
关键词
API Misuse, Fuzzy Logic, Bug Fixing
AI 理解论文
溯源树
样例
生成溯源树,研究论文发展脉络
Chat Paper
正在生成论文摘要