SECON: Maintaining Semantic Consistency in Data Augmentation for Code Search

Xu Zhang, Zexu Lin, Xiaoyu Hu, Jianlei Wang, Wenpeng Lü, Deyu Zhou · ACM Transactions on Information Systems · 2024

Efficient code search techniques are crucial in accelerating software development by aiding developers in locating specific code snippets and understanding code functionalities. This study investigates code search methodologies, focusing on the emerging significance of semantic consistency in data augmentation techniques. While existing approaches predominantly enhance raw data, often requiring additional preprocessing and incurring higher training costs, this research introduces a pioneering method operating at the code and query representation levels. By bypassing the need for extensive data processing, this novel approach fosters an interactive alignment between code and query, augmenting the semantic coherence crucial for effective code search. An extensive empirical evaluation of a diverse dataset across multiple programming languages substantiates the efficacy of this approach in significantly enhancing code search model performance compared to traditional methodologies. The implementation is publicly available on GitHub, 1 offering an accessible resource for further exploration and application.

Read the paper · More papers on PaperTik