[论文解读] Factors Influencing the Quality of AI-Generated Code: A Synthesis of Empirical Evidence
系统性文献综述,汇总关于影响AI生成源代码质量的因素的实证证据,强调人因、AI系统特性与人机交互动态。
Context: The rapid adoption of AI-assisted code generation tools, such as large language models (LLMs), is transforming software development practices. While these tools promise significant productivity gains, concerns regarding the quality, reliability, and security of AI-generated code are increasingly reported in both academia and industry. --Objective: This study aims to systematically synthesize existing empirical evidence on the factors influencing the quality of AI-generated source code and to analyze how these factors impact software quality outcomes across different evaluation contexts. --Method: We conducted a systematic literature review (SLR) following established guidelines, supported by an AI-assisted workflow with human oversight. A total of 24 primary studies were selected through a structured search and screening process across major digital libraries. Data were extracted and analyzed using qualitative, pattern-based evidence synthesis. --Results: The findings reveal that code quality in AI-assisted development is influenced by a combination of human factors, AI system characteristics, and human AI interaction dynamics. Key influencing factors include prompt design, task specification, and developer expertise. The results also show variability in quality outcomes such as correctness, security, maintainability, and complexity across studies, with both improvements and risks reported. --Conclusion: AI-assisted code generation represents a socio-technical shift in software engineering, where achieving high-quality outcomes depends on both technological and human factors. While promising, AI-generated code requires careful validation and integration into development workflows.
研究动机与目标
- 通过AI辅助代码生成工具的快速采用及对质量、可靠性与安全性的担忧来推动研究。
- 系统性综合现有关于影响AI生成代码质量的因素的实证证据。
- 分析这些因素在不同评估情境下对软件质量结果的影响。
提出的方法
- 按照既定指南进行系统文献综述(SLR)。
- 使用AI辅助工作流并有人工监督来支持研究选择与数据提取。
- 通过对主要数字图书馆的结构化检索与筛选,选择24项原始研究。
- 使用定性、基于模式的证据综合提取与分析数据。
实验结果
研究问题
- RQ1在经验研究中,哪些因素影响AI生成源代码的质量?
- RQ2这些因素如何影响软件质量结果,如正确性、安全性、可维护性和复杂性?
- RQ3人因、AI系统特征和人机交互动态如何交互以形塑代码质量?
- RQ4在不同评估情境下,质量结果的差异有哪些?
主要发现
- AI辅助开发中的代码质量源于人因、AI系统特征和交互动态的综合作用。
- 关键影响因素包括提示设计、任务规范与开发者专业知识。
- 质量结果在各研究中存在差异,对正确性、安全性、可维护性和复杂性既有提升也存在风险。
- AI辅助代码生成代表一种社经技术转变,需要谨慎验证并整合到工作流程中。
阅读本论文
在 Nubint 阅读器中打开原文,边读边就任意段落提问。
在 Nubint 中阅读本论文本解读由 AI 根据论文原文生成,引用前请核对原文。