arrow
返回

More Than Deep Learning: post-processing for API sequence recommendation

delete2021-10-29
delete4
delete
OA
AI
C
Chi Chen
X
Xin Peng *
B
Bihuan Chen
孙俊 封面图
孙俊 (Jun Sun)
Z
Zhenchang Xing
王新 (Xin Wang)
DOI:10.1007/s10664-021-10040-2delete
delete原文链接
delete原文求助
delete分享
delete收藏
摘要

摘要

En 中文
In the daily development process, developers often need assistance in finding a sequence of APIs to accomplish their development tasks. Existing deep learning models, which have recently been developed for recommending one single API, can be adapted by using encoder-decoder models together with beam search to generate API sequence recommendations. However, the generated API sequence recommendations heavily rely on the probabilities of API suggestions at each decoding step, which do not take into account other domain-specific factors (e.g., whether an API suggestion satisfies the program syntax and how diverse the API sequence recommendations are). Moreover, it is difficult for developers to find similar API sequence recommendations, distinguish different API sequence recommendations, and make a selection when the API sequence recommendations are ordered by probabilities. Thus, what we need is more than deep learning. In this paper, we propose an approach, named Cook, to combine deep learning models with post-processing strategies for API sequence recommendation. Specifically, we enhance beam search with code-specific heuristics to improve the quality of API sequence recommendations. We develop a clustering algorithm to cluster API sequence recommendations so as to make it easier for developers to find similar API sequence recommendations and distinguish different API sequence recommendations. We also propose a method to generate a summary for each cluster to help developers understand the API sequence recommendations. Our evaluation results have shown that (1) three deep learning models with our heuristic-enhanced beam search achieved better performance than with the original beam search in terms of CIDEr-1, CIDEr-5 and CIDEr-10 scores, with an average improvement of 1.8, 2.3 and 2.3, respectively; and (2) our clustering algorithm achieved high performance on six metrics and outperformed two variant clustering algorithms. Moreover, our user study with 24 participants shows that Cook can help developers accomplish programming tasks faster and pass more test cases, and the participants confirm that clusters and summaries indeed help them understand and select the correct API sequence recommendations.
Keyword:
API
Recommendation
Deep learning
Encoder-decoder
Post-processing

期刊

Empirical Software Engineering 封面图
Empirical Software Engineering
IF:
3.6
论文数:
2.0K
被引数:
5.3K

机构

F
fudan university
学者数:
11.8W
论文数: 7.7W
被引数: 121
A
Australian National University
学者数:
2.1W
论文数: 2.3W
被引数: 3.9W
S
Singapore Management University
学者数:
1.5K
论文数: 2.5K
被引数: 3.5K
学者 查看更多机构
引用论文

引用论文

err
IF0
err
err0
PREAI
err
err分享
err收藏
err
IF0
err
err0
PREAI
err
err分享
err收藏
SequenceR: Sequence-to-Sequence Learning for End-to-End Program RepairSequenceR: 用于端到端程序修复的序列到序列学习
err2021-01-01
err217
errOAAI
errChen, Zimin; Kommrusch, Steve; Tufano, Michele; Pouchet, Louis-Noel; Poshyvanyk, Denys; Monperrus, Martin
err分享
err收藏
学者 查看更多内容