Identification multi-level frequent usage patterns from APIs

Identification multi-level frequent usage patterns from APIs
复制标题

DOI:
10.1016/j.jss.2017.05.039
复制
发表时间:
2017-08
期刊:
J. Syst. Softw.
影响因子:
--
通讯作者:
H. E. Salman
H. E. Salman
中科院分区:
其他
文献类型:
--
作者:
H. E. Salman

文献摘要

被引文献

相似文献

软件开发人员越来越依赖框架的应用程序编程接口(API)来提高生产力。API方法通常与感兴趣的API的其他方法沿着在代码片段中使用。当开发人员在框架中调用API方法时,由于该API中包含大量方法,他们经常难以确定要调用哪些方法。开发人员通常利用源代码搜索工具搜索使用感兴趣的API方法的代码段。然而,返回的代码片段的数量非常大,这阻碍了开发人员找到有用的代码片段。此外,API方法之间的共同使用关系通常没有文档记录。本文提出了一种识别多级频繁使用模式的方法(IML-FUP),以帮助开发人员了解API的使用情况,并在使用新API时为开发任务提供便利。识别的模式表示一组API方法,这些方法在干扰使用场景中经常一起调用。为了研究所提出的方法的效率,使用四个API和89个客户端程序进行了实验评估。对于所有研究的API,实验结果表明,所提出的方法确定的使用模式,总是强内聚性和高度一致的。
Software developers increasingly rely on application programming interfaces (APIs) of frameworks to increase productivity. An API method is generally used within code snippets along with other methods of the API of interest. When developers invoke API methods in a framework, they often encounter difficulty to determine which methods to call due to the huge number of included methods in that API. Developers usually exploit a source code search tool searching for code snippets that use the API methods of interest. However, the number of returned code snippets is very large which hinders the developer to locate useful ones. Moreover, co-usage relationships between API methods are often not documented. This article presents an approach to identify multi-level frequent usage patterns (IML-FUP) to help developers understand API usage and facilitate the development tasks when they use new APIs. An identified pattern represents a set of API methods that are frequently called together across interfering usage scenarios. In order to investigate the efficiency of the proposed approach, an experimental evaluation is conducted using four APIs and 89 client programs. For all studied APIs, the experimental results show that the proposed approach identifies usage patterns that are always strongly cohesive and highly consistent.