HiRec: API Recommendation using Hierarchical Context

Rensong Xie, Xianglong Kong, Lulu Wang, Ying Zhou, Bixin Li
{"title":"HiRec: API Recommendation using Hierarchical Context","authors":"Rensong Xie, Xianglong Kong, Lulu Wang, Ying Zhou, Bixin Li","doi":"10.1109/ISSRE.2019.00044","DOIUrl":null,"url":null,"abstract":"Context-aware API recommendation techniques aim to generate a ranked list of candidate APIs on an editing position during development. The basic context used in traditional API recommendation mainly focuses on the APIs from third-party libraries, limit or even ignore the usage of project-specific code. The limited usage of project-specific code may result in the lack of context information, and degrade the effectiveness of API recommendation. To address this problem, we introduce a novel type of context, i.e., hierarchical context, which can leverage the hidden information of project-specific code by analyzing the call graph. In hierarchical context, a project-specific API is presented as a sequence of low-leveled APIs from third-party libraries. We propose an approach, i.e., HiRec, which builds on the basis of hierarchical context. HiRec is evaluated on 108 projects and the results show that HiRec can obtain much more accurate results than all the other selected approaches in terms of top-5 and top-10 accuracy due to the strong ability of context representation. And HiRec performs closely to the outstanding tools in terms of top-1 accuracy. The average time of recommending execution is less than 1 seconds in most cases, which is acceptable for interaction in an IDE. Unlike current approaches, the effectiveness of HiRec is not impacted much by editing positions. And we can obtain more accurate results from HiRec with larger sizes of training data and hierarchical context.","PeriodicalId":254749,"journal":{"name":"2019 IEEE 30th International Symposium on Software Reliability Engineering (ISSRE)","volume":"32 1 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"2019-10-01","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"15","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"2019 IEEE 30th International Symposium on Software Reliability Engineering (ISSRE)","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1109/ISSRE.2019.00044","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 15

Abstract

Context-aware API recommendation techniques aim to generate a ranked list of candidate APIs on an editing position during development. The basic context used in traditional API recommendation mainly focuses on the APIs from third-party libraries, limit or even ignore the usage of project-specific code. The limited usage of project-specific code may result in the lack of context information, and degrade the effectiveness of API recommendation. To address this problem, we introduce a novel type of context, i.e., hierarchical context, which can leverage the hidden information of project-specific code by analyzing the call graph. In hierarchical context, a project-specific API is presented as a sequence of low-leveled APIs from third-party libraries. We propose an approach, i.e., HiRec, which builds on the basis of hierarchical context. HiRec is evaluated on 108 projects and the results show that HiRec can obtain much more accurate results than all the other selected approaches in terms of top-5 and top-10 accuracy due to the strong ability of context representation. And HiRec performs closely to the outstanding tools in terms of top-1 accuracy. The average time of recommending execution is less than 1 seconds in most cases, which is acceptable for interaction in an IDE. Unlike current approaches, the effectiveness of HiRec is not impacted much by editing positions. And we can obtain more accurate results from HiRec with larger sizes of training data and hierarchical context.
查看原文
分享 分享
微信好友 朋友圈 QQ好友 复制链接
本刊更多论文
HiRec:使用分层上下文的API推荐
上下文感知API推荐技术的目标是在开发过程中生成候选API的排序列表。传统API推荐中使用的基本上下文主要关注第三方库的API,限制甚至忽略了特定于项目的代码的使用。有限地使用特定于项目的代码可能会导致缺乏上下文信息,并降低API推荐的有效性。为了解决这个问题,我们引入了一种新的上下文类型,即层次上下文,它可以通过分析调用图来利用项目特定代码的隐藏信息。在分层上下文中,特定于项目的API表示为来自第三方库的一系列低级API。我们提出了一种方法,即HiRec,它建立在分层上下文的基础上。在108个项目中对HiRec进行了评估,结果表明,由于具有较强的上下文表示能力,HiRec在前5名和前10名的准确率方面比其他所有选择的方法都要准确得多。在准确性方面,HiRec的表现与其他优秀工具非常接近。在大多数情况下,建议执行的平均时间少于1秒,这对于IDE中的交互是可以接受的。与目前的方法不同,HiRec的有效性不受编辑职位的影响。并且我们可以在更大的训练数据和层次上下文中获得更准确的结果。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
求助全文
约1分钟内获得全文 去求助
来源期刊
自引率
0.00%
发文量
0
期刊最新文献
Inferring Performance Bug Patterns from Developer Commits Learning Marked Markov Modulated Poisson Processes for Online Predictive Analysis of Attack Scenarios An Empirical Study of Common Challenges in Developing Deep Learning Applications Evaluation of Anomaly Detection Algorithms Made Easy with RELOAD ISSRE 2019 External Reviewers
×
引用
GB/T 7714-2015
复制
MLA
复制
APA
复制
导出至
BibTeX EndNote RefMan NoteFirst NoteExpress
×
×
提示
您的信息不完整,为了账户安全,请先补充。
现在去补充
×
提示
您因"违规操作"
具体请查看互助需知
我知道了
×
提示
现在去查看 取消
×
提示
确定
0
微信
客服QQ
Book学术公众号 扫码关注我们
反馈
×
意见反馈
请填写您的意见或建议
请填写您的手机或邮箱
已复制链接
已复制链接
快去分享给好友吧!
我知道了
×
扫码分享
扫码分享
Book学术官方微信
Book学术文献互助
Book学术文献互助群
群 号:481959085
Book学术
文献互助 智能选刊 最新文献 互助须知 联系我们:info@booksci.cn
Book学术提供免费学术资源搜索服务,方便国内外学者检索中英文文献。致力于提供最便捷和优质的服务体验。
Copyright © 2023 Book学术 All rights reserved.
ghs 京公网安备 11010802042870号 京ICP备2023020795号-1