arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2401.14936cs.SEcs.HC
收藏

采用以人为中心的方法重新评估Java代码可读性模型

Reassessing Java Code Readability Models with a Human-Centered Approach

Agnia Sergeyuk, Olga Lvova, Sergey Titov, Anastasiia Serova, Farid Bagirov, Evgeniia Kirillova, Timofey Bryksin

AI总结:

本研究以人为中心的方法评估现有Java代码可读性模型用于大语言模型调整的效果,发现AI生成的简洁可执行代码易被双方判定为可读,但两类评估相关性有限,为后续LLM适配和CR模型优化指明方向。

摘要:

为确保大语言模型(LLMs)有效提升用户生产力,需对其进行调整。现有的代码可读性(CR)模型可指导这一适配工作。然而,这类模型在现代软件工程中的适用性存疑,因为它们往往不符合开发者对可读性的认知,且依赖过时代码。本研究评估了现有Java CR模型用于LLM调整的效果,衡量其与开发者对AI生成Java代码的评估之间的相关性。我们采用 repertory grid technique( repertory 网格技术),通过15名开发者识别出12个影响代码可读性的关键代码维度,随后由390名程序员在标注120段AI生成的代码片段时对这些维度进行评估。研究结果表明,当AI生成简洁且可执行的代码时,CR模型和开发者通常都认为其具备可读性。但两类评估之间的相关性有限,凸显了未来需进一步研究LLM调整的学习目标,以及预测模型中纳入的影响CR评估的维度。

英文摘要:

To ensure that Large Language Models (LLMs) effectively support user productivity, they need to be adjusted. Existing Code Readability (CR) models can guide this alignment. However, there are concerns about their relevance in modern software engineering since they often miss the developers' notion of readability and rely on outdated code. This research assesses existing Java CR models for LLM adjustments, measuring the correlation between their and developers' evaluations of AI-generated Java code. Using the Repertory Grid Technique with 15 developers, we identified 12 key code aspects influencing CR that were consequently assessed by 390 programmers when labeling 120 AI-generated snippets. Our findings indicate that when AI generates concise and executable code, it is often considered readable by CR models and developers. However, a limited correlation between these evaluations underscores the importance of future research on learning objectives for adjusting LLMs and on the aspects influencing CR evaluations included in predictive models.

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

↑