🤖 AI Summary
This work addresses the precision and scalability bottlenecks faced by current deep learning models in the initial recall stage over terabyte-scale code corpora, which hinder efficient semantic search and clone detection. For the first time, we systematically evaluate the recall capabilities of large code models on a massive multilingual code dataset and propose a lightweight LLM-driven approach that leverages code normalization and query rewriting to enhance retrieval effectiveness. Experimental results demonstrate that our method substantially improves recall accuracy for lower-capacity models, while also uncovering critical limitations of existing approaches in cross-dataset generalization and deployment under resource constraints. These findings offer practical guidance for building efficient and scalable code retrieval systems.
📝 Abstract
Semantic code search and clone detection are essential for software development, maintenance, and reuse. This paper evaluates the effectiveness, efficiency, and scalability of contemporary deep learning models for first-stage recall in large-scale code-to-code search engines. Benchmarking across multiple programming languages and datasets reveals critical limits in the precision and scalability of these models on Terabyte-scale source-code collections. We present LLM-based code normalisation and query-rewriting schemes that yield significant gains in precision for lower-performing models. Our results question the sustainability of resource-constrained deployment and the assumed robustness of current code-specialised LLMs across datasets. We conclude with actionable insights for building scalable, efficient code-retrieval systems.