arXivDaily arXiv每日学术速递 周一至周五更新
感恩节,周五至周末无更新,大家顺遂。周一再来吧
arXiv 2604.06373cs.SEcs.AI
收藏

超越功能性正确性:AI IDE生成大规模项目的 设计问题

Beyond Functional Correctness: Design Issues in AI IDE-Generated Large-Scale Projects

School of Computer Science, Wuhan University(武汉大学计算机学院);School of Mathematical and Computational Sciences, Massey University(梅西大学数学与计算科学学院);School of Computer Science, Nanjing University of Science and Technology(南京理工大学计算机科学与工程学院);School of Computer Science, Central China Normal University(华中师范大学计算机学院);School of Computing Technologies, RMIT University(RMIT大学计算技术学院)

Syed Mohammad Kashif, Ruiyin Li, Peng Liang, Amjed Tahir, Qiong Feng, Zengyang Li, Mojtaba Shahin

AI总结:

本文研究了AI IDE生成大规模项目的功能正确性和设计问题,通过FD-HITL框架生成10个项目,发现存在大量设计缺陷,需专业开发者审查。

摘要:

新一代AI编码工具,包括具备代理能力的AI IDE,能够在项目上下文中生成代码。这些AI IDE被认为能够大规模生成项目级代码,但缺乏关于其生成大规模软件系统的能力和潜在设计问题的实证证据。为此,我们研究了Cursor在生成大规模项目的能力和项目设计质量。首先,我们提出了一个以特征驱动的人在回路(FD-HITL)框架,系统地指导项目生成。我们使用FD-HITL框架在三个应用领域和多种技术下生成10个项目。我们通过手动评估这些项目的功能正确性,获得平均功能正确性得分为91%。接下来,我们使用两个静态分析工具CodeScene和SonarQube分析生成的项目,以检测设计问题。我们识别出1,305个设计问题,分为9类,由CodeScene识别出3,193个问题,分为11类。我们的发现显示:(1)当使用FD-HITL框架时,Cursor可以生成功能性的大规模项目,平均有16,965行代码和114个文件;(2)生成的项目仍然存在设计问题,可能对长期可维护性和可扩展性构成风险,需要经验丰富的开发者仔细审查;(3)最普遍的问题包括代码重复、高代码复杂度、大方法、框架最佳实践违反、异常处理问题和可访问性问题;(4)这些设计问题违反了设计原则,如SRP、SoC和DRY。复制包位于https://github.com/Kashifraz/DIinAGP

英文摘要:

New generation of AI coding tools, including AI-powered IDEs equipped with agentic capabilities, can generate code within the context of the project. These AI IDEs are increasingly perceived as capable of producing project-level code at scale. However, there is limited empirical evidence on the extent to which they can generate large-scale software systems and what design issues such systems may exhibit. To address this gap, we conducted a study to explore the capability of Cursor in generating large-scale projects and to evaluate the design quality of projects generated by Cursor. First, we propose a Feature-Driven Human-In-The-Loop (FD-HITL) framework that systematically guides project generation from curated project descriptions. We generated 10 projects using Cursor with the FD-HITL framework across three application domains and multiple technologies. We assessed the functional correctness of these projects through manual evaluation, obtaining an average functional correctness score of 91%. Next, we analyzed the generated projects using two static analysis tools, CodeScene and SonarQube, to detect design issues. We identified 1,305 design issues categorized into 9 categories by CodeScene and 3,193 issues in 11 categories by SonarQube. Our findings show that (1) when used with the FD-HITL framework, Cursor can generate functional large-scale projects averaging 16,965 LoC and 114 files; (2) the generated projects nevertheless contain design issues that may pose long-term maintainability and evolvability risks, requiring careful review by experienced developers; (3) the most prevalent issues include Code Duplication, high Code Complexity, Large Methods, Framework Best-Practice Violations, Exception-Handling Issues and Accessibility Issues; (4) these design issues violate design principles such as SRP, SoC, and DRY. The replication package is at https://github.com/Kashifraz/DIinAGP

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑