论文标题
通过深度哈希和代码分类加速代码搜索
Accelerating Code Search with Deep Hashing and Code Classification
论文作者
论文摘要
代码搜索是根据自然语言查询从源代码语料库中搜索可重复使用的代码段。基于深度学习的代码搜索方法已显示出令人鼓舞的结果。但是,以前的方法着重于检索准确性,但缺乏对检索过程效率的关注。我们提出了一种新颖的方法COSHC,以深层哈希和代码分类加速代码搜索,旨在执行有效的代码搜索而不牺牲过多的准确性。为了评估COSHC的有效性,我们将方法应用于五个代码搜索模型。广泛的实验结果表明,与以前的代码搜索基线相比,COSHC可以节省超过90%的检索时间,同时保留至少99%的检索准确性。
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.