Code search is all you need? Improving code suggestions with code search
Modern integrated development environments (IDEs) provide various automated code suggestion techniques (e.g., code completion and code generation) to help developers improve their efficiency. Such techniques may retrieve similar code snippets from the code base or leverage deep learning models to pr...
Saved in:
Main Authors: | , , , , , |
---|---|
Format: | text |
Language: | English |
Published: |
Institutional Knowledge at Singapore Management University
2024
|
Subjects: | |
Online Access: | https://ink.library.smu.edu.sg/sis_research/9247 https://ink.library.smu.edu.sg/context/sis_research/article/10247/viewcontent/ICSE2024_Code_Suggestion.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-10247 |
---|---|
record_format |
dspace |
spelling |
sg-smu-ink.sis_research-102472024-09-02T06:41:42Z Code search is all you need? Improving code suggestions with code search CHEN, Junkai HU, Xing LI, Zhenhao GAO, Cuiyun XIA, Xin LO, David Modern integrated development environments (IDEs) provide various automated code suggestion techniques (e.g., code completion and code generation) to help developers improve their efficiency. Such techniques may retrieve similar code snippets from the code base or leverage deep learning models to provide code suggestions. However, how to effectively enhance the code suggestions using code retrieval has not been systematically investigated. In this paper, we study and explore a retrieval-augmented framework for code suggestions. Specifically, our framework leverages different retrieval approaches and search strategies to search similar code snippets. Then the retrieved code is used to further enhance the performance of language models on code suggestions. We conduct experiments by integrating different language models into our framework and compare the results with their original models. We find that our framework noticeably improves the performance of both code completion and code generation by up to 53.8% and 130.8% in terms of BLEU-4, respectively. Our study highlights that integrating the retrieval process into code suggestions can improve the performance of code suggestions by a large margin. 2024-04-01T07:00:00Z text application/pdf https://ink.library.smu.edu.sg/sis_research/9247 info:doi/10.1145/3597503.363908 https://ink.library.smu.edu.sg/context/sis_research/article/10247/viewcontent/ICSE2024_Code_Suggestion.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 Code Suggestion Code Search Language Model Programming Languages and Compilers Software Engineering |
institution |
Singapore Management University |
building |
SMU Libraries |
continent |
Asia |
country |
Singapore Singapore |
content_provider |
SMU Libraries |
collection |
InK@SMU |
language |
English |
topic |
Code Suggestion Code Search Language Model Programming Languages and Compilers Software Engineering |
spellingShingle |
Code Suggestion Code Search Language Model Programming Languages and Compilers Software Engineering CHEN, Junkai HU, Xing LI, Zhenhao GAO, Cuiyun XIA, Xin LO, David Code search is all you need? Improving code suggestions with code search |
description |
Modern integrated development environments (IDEs) provide various automated code suggestion techniques (e.g., code completion and code generation) to help developers improve their efficiency. Such techniques may retrieve similar code snippets from the code base or leverage deep learning models to provide code suggestions. However, how to effectively enhance the code suggestions using code retrieval has not been systematically investigated. In this paper, we study and explore a retrieval-augmented framework for code suggestions. Specifically, our framework leverages different retrieval approaches and search strategies to search similar code snippets. Then the retrieved code is used to further enhance the performance of language models on code suggestions. We conduct experiments by integrating different language models into our framework and compare the results with their original models. We find that our framework noticeably improves the performance of both code completion and code generation by up to 53.8% and 130.8% in terms of BLEU-4, respectively. Our study highlights that integrating the retrieval process into code suggestions can improve the performance of code suggestions by a large margin. |
format |
text |
author |
CHEN, Junkai HU, Xing LI, Zhenhao GAO, Cuiyun XIA, Xin LO, David |
author_facet |
CHEN, Junkai HU, Xing LI, Zhenhao GAO, Cuiyun XIA, Xin LO, David |
author_sort |
CHEN, Junkai |
title |
Code search is all you need? Improving code suggestions with code search |
title_short |
Code search is all you need? Improving code suggestions with code search |
title_full |
Code search is all you need? Improving code suggestions with code search |
title_fullStr |
Code search is all you need? Improving code suggestions with code search |
title_full_unstemmed |
Code search is all you need? Improving code suggestions with code search |
title_sort |
code search is all you need? improving code suggestions with code search |
publisher |
Institutional Knowledge at Singapore Management University |
publishDate |
2024 |
url |
https://ink.library.smu.edu.sg/sis_research/9247 https://ink.library.smu.edu.sg/context/sis_research/article/10247/viewcontent/ICSE2024_Code_Suggestion.pdf |
_version_ |
1814047843857465344 |