COSTER: A Tool for Finding Fully Qualified Names of API Elements in Online Code Snippets

C. Saifullah, M. Asaduzzaman, C. Roy
{"title":"COSTER: A Tool for Finding Fully Qualified Names of API Elements in Online Code Snippets","authors":"C. Saifullah, M. Asaduzzaman, C. Roy","doi":"10.1109/ICSE-Companion52605.2021.00039","DOIUrl":null,"url":null,"abstract":"Code snippets available on question answering sites (e.g., Stack Overflow) are a great source of information for learning how to use APIs. However, it is difficult to determine which APIs are discussed in those code snippets because they often suffer from declaration ambiguities and missing external references. In this paper, we introduce COSTER, a context-sensitive type solver that can determine the fully qualified names (FQNs) of API elements in those code snippets. The tool uses three different similarity measures to rank potential FQNs of a query API element. Results from our quantitative evaluation and user study demonstrate that the proposed tool can not only recommend FQNs of API elements with great accuracy but can also help developers to reuse online code snippets by suggesting the required import statements.","PeriodicalId":136929,"journal":{"name":"2021 IEEE/ACM 43rd International Conference on Software Engineering: Companion Proceedings (ICSE-Companion)","volume":null,"pages":null},"PeriodicalIF":0.0000,"publicationDate":"2021-05-01","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"1","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"2021 IEEE/ACM 43rd International Conference on Software Engineering: Companion Proceedings (ICSE-Companion)","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1109/ICSE-Companion52605.2021.00039","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 1

Abstract

Code snippets available on question answering sites (e.g., Stack Overflow) are a great source of information for learning how to use APIs. However, it is difficult to determine which APIs are discussed in those code snippets because they often suffer from declaration ambiguities and missing external references. In this paper, we introduce COSTER, a context-sensitive type solver that can determine the fully qualified names (FQNs) of API elements in those code snippets. The tool uses three different similarity measures to rank potential FQNs of a query API element. Results from our quantitative evaluation and user study demonstrate that the proposed tool can not only recommend FQNs of API elements with great accuracy but can also help developers to reuse online code snippets by suggesting the required import statements.
查看原文
分享 分享
微信好友 朋友圈 QQ好友 复制链接
本刊更多论文
COSTER:在在线代码片段中查找API元素的完全限定名称的工具
在问答网站(例如Stack Overflow)上提供的代码片段是学习如何使用api的重要信息来源。然而,很难确定在这些代码片段中讨论了哪些api,因为它们经常存在声明含糊和缺少外部引用的问题。在本文中,我们介绍了COSTER,一个上下文敏感的类型求解器,它可以确定这些代码片段中API元素的完全限定名称(fqn)。该工具使用三种不同的相似性度量对查询API元素的潜在fqn进行排序。我们的定量评估和用户研究结果表明,所提出的工具不仅可以非常准确地推荐API元素的fqn,而且还可以通过建议所需的导入语句帮助开发人员重用在线代码片段。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
求助全文
约1分钟内获得全文 去求助
来源期刊
自引率
0.00%
发文量
0
期刊最新文献
Artifact Evaluation Program Committee Doctoral Symposium Program Committee Posters Program Committee CodeShovel: A Reusable and Available Tool for Extracting Source Code Histories Replication Package for Article: Data-Oriented Differential Testing of Object-Relational Mapping Systems
×
引用
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