Build a Dataset of Query-Code Pairs Based on CodeSearchNet for Code Search (S)

CodeSearchNet is a widely used dataset of commentcode pairs for training code search models.However, code search models trained on the datasets of comment-code pairs usually have lower performance in real-world applications because of the semantic gap between comments and real queries.The existing datasets of query-code pairs are smaller in size and lower in quality than CodeSearchNet for code search research.In this paper, we build a Python dataset of query-code pairs, named QCSN, from CodeSearchNet using a text generator.We train the text generator by fine-tuning the pre-trained model PLBART on StaQC's query-code pairs.To address the issue of domain shift between StaQC and CodeSearchNet, we exploit a deep adversarial neural network that trains a feature extractor to extract domain-invariant features.The experimental results show that the MRR of the typical code search model trained on QCSN improves by over 18.5%.The ablation study indicates that the deep adversarial neural network module improves the quality of the generated dataset.Further evaluations reveal that the generated queries closely match the real queries in terms of lexical overlap and semantic similarity, accurately expressing the functionality of the source code.

Authors

Publication Details

Journal
Proceedings/Proceedings of the ... International Conference on Software Engineering and Knowledge Engineering
Published
2024-10-28
DOI
https://doi.org/10.18293/seke2024-094
Primary Topic
Software Testing and Debugging Techniques
Type
article
Field-Weighted Citation Impact
0.00
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

Build a Dataset of Query-Code Pairs Based on CodeSearchNet for Code Search (S)

Yang Xu, Chao‐Wei Chen
Proceedings/Proceedings of the ... International Conference on Software Engineering and Knowledge Engineering
Software Testing and Debugging Techniques
article

Build a Dataset of Query-Code Pairs Based on CodeSearchNet for Code Search (S)

Yang Xu, Chao‐Wei Chen
article en

Abstract

CodeSearchNet is a widely used dataset of commentcode pairs for training code search models.However, code search models trained on the datasets of comment-code pairs usually have lower performance in real-world applications because of the semantic gap between comments and real queries.The existing datasets of query-code pairs are smaller in size and lower in quality than CodeSearchNet for code search research.In this paper, we build a Python dataset of query-code pairs, named QCSN, from CodeSearchNet using a text generator.We train the text generator by fine-tuning the pre-trained model PLBART on StaQC's query-code pairs.To address the issue of domain shift between StaQC and CodeSearchNet, we exploit a deep adversarial neural network that trains a feature extractor to extract domain-invariant features.The experimental results show that the MRR of the typical code search model trained on QCSN improves by over 18.5%.The ablation study indicates that the deep adversarial neural network module improves the quality of the generated dataset.Further evaluations reveal that the generated queries closely match the real queries in terms of lexical overlap and semantic similarity, accurately expressing the functionality of the source code.

Proceedings/Proceedings of the ... International Conference on Software Engineering and Knowledge EngineeringVol. 2024
Openalex Percentile: Top 74%
Software Testing and Debugging Techniques
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.

Build a Dataset of Query-Code Pairs Based on CodeSearchNet for Code Search (S) — Yang Xu, Chao‐Wei Chen · Proceedings/Proceedings of the ... International Conference on Software Engineering and Knowledge Engineering (2024) | TGRS Research Map | TGRS