计算机科学
源代码
文字嵌入
程序设计语言
编码(集合论)
语义学(计算机科学)
钥匙(锁)
应用程序编程接口
词(群论)
过程(计算)
情报检索
嵌入
人工智能
操作系统
集合(抽象数据类型)
哲学
语言学
作者
Yangyang Lu,Ge Li,Zelong Zhao,Linfeng Wen,Zhi Jin
标识
DOI:10.1007/978-3-319-63558-3_20
摘要
To satisfy business requirements of various platforms and devices, developers often need to migrate software code from one platform to another. During this process, a key task is to figure out API mappings between API libraries of the source and target platforms. Since doing it manually is time-consuming and error-prone, several code-based approaches have been proposed. However, they often have the issues of availability on parallel code bases and time expense caused by static or dynamic code analysis. In this paper, we present a document-based approach to infer API mappings. We first learn to understand the semantics of API names and descriptions in API documents by a word embedding model. Then we combine the word embeddings with a text similarity algorithm to compute semantic similarities between APIs of the source and target API libraries. Finally, we infer API mappings from the ranking results of API similarities. Our approach is evaluated on API documents of JavaSE and .NET. The results outperform the baseline model at precision@k by 41.51% averagely. Compared with code-based work, our approach avoids their issues and leverages easily acquired API documents to infer API mappings effectively.
科研通智能强力驱动
Strongly Powered by AbleSci AI