mlsanityData to 14 Oct 2026

Rewriting the Code: A Simple Method for Large Language Model Augmented Code Search

arXiv 2401.04514 ↗First posted 9 Jan 2024cs.SE cs.CL cs.IRcited by 17

Not on the map. Why?

Abstract (arXiv)

In code search, the Generation-Augmented Retrieval (GAR) framework, which generates exemplar code snippets to augment queries, has emerged as a promising strategy to address the principal challenge of modality misalignment between code snippets and natural language queries, particularly with the demonstrated code generation capabilities of Large Language Models (LLMs). Nevertheless, our preliminary investigations indicate that the improvements conferred by such an LLM-augmented framework are somewhat constrained. This limitation could potentially be ascribed to the fact that the generated codes, albeit functionally accurate, frequently display a pronounced stylistic deviation from the ground truth code in the codebase. In this paper, we extend the foundational GAR framework and propose a simple yet effective method that additionally Rewrites the Code (ReCo) within the codebase for style normalization. Experimental results demonstrate that ReCo significantly boosts retrieval accuracy across sparse (up to 35.7%), zero-shot dense (up to 27.6%), and fine-tuned dense (up to 23.6%) retrieval settings in diverse search scenarios. To further elucidate the advantages of ReCo and stimulate research in code style normalization, we introduce Code Style Similarity, the first metric tailored to quantify stylistic similarities in code. Notably, our empirical findings reveal the inadequacy of existing metrics in capturing stylistic nuances. The source code and data are available at urlhttps://github.com/Alex-HaochenLi/ReCo.

Key facts. Cited by 17 papers in the map (data through 14 Oct 2026). Builds on 29 of its 49 references that are in the map. First posted on arXiv 9 Jan 2024.

Builds on

29 of 49 references.

References · 29

  1. 2020Language Models are Few-Shot Learnerscited by 32,419
  2. 2023LLaMA: Open and Efficient Foundation Language Modelscited by 14,132
  3. 2021Evaluating Large Language Models Trained on Codecited by 8,320
  4. 2018Representation Learning with Contrastive Predictive Codingcited by 7,777
  5. 2021Program Synthesis with Large Language Modelscited by 3,637
  6. 2023Code Llama: Open Foundation Models for Codecited by 2,139
  7. 2021Unsupervised Dense Information Retrieval with Contrastive Learningcited by 1,216
  8. 2021CodeT5: Identifier-aware Unified Pre-trained Encoder-Decoder Models for Code Understanding and Generationcited by 906
  9. 2021Measuring Coding Challenge Competence With APPScited by 902
  10. 2022CodeGen: An Open Large Language Model for Code with Multi-Turn Program Synthesiscited by 885
  11. 2023WizardCoder: Empowering Code Large Language Models with Evol-Instructcited by 733
  12. 2019CodeSearchNet Challenge: Evaluating the State of Semantic Code Searchcited by 654
17 more
  1. 2020GraphCodeBERT: Pre-training Code Representations with Data Flowcited by 609
  2. 2022Precise Zero-Shot Dense Retrieval without Relevance Labelscited by 517
  3. 2020CodeBLEU: a Method for Automatic Evaluation of Code Synthesiscited by 479
  4. 2022UniXcoder: Unified Cross-Modal Pre-training for Code Representationcited by 361
  5. 2023CodeT5+: Open Code Large Language Models for Code Understanding and Generationcited by 333
  6. 2023Large Language Models are Effective Text Rankers with Pairwise Ranking Promptingcited by 307
  7. 2020Generation-Augmented Retrieval for Open-domain Question Answeringcited by 186
  8. 2018Learning to Mine Aligned Code and Natural Language Pairs from Stack Overflowcited by 165
  9. 2022Multi-lingual Evaluation of Code Generation Modelscited by 159
  10. 2021CoSQA: 20,000+ Web Queries for Code Search and Question Answeringcited by 75
  11. 2019When Deep Learning Met Code Searchcited by 46
  12. 2017Query Expansion Based on Crowd Knowledge for Code Searchcited by 18
  13. 2023Rethinking Negative Pairs in Code Searchcited by 14
  14. 2021Multimodal Representation for Neural Code Searchcited by 11
  15. 2018Revisiting the tree edit distance and its backtracing: A tutorialcited by 8
  16. 2022Exploring Representation-Level Augmentation for Code Searchcited by 8
  17. 2022Soft-Labeled Contrastive Pre-training for Function-level Code Representationcited by 7

Built on by

Cited by year (2026 to 14 Oct)

Citing papers per year: 2024: 3; 2025: 10; 2026: 4.

17 papers.

Sort:

By area:

  1. 2025Retrieval-Augmented Code Generation: A Survey with Focus on Repository-Level Approachescited by 23
  2. 2025EpiCoder: Encompassing Diversity and Complexity in Code Generationcited by 20
  3. 2024SRA-MCTS: Self-driven Reasoning Augmentation with Monte Carlo Tree Search for Code Generationcited by 10
  4. 2025SPENCER: Self-Adaptive Model Distillation for Efficient Code Retrievalcited by 5
  5. 2025SACL: Understanding and Combating Textual Bias in Code Retrieval with Semantic-Augmented Reranking and Localizationcited by 4
  6. 2025Function-to-Style Guidance of LLMs for Code Translationcited by 4
  7. 2025Functional Consistency of LLM Code Embeddings: A Self-Evolving Data Synthesis Framework for Benchmarkingcited by 4
  8. 2025GiFT: Gibbs Fine-Tuning for Code Generationcited by 3
  9. 2025Practical Code RAG at Scale: Task-Aware Retrieval Design Choices under Compute Budgetscited by 3
  10. 2024Icing on the Cake: Automatic Code Summarization at Ericssoncited by 2
  11. 2024AddrLLM: Address Rewriting via Large Language Model on Nationwide Logistics Datacited by 2
  12. 2025Natural Language Summarization Enables Multi-Repository Bug Localization by LLMs in Microservice Architecturescited by 1
5 more
  1. 2025URECA: The Chain of Two Minimum Set Cover Problems exists behind Adaptation to Shifts in Semantic Code Searchcited by 0
  2. 2026Do not copy and paste! Rewriting strategies for code retrievalcited by 0
  3. 2026Recall Before Rerank: Benchmarking Deep Learning Models for Large-Scale Code-to-Code Retrievalcited by 0
  4. 2026Towards Fully Automated Medical Imaging Code Generation via Validation-based Context Engineeringcited by 0
  5. 2026On the Lexical Superstition of Large Language Models for Code Comprehension: Re-evaluation on Code of Low Lexical Qualitycited by 0