English

Accelerating Code Search with Deep Hashing and Code Classification

Software Engineering 2022-04-01 v2 Artificial Intelligence

Abstract

Code search is to search reusable code snippets from source code corpus based on natural languages queries. Deep learning-based methods of code search have shown promising results. However, previous methods focus on retrieval accuracy but lacked attention to the efficiency of the retrieval process. We propose a novel method CoSHC to accelerate code search with deep hashing and code classification, aiming to perform an efficient code search without sacrificing too much accuracy. To evaluate the effectiveness of CoSHC, we apply our method to five code search models. Extensive experimental results indicate that compared with previous code search baselines, CoSHC can save more than 90% of retrieval time meanwhile preserving at least 99% of retrieval accuracy.

Keywords

Cite

@article{arxiv.2203.15287,
  title  = {Accelerating Code Search with Deep Hashing and Code Classification},
  author = {Wenchao Gu and Yanlin Wang and Lun Du and Hongyu Zhang and Shi Han and Dongmei Zhang and Michael R. Lyu},
  journal= {arXiv preprint arXiv:2203.15287},
  year   = {2022}
}

Comments

Accepted to 60th Annual Meeting of the Association for Computational Linguistics (ACL 2022)

R2 v1 2026-06-24T10:29:33.523Z