Nuances are the Key: Unlocking ChatGPT to Find Failure-Inducing Tests with Differential Prompting
Not on the map. Why?
Abstract (arXiv)
Automatically detecting software failures is an important task and a longstanding challenge. It requires finding failure-inducing test cases whose test input can trigger the software's fault, and constructing an automated oracle to detect the software's incorrect behaviors. Recent advancement of large language models (LLMs) motivates us to study how far this challenge can be addressed by ChatGPT, a state-of-the-art LLM. Unfortunately, our study shows that ChatGPT has a low probability (28.8%) of finding correct failure-inducing test cases for buggy programs. A possible reason is that finding failure-inducing test cases requires analyzing the subtle code differences between a buggy program and its correct version. When these two versions have similar syntax, ChatGPT is weak at recognizing subtle code differences. Our insight is that ChatGPT's performance can be substantially enhanced when ChatGPT is guided to focus on the subtle code difference. We have an interesting observation that ChatGPT is effective in inferring the intended behaviors of a buggy program. The intended behavior can be leveraged to synthesize programs, in order to make the subtle code difference between a buggy program and its correct version (i.e., the synthesized program) explicit. Driven by this observation, we propose a novel approach that synergistically combines ChatGPT and differential testing to find failure-inducing test cases. We evaluate our approach on Quixbugs (a benchmark of buggy programs), and compare it with state-of-the-art baselines, including direct use of ChatGPT and Pynguin. The experimental result shows that our approach has a much higher probability (77.8%) of finding correct failure-inducing test cases, 2.7X as the best baseline.
Key facts. Cited by 23 papers in the map (data through 7 Oct 2026). First posted on arXiv 23 Apr 2023.
Builds on
No reference list yet.
Built on by
Citing papers per year: 2023: 2; 2024: 10; 2025: 8; 2026: 3.
23 papers.
Sort:
By area:
- 2024SWT-Bench: Testing and Validating Real-World Bug-Fixes with Code Agentscited by 129
- 2024Large Language Models for Cyber Security: A Systematic Literature Reviewcited by 65
- 2023Using Large Language Models to Generate JUnit Tests: An Empirical Studycited by 53
- 2025LLMs in Software Security: A Survey of Vulnerability Detection Techniques and Insightscited by 44
- 2024Automatically Generating UI Code from Screenshot: A Divide-and-Conquer-Based Approachcited by 24
- 2025Agentic Bug Reproduction for Effective Automated Program Repair at Googlecited by 20
- 2024Bias and Volatility: A Statistical Framework for Evaluating Large Language Model's Stereotypes and the Associated Generation Inconsistencycited by 15
- 2024LLM-Powered Test Case Generation for Detecting Bugs in Plausible Programscited by 14
- 2024Output Format Biases in the Evaluation of Large Language Models for Code Translationcited by 9
- 2024When Fuzzing Meets LLMs: Challenges and Opportunitiescited by 8
- 2023FLAG: Finding Line Anomalies (in code) with Generative AIcited by 7
- 2025MultiFileTest: A Multi-File-Level LLM Unit Test Generation Benchmark and Impact of Error Fixing Mechanismscited by 4
11 more
- 2025Functional Consistency of LLM Code Embeddings: A Self-Evolving Data Synthesis Framework for Benchmarkingcited by 4
- 2024Thinking Before Running! Efficient Code Generation with Thorough Exploration and Optimal Refinementcited by 3
- 2024ZS4C: Zero-Shot Synthesis of Compilable Code for Incomplete Code Snippets using LLMscited by 2
- 2024Generative transformations and patterns in LLM-native approaches for software verification and falsificationcited by 2
- 2025Highlighting Case Studies in LLM Literature Review of Interdisciplinary System Sciencecited by 1
- 2025Leveraging Large Language Models for Command Injection Vulnerability Analysis in Python: An Empirical Study on Popular Open-Source Projectscited by 1
- 2025Empirical Study of Code Large Language Models for Binary Security Patch Detectioncited by 1
- 2025Large Language Models in Cybersecurity: Applications, Vulnerabilities, and Defense Techniquescited by 0
- 2026Multi-Large Language Model Orchestrated Severity Assessment of Clinical Records (MOSAIC)cited by 0
- 2026Evaluating and Mitigating the Misguidance Effect of Buggy Code in LLM-Generated Unit Testscited by 0
- 2026WitnessGym: Benchmarking Coding Agents on the Construction of Bug Witnessescited by 0
- 2026WitnessGym: Benchmarking Coding Agents on the Construction of Bug Witnesses29 Sep 2026
- 2026Evaluating and Mitigating the Misguidance Effect of Buggy Code in LLM-Generated Unit Tests24 Jul 2026
- 2026Multi-Large Language Model Orchestrated Severity Assessment of Clinical Records (MOSAIC)6 Jul 2026
- 2025Empirical Study of Code Large Language Models for Binary Security Patch Detection7 Sep 2025
- 2025Functional Consistency of LLM Code Embeddings: A Self-Evolving Data Synthesis Framework for Benchmarking27 Aug 2025
- 2025Large Language Models in Cybersecurity: Applications, Vulnerabilities, and Defense Techniques18 Jul 2025
- 2025Leveraging Large Language Models for Command Injection Vulnerability Analysis in Python: An Empirical Study on Popular Open-Source Projects21 May 2025
- 2025Highlighting Case Studies in LLM Literature Review of Interdisciplinary System Science16 Mar 2025
- 2025LLMs in Software Security: A Survey of Vulnerability Detection Techniques and Insights10 Feb 2025
- 2025MultiFileTest: A Multi-File-Level LLM Unit Test Generation Benchmark and Impact of Error Fixing Mechanisms10 Feb 2025
- 2025Agentic Bug Reproduction for Effective Automated Program Repair at Google3 Feb 2025
- 2024Thinking Before Running! Efficient Code Generation with Thorough Exploration and Optimal Refinement30 Dec 2024
11 more
- 2024Automatically Generating UI Code from Screenshot: A Divide-and-Conquer-Based Approach24 Jun 2024
- 2024SWT-Bench: Testing and Validating Real-World Bug-Fixes with Code Agents18 Jun 2024
- 2024Large Language Models for Cyber Security: A Systematic Literature Review8 May 2024
- 2024When Fuzzing Meets LLMs: Challenges and Opportunities25 Apr 2024
- 2024LLM-Powered Test Case Generation for Detecting Bugs in Plausible Programs16 Apr 2024
- 2024Generative transformations and patterns in LLM-native approaches for software verification and falsification14 Apr 2024
- 2024Output Format Biases in the Evaluation of Large Language Models for Code Translation25 Mar 2024
- 2024Bias and Volatility: A Statistical Framework for Evaluating Large Language Model's Stereotypes and the Associated Generation Inconsistency23 Feb 2024
- 2024ZS4C: Zero-Shot Synthesis of Compilable Code for Incomplete Code Snippets using LLMs25 Jan 2024
- 2023FLAG: Finding Line Anomalies (in code) with Generative AI22 Jun 2023
- 2023Using Large Language Models to Generate JUnit Tests: An Empirical Study30 Apr 2023
- 2024Large Language Models for Cyber Security: A Systematic Literature Reviewcited by 65
- 2023Using Large Language Models to Generate JUnit Tests: An Empirical Studycited by 53
- 2025LLMs in Software Security: A Survey of Vulnerability Detection Techniques and Insightscited by 44
- 2024Automatically Generating UI Code from Screenshot: A Divide-and-Conquer-Based Approachcited by 24
- 2024Bias and Volatility: A Statistical Framework for Evaluating Large Language Model's Stereotypes and the Associated Generation Inconsistencycited by 15
- 2024LLM-Powered Test Case Generation for Detecting Bugs in Plausible Programscited by 14
- 2024Output Format Biases in the Evaluation of Large Language Models for Code Translationcited by 9
- 2024When Fuzzing Meets LLMs: Challenges and Opportunitiescited by 8
- 2023FLAG: Finding Line Anomalies (in code) with Generative AIcited by 7
- 2025MultiFileTest: A Multi-File-Level LLM Unit Test Generation Benchmark and Impact of Error Fixing Mechanismscited by 4
- 2024ZS4C: Zero-Shot Synthesis of Compilable Code for Incomplete Code Snippets using LLMscited by 2
- 2024Generative transformations and patterns in LLM-native approaches for software verification and falsificationcited by 2
12 most cited of 18 All 18 (JSON)
- 2026Evaluating and Mitigating the Misguidance Effect of Buggy Code in LLM-Generated Unit Tests24 Jul 2026
- 2026Multi-Large Language Model Orchestrated Severity Assessment of Clinical Records (MOSAIC)6 Jul 2026
- 2025Empirical Study of Code Large Language Models for Binary Security Patch Detection7 Sep 2025
- 2025Large Language Models in Cybersecurity: Applications, Vulnerabilities, and Defense Techniques18 Jul 2025
- 2025Leveraging Large Language Models for Command Injection Vulnerability Analysis in Python: An Empirical Study on Popular Open-Source Projects21 May 2025
- 2025Highlighting Case Studies in LLM Literature Review of Interdisciplinary System Science16 Mar 2025
- 2025LLMs in Software Security: A Survey of Vulnerability Detection Techniques and Insights10 Feb 2025
- 2025MultiFileTest: A Multi-File-Level LLM Unit Test Generation Benchmark and Impact of Error Fixing Mechanisms10 Feb 2025
- 2024Automatically Generating UI Code from Screenshot: A Divide-and-Conquer-Based Approach24 Jun 2024
- 2024Large Language Models for Cyber Security: A Systematic Literature Review8 May 2024
- 2024When Fuzzing Meets LLMs: Challenges and Opportunities25 Apr 2024
- 2024LLM-Powered Test Case Generation for Detecting Bugs in Plausible Programs16 Apr 2024
12 newest of 18 All 18 (JSON)