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

API使用模式的综合集成

Comprehensive Integration of API Usage Patterns

Qi Shen, Shijun Wu, Yanzhen Zou, Bing Xie

摘要:

如今,开发人员经常重用现有的API来实现他们的编程任务。大量的API使用模式被挖掘出来,帮助开发人员学习API使用规则。然而,当开发人员将模式集成到他们的编程上下文中时,仍然有许多缺少的变量需要合成。为了解决这个问题,本文提出了一种综合的方法来集成API使用模式。我们首先通过分析API使用模式如何集成到现实世界的项目中来进行实证研究。我们发现变量综合的表达式通常是非平凡的,可以分为5种语法类型。在此基础上,提出了一种帮助开发者交互式完成API使用模式的方法.与现有的代码自动完成技术相比,我们的方法可以根据用户的意图推荐不频繁的表达式,并附有其真实世界的使用示例。评估表明,我们的方法可以帮助用户更有效地集成API,并完成编程任务比现有的作品更快。

英文摘要:

Nowadays, developers often reuse existing APIs to implement their programming tasks. A lot of API usage patterns are mined to help developers learn API usage rules. However, there are still many missing variables to be synthesized when developers integrate the patterns into their programming context. To deal with this issue, we propose a comprehensive approach to integrate API usage patterns in this paper. We first perform an empirical study by analyzing how API usage patterns are integrated in real-world projects. We find the expressions for variable synthesis is often non-trivial and can be divided into 5 syntax types. Based on the observation, we promote an approach to help developers interactively complete API usage patterns. Compared to the existing code completion techniques, our approach can recommend infrequent expressions accompanied with their real-world usage examples according to the user intent. The evaluation shows that our approach could assist users to integrate APIs more efficiently and complete the programming tasks faster than existing works.

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

↑