Open this publication in new window or tab >>Show others...
2022 (English)In: 34th Workshop of the Swedish Artificial Intelligence Society, SAIS 2022, Institute of Electrical and Electronics Engineers Inc. , 2022Conference paper, Published paper (Refereed)
Abstract [en]
Code Search is a practical tool that helps developers navigate growing source code repositories by connecting natural language queries with code snippets. Platforms such as StackOverflow resolve coding questions and answers; however, they cannot perform a semantic search through the code. Moreover, poorly documented code adds more complexity to search for code snippets in repositories. To tackle this challenge, this paper presents Siambert, a BERT-based model that gets the question in natural language and returns relevant code snippets. The Siambert architecture consists of two stages, where the first stage, inspired by Siamese Neural Network, returns the top K relevant code snippets to the input questions, and the second stage ranks the given snippets by the first stage. The experiments show that Siambert outperforms non-BERT-based models having improvements that range from 12% to 39% on the Recall@1 metric and improves the inference time performance, making it 15x faster than standard BERT models
Place, publisher, year, edition, pages
Institute of Electrical and Electronics Engineers Inc., 2022
Keywords
Codes (symbols), Natural language processing systems, Code search, Natural language queries, Natural languages, Neural-networks, Performance, Semantic search, Source code repositories, Semantics
National Category
Economics and Business
Identifiers
urn:nbn:se:ri:diva-60199 (URN)10.1109/SAIS55783.2022.9833051 (DOI)2-s2.0-85136132400 (Scopus ID)9781665471268 (ISBN)
Conference
34th Workshop of the Swedish Artificial Intelligence Society, SAIS 2022, 13 June 2022 through 14 June 2022
2022-10-072022-10-072023-11-06Bibliographically approved