OCoR: An Overlapping-Aware Code Retriever
Qihao Zhu, Zeyu Sun, Xiran Liang, Yingfei Xiong, Lu Zhang
摘要
Code retrieval helps developers reuse code snippets in the opensource projects. Given a natural language description, code retrieval aims to search for the most relevant code relevant among a set of code snippets. Existing state-of-the-art approaches apply neural networks to code retrieval. However, these approaches still fail to capture an important feature: overlaps. The overlaps between different names used by different people indicate that two different names may be potentially related (e.g., "message" and "msg"), and the overlaps between identifiers in code and words in natural language descriptions indicate that the code snippet and the description may potentially be related. To address this problem, we propose a novel neural architecture named OCoR 1 , where we introduce two specifically-designed components to capture overlaps: the first embeds names by characters to capture the overlaps between names, and the second introduces a novel overlap matrix to represent the degrees of overlaps between each natural language word and each identifier. The evaluation was conducted on two established datasets. The experimental results show that OCoR significantly outperforms the existing state-of-the-art approaches and achieves 13.1% to 22.3% improvements. Moreover, we also conducted several in-depth experiments to help understand the performance of the different components in OCoR.
问问这篇 Paper
智能体会读完全文。
Lune 把这篇 Paper 索引到了每一个公式,引用它的顶会 Paper 也一样。你提问,回答直接引用原文。
引用它的顶会 Paper6
- A syntax-guided edit decoder for neural program repairQihao Zhu, Zeyu Sun, Yuan-an Xiao, Wenjie Zhang 等FSE 2021 · 被引用 214 次
- Boosting coverage-based fault localization via graph-based representation learningYiling Lou, Qihao Zhu, Jinhao Dong, Xia Li 等FSE 2021 · 被引用 157 次
- Code Search based on Context-aware Code TranslationWeisong Sun, Chunrong Fang, Yuchen Chen, Guanhong Tao 等ICSE 2022 · 被引用 53 次
- CoCoSoDa: Effective Contrastive Learning for Code SearchEnsheng Shi, Yanlin Wang, Wenchao Gu, Lun Du 等ICSE 2023 · 被引用 45 次
- Cross-Domain Deep Code Search with Meta LearningYitian Chai, Hongyu Zhang, Beijun Shen, Xiaodong GuICSE 2022 · 被引用 42 次
它引用的顶会 Paper1
相关 Paper
- SkCoder: A Sketch-based Approach for Automatic Code GenerationJia Li, Yongmin Li, Ge Li, Zhi Jin 等ICSE 2023 · 被引用 50 次
- Retrieve and Refine: Exemplar-based Neural Comment GenerationBolin Wei, Yongmin Li, Ge Li, Xin Xia 等ASE 2020 · 被引用 68 次
- EditSum: A Retrieve-and-Edit Framework for Source Code SummarizationJia Li, Yongmin Li, Ge Li, Xing Hu 等ASE 2021 · 被引用 55 次
- COME: Commit Message Generation with Modification EmbeddingYichen He, Liran Wang, Kaiyi Wang, Yupeng Zhang 等ISSTA 2023 · 被引用 14 次
- PinNet: Pinpoint Instructive Information for Retrieval Augmented Code-to-Text GenerationHan Fu, Jian Tan, Pinhan Zhang, Feifei Li 等ICML 2024
