English

Code Search Debiasing:Improve Search Results beyond Overall Ranking Performance

Computation and Language 2024-02-20 v2

Abstract

Code search engine is an essential tool in software development. Many code search methods have sprung up, focusing on the overall ranking performance of code search. In this paper, we study code search from another perspective by analyzing the bias of code search models. Biased code search engines provide poor user experience, even though they show promising overall performance. Due to different development conventions (e.g., prefer long queries or abbreviations), some programmers will find the engine useful, while others may find it hard to get desirable search results. To mitigate biases, we develop a general debiasing framework that employs reranking to calibrate search results. It can be easily plugged into existing engines and handle new code search biases discovered in the future. Experiments show that our framework can effectively reduce biases. Meanwhile, the overall ranking performance of code search gets improved after debiasing.

Keywords

Cite

@article{arxiv.2311.14901,
  title  = {Code Search Debiasing:Improve Search Results beyond Overall Ranking Performance},
  author = {Sheng Zhang and Hui Li and Yanlin Wang and Zhao Wei and Yong Xiu and Juhong Wang and Rongong Ji},
  journal= {arXiv preprint arXiv:2311.14901},
  year   = {2024}
}

Comments

11 pages

R2 v1 2026-06-28T13:31:06.535Z