paperbot · PL 论文追踪

全部论文 待读 收藏

P2 The Mind Is a Powerful Place: How Showing Code Comprehensibility Metrics Influences Code Understanding

思维具有强大影响力:展示代码可理解性度量如何影响代码理解
ICSE 2021 IEEE/ACM 43rd International Conference on Software Engineering (ICSE)2021匹配度 2/10 · 该论文研究静态代码分析工具展示的可理解性指标对开发者主观评分和认知的锚定效应,属于软件工程中的人因与实证研究;虽然涉及静态分析工具,但核心是开发者心理与度量验证,而非用户关注的PL与AI/LLM交叉、浮点程序分析或贝叶斯程序分析等方向。引用 19 inbox
Marvin Wyrich, Andreas Preikschat, Daniel Graziotin, Stefan Wagner
crossref: 2026-09-12dblp: 2026-09-12arxiv: 2026-09-12

AI 速览

一句话:随机双盲实验发现,展示代码可理解性指标值会显著且强烈地锚定开发者的主观可理解性评分,但不影响理解任务的耗时或正确率。

静态分析工具与 IDE 常向开发者展示代码质量相关度量,其中一些声称描述源代码可理解性,却缺乏充分验证,可能通过认知偏差影响开发者决策。本文研究软件度量是否会引发锚定效应。作者开展随机双盲实验,考察展示的可理解性度量值是否锚定开发者对代码可理解性的主观评分,是否影响完成理解任务的表现,以及哪些个体特征起作用。结果显示,展示的度量值对可理解性评分产生显著且很大的锚定效应;但未显著影响理解相关任务的耗时与正确率。鉴于锚定效应是最稳健的认知偏差之一,作者呼吁提高代码质量报告的责任意识,并让相应工具建立在科学证据之上。

问题
静态分析工具和 IDE 展示的代码可理解性度量缺乏验证,却可能通过锚定效应影响开发者的主观判断与决策,而该效应此前未被研究。
方法
开展随机双盲实验,向开发者展示代码可理解性度量值,测量其主观可理解性评分,并记录理解任务的耗时与正确率,同时分析个体特征的作用。
评估
结果显示度量值对可理解性评分有显著且较大的锚定效应,但对理解任务的耗时和正确率无显著影响。
原文摘要(Abstract)

Static code analysis tools and integrated development environments present developers with quality-related software metrics, some of which describe the understandability of source code. Software metrics influence overarching strategic decisions that impact the future of companies and the prioritization of everyday software development tasks. Several software metrics, however, lack in validation: we just choose to trust that they reflect what they are supposed to measure. Some of them were even shown to not measure the quality aspects they intend to measure. Yet, they influence us through biases in our cognitive-driven actions. In particular, they might anchor us in our decisions. Whether the anchoring effect exists with software metrics has not been studied yet. We conducted a randomized and double-blind experiment to investigate the extent to which a displayed metric value for source code comprehensibility anchors developers in their subjective rating of source code comprehensibility, whether performance is affected by the anchoring effect when working on comprehension tasks, and which individual characteristics might play a role in the anchoring effect. We found that the displayed value of a comprehensibility metric has a significant and large anchoring effect on a developer's code comprehensibility rating. The effect does not seem to affect the time or correctness when working on comprehension questions related to the code snippets under study. Since the anchoring effect is one of the most robust cognitive biases, and we have limited understanding of the consequences of the demonstrated manipulation of developers by non-validated metrics, we call for an increased awareness of the responsibility in code quality reporting and for corresponding tools to be based on scientific evidence.

链接与引用

DOI 原文 · arXiv · PDF(开放获取) · DBLP

BibTeX
@inproceedings{WyrichPG021,
  title = {The Mind Is a Powerful Place: How Showing Code Comprehensibility Metrics Influences Code Understanding},
  author = {Marvin Wyrich and Andreas Preikschat and Daniel Graziotin and Stefan Wagner},
  booktitle = {ICSE},
  year = {2021},
  doi = {10.1109/icse43902.2021.00055}
}