Exploring API Embedding for API Usages and Applications

计算机科学 文字2vec Java 程序设计语言 编码(集合论) 嵌入 文字嵌入 班级(哲学) 应用程序编程接口 人工智能 集合(抽象数据类型)
作者
Trong Duc Nguyen,Anh Tuan Nguyen,Hung Phan,Tien N. Nguyen
标识
DOI:10.1109/icse.2017.47
摘要

Word2Vec is a class of neural network models that as being trainedfrom a large corpus of texts, they can produce for each unique word acorresponding vector in a continuous space in which linguisticcontexts of words can be observed. In this work, we study thecharacteristics of Word2Vec vectors, called API2VEC or API embeddings, for the API elements within the API sequences in source code. Ourempirical study shows that the close proximity of the API2VEC vectorsfor API elements reflects the similar usage contexts containing thesurrounding APIs of those API elements. Moreover, API2VEC can captureseveral similar semantic relations between API elements in API usagesvia vector offsets. We demonstrate the usefulness of API2VEC vectorsfor API elements in three applications. First, we build a tool thatmines the pairs of API elements that share the same usage relationsamong them. The other applications are in the code migrationdomain. We develop API2API, a tool to automatically learn the APImappings between Java and C# using a characteristic of the API2VECvectors for API elements in the two languages: semantic relationsamong API elements in their usages are observed in the two vectorspaces for the two languages as similar geometric arrangements amongtheir API2VEC vectors. Our empirical evaluation shows that API2APIrelatively improves 22.6% and 40.1% top-1 and top-5 accuracy over astate-of-the-art mining approach for API mappings. Finally, as anotherapplication in code migration, we are able to migrate equivalent APIusages from Java to C# with up to 90.6% recall and 87.2% precision.
最长约 10秒,即可获得该文献文件

科研通智能强力驱动
Strongly Powered by AbleSci AI
更新
大幅提高文件上传限制,最高150M (2024-4-1)

科研通是完全免费的文献互助平台,具备全网最快的应助速度,最高的求助完成率。 对每一个文献求助,科研通都将尽心尽力,给求助人一个满意的交代。
实时播报
1秒前
陈晶完成签到 ,获得积分10
1秒前
留下记忆完成签到 ,获得积分10
2秒前
2秒前
5秒前
5秒前
杰行天下完成签到,获得积分10
6秒前
8秒前
9秒前
王提发布了新的文献求助10
13秒前
14秒前
风中的谷云完成签到,获得积分10
15秒前
15秒前
15秒前
完美世界应助科研通管家采纳,获得10
15秒前
852应助科研通管家采纳,获得10
15秒前
烟花应助科研通管家采纳,获得10
15秒前
我是老大应助科研通管家采纳,获得30
15秒前
金22应助科研通管家采纳,获得10
15秒前
ding应助科研通管家采纳,获得10
15秒前
ding应助科研通管家采纳,获得10
15秒前
15秒前
研友_VZG7GZ应助科研通管家采纳,获得10
15秒前
15秒前
17秒前
海与完成签到,获得积分10
17秒前
NI完成签到,获得积分10
18秒前
18秒前
18秒前
qianqiansun关注了科研通微信公众号
19秒前
以韓完成签到 ,获得积分10
19秒前
lightstop完成签到,获得积分10
20秒前
魔幻蓉发布了新的文献求助10
21秒前
vanshaw.vs发布了新的文献求助20
21秒前
21秒前
21秒前
Cat完成签到,获得积分0
21秒前
22秒前
乐观的凌兰完成签到 ,获得积分10
22秒前
22秒前
高分求助中
Becoming: An Introduction to Jung's Concept of Individuation 600
Ore genesis in the Zambian Copperbelt with particular reference to the northern sector of the Chambishi basin 500
A new species of Coccus (Homoptera: Coccoidea) from Malawi 500
A new species of Velataspis (Hemiptera Coccoidea Diaspididae) from tea in Assam 500
PraxisRatgeber: Mantiden: Faszinierende Lauerjäger 500
Die Gottesanbeterin: Mantis religiosa: 656 400
Mantiden: Faszinierende Lauerjäger Faszinierende Lauerjäger 400
热门求助领域 (近24小时)
化学 医学 生物 材料科学 工程类 有机化学 生物化学 物理 内科学 纳米技术 计算机科学 化学工程 复合材料 基因 遗传学 催化作用 物理化学 免疫学 量子力学 细胞生物学
热门帖子
关注 科研通微信公众号,转发送积分 3165214
求助须知:如何正确求助?哪些是违规求助? 2816237
关于积分的说明 7911970
捐赠科研通 2475937
什么是DOI,文献DOI怎么找? 1318452
科研通“疑难数据库(出版商)”最低求助积分说明 632155
版权声明 602388