期刊文献+

基于情境感知的API个性化推荐 被引量:1

Context-aware Based API Personalized Recommendation
下载PDF
导出
摘要 在软件开发的过程中,开发人员在遇到编程困境时通常会检索合适的API来完成编程任务。情境信息和开发者画像在有效的API推荐中起着至关重要的作用,却在很大程度上被忽视了。因而文中提出了一种基于情境感知的API个性化推荐方法。该方法利用程序静态分析技术,对代码文件做抽象语法树解析,提取信息构建代码库,并对开发者API使用偏好建模。然后计算开发者当前查询语句与历史代码库中查询的语义相似度,检索出top-k个相似历史查询。最终利用查询语句信息、方法名信息、情境信息以及开发者API使用偏好信息对API进行重排序并推荐给开发者。通过模拟编程任务开发的不同阶段,使用MRR,MAP,Hit, NDCG评估指标来验证所提方法的有效性。实验结果表明,所提方法的API推荐效果优于基准方法,能够为开发者推荐更想要的API。 In the process of software development, developers often search for appropriate APIs to complete programming tasks when encountering programming difficulties.Contextual information and developer portraits play a critical role in effective API recommendation, but they are largely overlooked.This paper proposes a novel context-aware based API personalized recommendation approach.This approach leverages program static analysis technology(abstract syntax tree) to parse the code file to extract information to construct the code base and model developer API usage preferences.Then it calculates the semantic simila-rity between the developer’s current query and the queries in the historical code base, and retrieves top-k similar historical queries.Finally, it leverages the information of query, method name, context and developer API usage preference to re-rank the candidate APIs and recommend to developers.MRR,MAP,Hit and NDCG are used to verify the effectiveness of the method in dif-ferent stages of simulation programming.The experimental results show that the proposed approach outperforms the baseline me-thod and it is more likely to recommend the APIs that developers want.
作者 陈晨 周宇 王永超 黄志球 CHEN Chen;ZHOU Yu;WANG Yong-chao;HUANG Zhi-qiu(School of Computer Science and Engineering,Nanjing University of Aeronautics and Astronautics,Nanjing 211100,China;Key Laboratory of Safety-Critical Software,Ministry of Industry and Information Technology,Nanjing University of Aeronautics and Astronautics,Nanjing 211100,China)
出处 《计算机科学》 CSCD 北大核心 2021年第12期100-106,共7页 Computer Science
基金 国家重点研发计划项目(2018YFB1003900) 国家自然科学基金(61972197) 江苏省自然科学基金(BK20201292) 江苏高校“青蓝工程” 南京航空航天大学研究生创新基地(实验室)开放基金(kfjj20191606)。
关键词 API推荐 程序静态分析 情境感知 开发者画像 API recommendation Program static analysis Context awareness Developer portraits
  • 相关文献

同被引文献18

引证文献1

二级引证文献2

相关作者

内容加载中请稍等...

相关机构

内容加载中请稍等...

相关主题

内容加载中请稍等...

浏览历史

内容加载中请稍等...
;
使用帮助 返回顶部