Enhancing code search through query expansion: A fusion of LSTM with GloVe and BERT model (ECSQE)
Nazia Bibi, Muhammad Usman Tariq, Zabeeh Ullah, Muhammad Ali Babar, Zahid Mahmood Khan
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.