"More Than Deep Learning": Post-processing for API sequence recommendation
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...
Saved in:
Main Authors: | , , , , , , |
---|---|
Format: | text |
Language: | English |
Published: |
Institutional Knowledge at Singapore Management University
2022
|
Subjects: | |
Online Access: | https://ink.library.smu.edu.sg/sis_research/6580 https://ink.library.smu.edu.sg/context/sis_research/article/7583/viewcontent/Chen2021_Article_MoreThanDeepLearningPost_proce__1_.pdf |
Tags: |
Add Tag
No Tags, Be the first to tag this record!
|
Institution: | Singapore Management University |
Language: | English |
id |
sg-smu-ink.sis_research-7583 |
---|---|
record_format |
dspace |
spelling |
sg-smu-ink.sis_research-75832022-01-13T08:11:41Z "More Than Deep Learning": Post-processing for API sequence recommendation CHEN, Chi PENG, Xin CHEN, Bihuan SUN, Jun XING, Zhenchang WANG, Xin ZHAO, Wenyun 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. 2022-01-01T08:00:00Z text application/pdf https://ink.library.smu.edu.sg/sis_research/6580 info:doi/10.1007/s10664-021-10040-2 https://ink.library.smu.edu.sg/context/sis_research/article/7583/viewcontent/Chen2021_Article_MoreThanDeepLearningPost_proce__1_.pdf http://creativecommons.org/licenses/by-nc-nd/4.0/ Research Collection School Of Computing and Information Systems eng Institutional Knowledge at Singapore Management University API Recommendation Deep learning Encoder-decoder Post-processing Software Engineering |
institution |
Singapore Management University |
building |
SMU Libraries |
continent |
Asia |
country |
Singapore Singapore |
content_provider |
SMU Libraries |
collection |
InK@SMU |
language |
English |
topic |
API Recommendation Deep learning Encoder-decoder Post-processing Software Engineering |
spellingShingle |
API Recommendation Deep learning Encoder-decoder Post-processing Software Engineering CHEN, Chi PENG, Xin CHEN, Bihuan SUN, Jun XING, Zhenchang WANG, Xin ZHAO, Wenyun "More Than Deep Learning": Post-processing for API sequence recommendation |
description |
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. |
format |
text |
author |
CHEN, Chi PENG, Xin CHEN, Bihuan SUN, Jun XING, Zhenchang WANG, Xin ZHAO, Wenyun |
author_facet |
CHEN, Chi PENG, Xin CHEN, Bihuan SUN, Jun XING, Zhenchang WANG, Xin ZHAO, Wenyun |
author_sort |
CHEN, Chi |
title |
"More Than Deep Learning": Post-processing for API sequence recommendation |
title_short |
"More Than Deep Learning": Post-processing for API sequence recommendation |
title_full |
"More Than Deep Learning": Post-processing for API sequence recommendation |
title_fullStr |
"More Than Deep Learning": Post-processing for API sequence recommendation |
title_full_unstemmed |
"More Than Deep Learning": Post-processing for API sequence recommendation |
title_sort |
"more than deep learning": post-processing for api sequence recommendation |
publisher |
Institutional Knowledge at Singapore Management University |
publishDate |
2022 |
url |
https://ink.library.smu.edu.sg/sis_research/6580 https://ink.library.smu.edu.sg/context/sis_research/article/7583/viewcontent/Chen2021_Article_MoreThanDeepLearningPost_proce__1_.pdf |
_version_ |
1770575995108065280 |