COCO: Testing Code Generation Systems via Concretized Instructions
Not on the map. Why?
Abstract (arXiv)
Code generation systems have been extensively developed in recent years to generate source code based on natural language instructions. However, despite their advancements, these systems still face robustness issues where even slightly different instructions can result in significantly different code semantics. Robustness is critical for code generation systems, as it can have significant impacts on software development, software quality, and trust in the generated code. Although existing testing techniques for general text-to-text software can detect some robustness issues, they are limited in effectiveness due to ignoring the characteristics of code generation systems. In this work, we propose a novel technique COCO to test the robustness of code generation systems. It exploits the usage scenario of code generation systems to make the original programming instruction more concrete by incorporating features known to be contained in the original code. A robust system should maintain code semantics for the concretized instruction, and COCO detects robustness inconsistencies when it does not. We evaluated COCO on eight advanced code generation systems, including commercial tools such as Copilot and ChatGPT, using two widely-used datasets. Our results demonstrate the effectiveness of COCO in testing the robustness of code generation systems, outperforming two techniques adopted from general text-to-text software testing by 466.66% and 104.02%, respectively. Furthermore, concretized instructions generated by COCO can help reduce robustness inconsistencies by 18.35% to 53.91% through fine-tuning.
Key facts. Cited by 4 papers in the map (data through 14 Oct 2026). First posted on arXiv 25 Aug 2023.
Builds on
No reference list yet.
Built on by
Citing papers per year: 2023: 1; 2024: 2; 2025: 1.
4 papers.
- 2024Evolutionary Computation in the Era of Large Language Model: Survey and Roadmapcited by 90
- 2023Turbulence: Systematically and Automatically Testing Instruction-Tuned Large Language Models for Codecited by 9
- 2024Chain of Targeted Verification Questions to Improve the Reliability of Code Generated by LLMscited by 3
- 2025Infogen: Generating Complex Statistical Infographics from Documentscited by 2
- 2025Infogen: Generating Complex Statistical Infographics from Documents26 Jul 2025
- 2024Chain of Targeted Verification Questions to Improve the Reliability of Code Generated by LLMs22 May 2024
- 2024Evolutionary Computation in the Era of Large Language Model: Survey and Roadmap18 Jan 2024
- 2023Turbulence: Systematically and Automatically Testing Instruction-Tuned Large Language Models for Code22 Dec 2023