MaintainCoder: Maintainable Code Generation Under Dynamic Requirements
Zhengren Wang, Rui Ling, Chufan Wang, Yongan Yu, Sizhe Wang, Zhiyu Li, Feiyu Xiong, Wentao Zhang
Abstract
Modern code generation has made significant strides in functional correctness and execution efficiency. However, these systems often overlook a critical dimension in real-world software development: maintainability. To handle dynamic requirements with minimal rework, we propose MaintainCoder as a pioneering solution. It integrates the Waterfall model, design patterns, and multi-agent collaboration to systematically enhance cohesion, reduce coupling, achieving clear responsibility boundaries and better maintainability. We also introduce Maintain-Bench, a benchmark comprising requirement changes and novel dynamic metrics on maintenance efforts. Experiments demonstrate that existing code generation methods struggle to meet maintainability standards when requirements evolve. In contrast, MaintainCoder improves dynamic maintainability metrics by more than 60% with even higher correctness of initial codes. Furthermore, while static metrics fail to accurately reflect maintainability and even contradict each other, our proposed dynamic metrics exhibit high consistency. Our work not only provides the foundation for maintainable code generation, but also highlights the need for more realistic and comprehensive code generation research. Resources: https://github.com/IAAR-Shanghai/MaintainCoder.
Ask Lune
Know this paper in minutes, not an afternoon.
Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.
2 top-tier papers have cited it since. Know what they found before your reviewers do.
Lune can draw on
the full paper · the top-tier papers that cite it · related work
Free to start. No credit card required.
Lineage
- RepoBench: Benchmarking Repository-Level Code Auto-Completion Systems cites CodeGen: An Open Large Language Model for Code with Multi-Turn Program Synthesis
- SWE-agent: Agent-Computer Interfaces Enable Automated Software Engineering cites RepoBench: Benchmarking Repository-Level Code Auto-Completion Systems
- SWE-agent: Agent-Computer Interfaces Enable Automated Software Engineering cites SWE-bench: Can Language Models Resolve Real-world Github Issues?
- CodeFlowBench: A Multi-turn, Iterative Benchmark for Complex Code Generation cites CodeGen: An Open Large Language Model for Code with Multi-Turn Program Synthesis
- CodeFlowBench: A Multi-turn, Iterative Benchmark for Complex Code Generation cites Magicoder: Empowering Code Generation with OSS-Instruct
- Magicoder: Empowering Code Generation with OSS-Instruct cites CodeGen: An Open Large Language Model for Code with Multi-Turn Program Synthesis
- Magicoder: Empowering Code Generation with OSS-Instruct cites SWE-bench: Can Language Models Resolve Real-world Github Issues?
- Sakura: An Approach for Generating Complex Tests from Natural Language Test Descriptions cites SWE-bench: Can Language Models Resolve Real-world Github Issues?
- Sakura: An Approach for Generating Complex Tests from Natural Language Test Descriptions cites SWE-agent: Agent-Computer Interfaces Enable Automated Software Engineering
Cited by top-tier papers2
- CodeFlowBench: A Multi-turn, Iterative Benchmark for Complex Code GenerationSizhe Wang, Zhengren Wang, Dongsheng Ma, Yongan Yu et al.ACL 2026 · 17 citations
- Sakura: An Approach for Generating Complex Tests from Natural Language Test DescriptionsTyler Stennett, Rangeet Pan, Bridget McGinn, Alessandro Orso et al.ISSTA 2026
Builds on9
- SWE-bench: Can Language Models Resolve Real-world Github Issues?Carlos E. Jimenez, John Yang, Alexander Wettig, Shunyu Yao et al.ICLR 2024 · 2,082 citations
- SWE-agent: Agent-Computer Interfaces Enable Automated Software EngineeringJohn Yang, Carlos E. Jimenez, Alexander Wettig, Kilian Lieret et al.NeurIPS 2024 · 2,059 citations
- RepoBench: Benchmarking Repository-Level Code Auto-Completion SystemsTianyang Liu, Canwen Xu, Julian J. McAuleyICLR 2024 · 338 citations
- Magicoder: Empowering Code Generation with OSS-InstructYuxiang Wei, Zhe Wang, Jiawei Liu, Yifeng Ding et al.ICML 2024 · 246 citations
- CodeGen: An Open Large Language Model for Code with Multi-Turn Program SynthesisErik Nijkamp, Bo Pang, Hiroaki Hayashi, Lifu Tu et al.ICLR 2023 · 234 citations
Related papers
- CollabCoder: Plan-Code Co-Evolution via Collaborative Decision-Making for Efficient Code GenerationDuy Tung Doan, Quang Huy Phung, Dzung Nguyen, Khac-Hoai Nam BuiACL Findings 2026
- OmniCode: A Benchmark for Evaluating Software Development AgentsAtharv Sonwane, Eng-Shen Tu, Wei-Chung Lu, Claas Beger et al.ACL Findings 2026
- MapCoder: Multi-Agent Code Generation for Competitive Problem SolvingMd. Ashraful Islam, Mohammed Eunus Ali, Md. Rizwan ParvezACL 2024 · 29 citations
- Self-Evolving Multi-Agent Collaboration Networks for Software DevelopmentYue Hu, Yuzhu Cai, Yaxin Du, Xinyu Zhu et al.ICLR 2025
- NL2Repo-Bench: Towards Long-Horizon Repository Generation Evaluation of Coding AgentsJingzhe Ding, Shengda Long, Changxin Pu, Ge Zhang et al.ICML 2026 · 37 citations
