Multilayer self‐attention residual network for code search.
Saved in:
| Title: | Multilayer self‐attention residual network for code search. |
|---|---|
| Authors: | Hu, Haize, Liu, Jianxun, Zhang, Xiangping |
| Source: | Concurrency & Computation: Practice & Experience; 4/25/2023, Vol. 35 Issue 9, p1-18, 18p |
| Subject Terms: | LINEAR network coding, SOURCE code, COMPUTER software development, ACCURACY of information, OPEN source software |
| Abstract: | Summary: Software developers usually search existing code snippets in open source code repositories to modify and reuse them. Therefore, how to get the right code snippet from the open‐source code repository quickly and accurately is the focus of current software development research. Nowadays, code search is one of the solutions. To improve the accuracy of source code feature information representation and the accuracy of code search. A multilayer self‐ attention residual network‐based code search model (MSARN‐CS) is proposed in this paper. In the MSARN‐CS model, not only the weight of each word in the code sequence unit is considered but also the effect of embedding between code sequence units is calculated. In addition, an optimization model of residuals is introduced to compensate for the loss of information in the code sequences during the model training. To verify the search effectiveness of the MSARN‐CS model, three other baseline models are compared on the basis of extensive source code data. The experimental results show that the MSARN‐CS model has better search results compared with the baseline model. For parameter Recall@1, the experimental result of MSARN‐CS model was 9.547, which as 100.90%, 73.87%, 60.37%, and 2.55% better compared to CODEnn, CRLCS, SAN‐CS‐ and SAN‐CS, respectively. For the parameter Recall@5, the results improved by 26.67%, 36.23%, 36.21%, and 1.63%, respectively, and for the parameter Recall@10, the results improved by 13.92%, 25.70%, 20.78%, and 2.23%, respectively. For the parameter mean reciprocal rank, the results improved by 52.89%, 76.17%, 63.38%, and 3.88%, respectively. For the parameter normalized discounted cumulative gain, the results improved by 54.22%, 60.55%, 50.28%, and 3.30%, respectively. The MSARN‐CS model proposed in the paper can effectively improve the accuracy of code search and enhance the programming efficiency of developers. [ABSTRACT FROM AUTHOR] |
| Copyright of Concurrency & Computation: Practice & Experience is the property of Wiley-Blackwell and its content may not be copied or emailed to multiple sites without the copyright holder's express written permission. Additionally, content may not be used with any artificial intelligence tools or machine learning technologies. However, users may print, download, or email articles for individual use. This abstract may be abridged. No warranty is given about the accuracy of the copy. Users should refer to the original published version of the material for the full abstract. (Copyright applies to all Abstracts.) | |
| Database: | Complementary Index |
| Abstract: | Summary: Software developers usually search existing code snippets in open source code repositories to modify and reuse them. Therefore, how to get the right code snippet from the open‐source code repository quickly and accurately is the focus of current software development research. Nowadays, code search is one of the solutions. To improve the accuracy of source code feature information representation and the accuracy of code search. A multilayer self‐ attention residual network‐based code search model (MSARN‐CS) is proposed in this paper. In the MSARN‐CS model, not only the weight of each word in the code sequence unit is considered but also the effect of embedding between code sequence units is calculated. In addition, an optimization model of residuals is introduced to compensate for the loss of information in the code sequences during the model training. To verify the search effectiveness of the MSARN‐CS model, three other baseline models are compared on the basis of extensive source code data. The experimental results show that the MSARN‐CS model has better search results compared with the baseline model. For parameter Recall@1, the experimental result of MSARN‐CS model was 9.547, which as 100.90%, 73.87%, 60.37%, and 2.55% better compared to CODEnn, CRLCS, SAN‐CS‐ and SAN‐CS, respectively. For the parameter Recall@5, the results improved by 26.67%, 36.23%, 36.21%, and 1.63%, respectively, and for the parameter Recall@10, the results improved by 13.92%, 25.70%, 20.78%, and 2.23%, respectively. For the parameter mean reciprocal rank, the results improved by 52.89%, 76.17%, 63.38%, and 3.88%, respectively. For the parameter normalized discounted cumulative gain, the results improved by 54.22%, 60.55%, 50.28%, and 3.30%, respectively. The MSARN‐CS model proposed in the paper can effectively improve the accuracy of code search and enhance the programming efficiency of developers. [ABSTRACT FROM AUTHOR] |
|---|---|
| ISSN: | 15320626 |
| DOI: | 10.1002/cpe.7650 |
Full Text Finder
Nájsť tento článok vo Web of Science