CigaR: Cost-efficient Program Repair with LLMs
Not on the map. Why?
Abstract (arXiv)
Large language models (LLM) have proven to be effective at automated program repair (APR). However, using LLMs can be costly, with companies invoicing users by the number of tokens. In this paper, we propose CigaR, the first LLM-based APR tool that focuses on minimizing the repair cost. CigaR works in two major steps: generating a first plausible patch and multiplying plausible patches. CigaR optimizes the prompts and the prompt setting to maximize the information given to LLMs using the smallest possible number of tokens. Our experiments on 429 bugs from the widely used Defects4J and HumanEval-Java datasets shows that CigaR reduces the token cost by 73%. On average, CigaR spends 127k tokens per bug while the baseline uses 467k tokens per bug. On the subset of bugs that are fixed by both, CigaR spends 20k per bug while the baseline uses 608k tokens, a cost saving of 96%. Our extensive experiments show that CigaR is a cost-effective LLM-based program repair tool that uses a low number of tokens to automatically generate patches.
Key facts. Cited by 14 papers in the map (data through 7 Oct 2026). Builds on 40 of its 56 references that are in the map. First posted on arXiv 9 Feb 2024.
Builds on
40 of 56 references.
References · 40
- 2017Attention Is All You Needcited by 59,932
- 2018BERT: Pre-training of Deep Bidirectional Transformers for Language Understandingcited by 40,204
- 2019Exploring the Limits of Transfer Learning with a Unified Text-to-Text Transformercited by 14,491
- 2019Sentence-BERT: Sentence Embeddings using Siamese BERT-Networkscited by 9,049
- 2021Evaluating Large Language Models Trained on Codecited by 8,053
- 2020CodeBERT: A Pre-Trained Model for Programming and Natural Languagescited by 1,286
- 2023FrugalGPT: How to Use Large Language Models While Reducing Cost and Improving Performancecited by 791
- 2020How Much Knowledge Can You Pack Into the Parameters of a Language Model?cited by 713
- 2022InCoder: A Generative Model for Code Infilling and Synthesiscited by 492
- 2023Learning to Compress Prompts with Gist Tokenscited by 379
- 2022Estimating the Carbon Footprint of BLOOM, a 176B Parameter Language Modelcited by 264
- 2023Med-HALT: Medical Domain Hallucination Test for Large Language Modelscited by 156
28 more
- 2022Practical Program Repair in the Era of Large Pre-trained Language Modelscited by 133
- 2023Keep the Conversation Going: Fixing 162 out of 337 bugs for 0.42 each using ChatGPTcited by 125
- 2023An Analysis of the Automatic Bug Fixing Performance of ChatGPTcited by 108
- 2021Examining Zero-Shot Vulnerability Repair with Large Language Modelscited by 105
- 2023Impact of Code Language Models on Automated Program Repaircited by 85
- 2023Batch Prompting: Efficient Inference with Large Language Model APIscited by 84
- 2022Less Training, More Repairing Please: Revisiting Automated Program Repair via Zero-shot Learningcited by 76
- 2022Automated Repair of Programs from Large Language Modelscited by 71
- 2023How Effective Are Neural Networks for Fixing Security Vulnerabilitiescited by 50
- 2023EcoAssistant: Using LLM Assistant More Affordably and Accuratelycited by 47
- 2021Applying CodeBERT for Automated Program Repair of Java Simple Bugscited by 44
- 2023Cost-Effective Hyperparameter Optimization for Large Language Model Generation Inferencecited by 40
- 2023LeanContext: Cost-Efficient Domain-Specific Question Answering Using LLMscited by 40
- 2023Better patching using LLM prompting, via Self-Consistencycited by 29
- 2023A Critical Review of Large Language Model on Software Engineering: An Example from ChatGPT and Automated Program Repaircited by 29
- 2023A study on Prompt Design, Advantages and Limitations of ChatGPT for Deep Learning Program Repaircited by 26
- 2021On Multi-Modal Learning of Editing Source Codecited by 25
- 2023GAMMA: Revisiting Template-based Automated Program Repair via Mask Predictioncited by 22
- 2022CIRCLE: Continual Repair across Programming Languagescited by 17
- 2022FixEval: Execution-based Evaluation of Program Fixes for Programming Problemscited by 17
- 2023Pre-trained Model-based Automated Software Vulnerability Repair: How Far are We?cited by 15
- 2023Towards Generating Functionally Correct Code Edits from Natural Language Issue Descriptionscited by 14
- 2023A Survey on Automated Program Repair Techniquescited by 12
- 2019Automated Classification of Overfitting Patches with Statically Extracted Code Featurescited by 10
- 2022Improving Automated Program Repair with Domain Adaptationcited by 10
- 2023Enhancing Automated Program Repair through Fine-tuning and Prompt Engineeringcited by 10
- 2023STEAM: Simulating the InTeractive BEhavior of ProgrAMmers for Automatic Bug Fixingcited by 9
- 2023Automated Code Editing with Search-Generate-Modifycited by 8
Built on by
Citing papers per year: 2024: 7; 2025: 6; 2026: 1.
14 papers.
Sort:
By area:
- 2024Agentless: Demystifying LLM-based Software Engineering Agentscited by 400
- 2024RepairAgent: An Autonomous, LLM-Based Agent for Program Repaircited by 225
- 2024Large Language Model-Based Agents for Software Engineering: A Surveycited by 173
- 2025Understanding Software Engineering Agents: A Study of Thought-Action-Result Trajectoriescited by 75
- 2024HyperAgent: Generalist Software Engineering Agents to Solve Coding Tasks at Scalecited by 61
- 2025Failure-Driven Workflow Refinementcited by 19
- 2024CoSQA+: Pioneering the Multi-Choice Code Search Benchmark with Test-Driven Agentscited by 11
- 2024EcoAct: Economic Agent Determines When to Register What Actioncited by 11
- 2024RepairBench: Leaderboard of Frontier Models for Program Repaircited by 9
- 2025The Art of Repair: Optimizing Iterative Program Repair with Instruction-Tuned Modelscited by 7
- 2026LLM-Based Agentic Systems for Software Engineering: Challenges and Opportunitiescited by 7
- 2025Unlocking LLM Repair Capabilities Through Cross-Language Translation and Multi-Agent Refinementcited by 3
2 more
- 2026LLM-Based Agentic Systems for Software Engineering: Challenges and Opportunities14 Jan 2026
- 2025Failure-Driven Workflow Refinement11 Oct 2025
- 2025From Benchmark Data To Applicable Program Repair: An Experience Report22 Aug 2025
- 2025Understanding Software Engineering Agents: A Study of Thought-Action-Result Trajectories23 Jun 2025
- 2025Adversarial Reasoning for Repair Based on Inferred Program Intent19 May 2025
- 2025The Art of Repair: Optimizing Iterative Program Repair with Instruction-Tuned Models5 May 2025
- 2025Unlocking LLM Repair Capabilities Through Cross-Language Translation and Multi-Agent Refinement28 Mar 2025
- 2024EcoAct: Economic Agent Determines When to Register What Action3 Nov 2024
- 2024RepairBench: Leaderboard of Frontier Models for Program Repair27 Sep 2024
- 2024HyperAgent: Generalist Software Engineering Agents to Solve Coding Tasks at Scale9 Sep 2024
- 2024Large Language Model-Based Agents for Software Engineering: A Survey4 Sep 2024
- 2024Agentless: Demystifying LLM-based Software Engineering Agents1 Jul 2024
2 more
- 2024Agentless: Demystifying LLM-based Software Engineering Agentscited by 400
- 2024RepairAgent: An Autonomous, LLM-Based Agent for Program Repaircited by 225
- 2024Large Language Model-Based Agents for Software Engineering: A Surveycited by 173
- 2024HyperAgent: Generalist Software Engineering Agents to Solve Coding Tasks at Scalecited by 61
- 2024CoSQA+: Pioneering the Multi-Choice Code Search Benchmark with Test-Driven Agentscited by 11
- 2024EcoAct: Economic Agent Determines When to Register What Actioncited by 11
- 2026LLM-Based Agentic Systems for Software Engineering: Challenges and Opportunitiescited by 7
- 2025Unlocking LLM Repair Capabilities Through Cross-Language Translation and Multi-Agent Refinementcited by 3
- 2026LLM-Based Agentic Systems for Software Engineering: Challenges and Opportunities14 Jan 2026
- 2025Unlocking LLM Repair Capabilities Through Cross-Language Translation and Multi-Agent Refinement28 Mar 2025
- 2024EcoAct: Economic Agent Determines When to Register What Action3 Nov 2024
- 2024HyperAgent: Generalist Software Engineering Agents to Solve Coding Tasks at Scale9 Sep 2024
- 2024Large Language Model-Based Agents for Software Engineering: A Survey4 Sep 2024
- 2024Agentless: Demystifying LLM-based Software Engineering Agents1 Jul 2024
- 2024CoSQA+: Pioneering the Multi-Choice Code Search Benchmark with Test-Driven Agents17 Jun 2024
- 2024RepairAgent: An Autonomous, LLM-Based Agent for Program Repair25 Mar 2024
- 2025Failure-Driven Workflow Refinementcited by 19
- 2024RepairBench: Leaderboard of Frontier Models for Program Repaircited by 9
- 2025The Art of Repair: Optimizing Iterative Program Repair with Instruction-Tuned Modelscited by 7
- 2025From Benchmark Data To Applicable Program Repair: An Experience Reportcited by 0
- 2025Failure-Driven Workflow Refinement11 Oct 2025
- 2025From Benchmark Data To Applicable Program Repair: An Experience Report22 Aug 2025
- 2025The Art of Repair: Optimizing Iterative Program Repair with Instruction-Tuned Models5 May 2025
- 2024RepairBench: Leaderboard of Frontier Models for Program Repair27 Sep 2024