计算机科学
代码段
源代码
编码(集合论)
编码(社会科学)
编码
Android(操作系统)
软件
情报检索
程序设计语言
人工智能
软件工程
操作系统
集合(抽象数据类型)
化学
统计
基因
生物化学
数学
作者
Zhihao Li,Chuanyi Li,Ze Tang,Wanhong Huang,Jidong Ge,Bin Luo,Vincent Ng,Ting Wang,Yucheng Hu,Xiaopeng Zhang
摘要
Recommending APIs is a practical and essential feature of IDEs. Improving the accuracy of API recommendations is an effective way to improve coding efficiency. With the success of deep learning in software engineering, the state-of-the-art (SOTA) performance of API recommendation is also achieved by deep learning-based approaches. However, existing SOTAs either only consider the API sequences in the code snippets, or rely on complex operations for extracting hand-crafted features, all of which have potential risks in under-encoding the input code snippets and further resulting in sub-optimal recommendation performance. To this end, this paper proposes to utilize the code understanding ability of existing general code P re- T raining M odels to fully encode the input code snippet to improve the accuracy of API Rec ommendation, namely, PTM-APIRec . To ensure that the code semantics of the input are fully understood and the API recommended actually exists, we use separate vocabularies for the input code snippet and the APIs to be predicted. The experimental results on the JDK and Android datasets show that PTM-APIRec surpasses existing approaches. Besides, an effective way to improve the performance of PTM-APIRec is to enhance the pre-trained model with more pre-training data (which is easier to obtain than API recommendation datasets).
科研通智能强力驱动
Strongly Powered by AbleSci AI