arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2205.01254cs.SE
收藏

深度API学习再探

Deep API Learning Revisited

James Martin, Jin L. C. Guo

摘要:

了解正确的API使用顺序是程序员在使用不熟悉的库时最重要的任务之一。然而,由于API文档质量差或基于查询的搜索策略无效,程序员经常遇到查找适当信息的障碍。为了帮助解决这个问题,研究人员已经提出了各种方法来建议API的序列,给出表示程序员信息需求的自然语言查询。在这些努力中,Gu等人采用了一种深度学习方法,特别是RNN编码器-解码器架构来执行此任务,并在Java中的常见API上获得了有希望的结果。在这项工作中,我们的目标是重现他们的结果,并将相同的方法应用于Python中的API。此外,我们将性能与最近的基于transformer的方法进行了比较,即,CodeBERT,用于相同的任务。我们的实验揭示了一个明显的下降时,仔细的数据清洗进行性能指标。由于采用了大量源代码文件的预训练和有效的编码技术,CodeBERT的性能优于Gu等人的方法,在很大程度上。

英文摘要:

Understanding the correct API usage sequences is one of the most important tasks for programmers when they work with unfamiliar libraries. However, programmers often encounter obstacles to finding the appropriate information due to either poor quality of API documentation or ineffective query-based searching strategy. To help solve this issue, researchers have proposed various methods to suggest the sequence of APIs given natural language queries representing the information needs from programmers. Among such efforts, Gu et al. adopted a deep learning method, in particular an RNN Encoder-Decoder architecture, to perform this task and obtained promising results on common APIs in Java. In this work, we aim to reproduce their results and apply the same methods for APIs in Python. Additionally, we compare the performance with a more recent Transformer-based method, i.e., CodeBERT, for the same task. Our experiment reveals a clear drop in performance measures when careful data cleaning is performed. Owing to the pretraining from a large number of source code files and effective encoding technique, CodeBERT outperforms the method by Gu et al., to a large extent.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑