Code Search Debiasing:Improve Search Results beyond Overall Ranking Performance
Not on the map. Why?
Abstract (arXiv)
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.
Key facts. Cited by 4 papers in the map (data through 7 Oct 2026). Builds on 24 of its 41 references that are in the map. First posted on arXiv 25 Nov 2023.
Builds on
24 of 41 references.
References · 24
- 2019A Survey on Bias and Fairness in Machine Learningcited by 1,911
- 2020Language (Technology) is Power: A Critical Survey of "Bias" in NLPcited by 951
- 2021CodeXGLUE: A Machine Learning Benchmark Dataset for Code Understanding and Generationcited by 732
- 2019CodeSearchNet Challenge: Evaluating the State of Semantic Code Searchcited by 638
- 2020GraphCodeBERT: Pre-training Code Representations with Data Flowcited by 600
- 2022UniXcoder: Unified Cross-Modal Pre-training for Code Representationcited by 355
- 2019Mitigating Gender Bias in Natural Language Processing: Literature Reviewcited by 287
- 2018Multiaccuracy: Black-Box Post-Processing for Fairness in Classificationcited by 221
- 2018Correcting Length Bias in Neural Machine Translationcited by 119
- 2018Improving Automatic Source Code Summarization via Deep Reinforcement Learningcited by 99
- 2021CoSQA: 20,000+ Web Queries for Code Search and Question Answeringcited by 74
- 2021Post-processing for Individual Fairnesscited by 61
12 more
- 2021Fair Preprocessing: Towards Understanding Compositional Fairness of Data Transformers in Machine Learning Pipelinecited by 49
- 2019Multi-Modal Attention Network Learning for Semantic Source Code Retrievalcited by 40
- 2020Correcting for Selection Bias in Learning-to-rank Systemscited by 35
- 2018Estimating Position Bias without Intrusive Interventionscited by 31
- 2021Code Completion by Modeling Flattened Abstract Syntax Trees as Graphscited by 30
- 2020Opportunities and Challenges in Code Search Toolscited by 22
- 2021Improving Code Summarization with Block-wise Abstract Syntax Tree Splittingcited by 19
- 2022Code Search: A Survey of Techniques for Finding Codecited by 18
- 2020OCoR: An Overlapping-Aware Code Retrievercited by 9
- 2022Tackling Long Code Search with Splitting, Encoding, and Aggregatingcited by 9
- 2023EALink: An Efficient and Accurate Pre-trained Framework for Issue-Commit Link Recoverycited by 9
- 2021On Length Divergence Bias in Textual Matching Modelscited by 3
Built on by
Citing papers per year: 2024: 1; 2025: 0; 2026: 3.
4 papers.
- 2024Agents in Software Engineering: Survey, Landscape, and Visioncited by 60
- 2026AlignCoder: Aligning Retrieval with Target Intent for Repository-Level Code Completioncited by 7
- 2026DRAINCODE: Stealthy Energy Consumption Attacks on Retrieval-Augmented Code Generation via Context Poisoningcited by 3
- 2026PhoenixRepair: Rethinking Repair Strategy Exploration in Software Agentscited by 2
- 2026PhoenixRepair: Rethinking Repair Strategy Exploration in Software Agents21 Jul 2026
- 2026DRAINCODE: Stealthy Energy Consumption Attacks on Retrieval-Augmented Code Generation via Context Poisoning28 Jan 2026
- 2026AlignCoder: Aligning Retrieval with Target Intent for Repository-Level Code Completion27 Jan 2026
- 2024Agents in Software Engineering: Survey, Landscape, and Vision13 Sep 2024