Deep Code Search with Naming-Agnostic Contrastive Multi-View Learning
Jiadong Feng, Wei Li, Suhuang Wu, Zhao Wei, Yong Xu, Juhong Wang, Hui Li

TL;DR
This paper introduces NACS, a naming-agnostic deep learning approach for code search that relies on contrastive multi-view learning of AST structures, effectively handling variable naming differences across code snippets.
Contribution
NACS is the first to strip variable name information from ASTs and use contrastive multi-view learning to improve code search robustness against naming variations.
Findings
NACS outperforms baseline methods in code search tasks.
NACS effectively mitigates issues caused by different variable naming conventions.
The approach enhances code understanding without relying on variable names.
Abstract
Software development is a repetitive task, as developers usually reuse or get inspiration from existing implementations. Code search, which refers to the retrieval of relevant code snippets from a codebase according to the developer's intent that has been expressed as a query, has become increasingly important in the software development process. Due to the success of deep learning in various applications, a great number of deep learning based code search approaches have sprung up and achieved promising results. However, developers may not follow the same naming conventions and the same variable may have different variable names in different implementations, bringing a challenge to deep learning based code search methods that rely on explicit variable correspondences to understand source code. To overcome this challenge, we propose a naming-agnostic code search method (NACS) based on…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsNatural Language Processing Techniques · Handwritten Text Recognition Techniques
MethodsContrastive Learning
