Enhancing code search through query expansion: A fusion of LSTM with GloVe and BERT model (ECSQE)

Loading...
Thumbnail Image

Date

Journal Title

Journal ISSN

Volume Title

Publisher

Elsevier B.V.

Abstract

In software engineering efficient code retrieval is essential for developers to quickly access relevant code snippets from vast repositories. This study focuses on enhancing code search through query expansion, leveraging advanced word embedding techniques such as GloVe and BERT to improve search accuracy and relevance. The main objective is to assess how the proposed model can outperform traditional models in terms of evaluation metrics by expanding query terms based on contextual understanding. The proposed model was evaluated using three query datasets to enable a comprehensive performance comparison with baseline models, including UNIF, CNN-CS and DeepCS. The results demonstrate that the proposed model significantly enhances code search effectiveness by generating more contextually relevant queries, which in turn leads to improved retrieval outcomes. Nonetheless, challenges such as language dependency and data diversity, were identified. The study concludes by emphasizing the potential of the proposed model to transform code search while highlighting areas for future work including expanding the model's applicability across more languages and addressing scalability issues for larger datasets. Keywords: BERT, Codesearchnet, Deep neural networks, GloVe, LSTM, Natural language, Recommendation system, Semantic matching, Source code reuse, Source code selection

Keywords

Citation

Bibi, N., Tariq, M. U., Ullah, Z., Babar, M., & Khan, Z. (2025). Enhancing Code Search through Query Expansion: A Fusion of LSTM with GloVe and BERT Model (ECSQE). Results in Engineering, 105979.

Endorsement

Review

Supplemented By

Referenced By