High-quality answers in technical Q&A platforms like Stack Overflow (SO) are crucial as they directly influence software development practices. Poor-quality answers can introduce inefficiencies, bugs, and security vulnerabilities, and thus increase maintenance costs and technical debt in production software. To improve content quality, SO allows collaborative editing, where users revise answers to enhance clarity, correctness, and formatting. Several studies have examined rejected edits and identified the causes of rejection. However, prior research has not systematically assessed whether accepted edits enhance key quality dimensions. While one study investigated the impact of edits on C/C++ vulnerabilities, broader quality aspects remain unexplored. In this study, we analyze 94,994 Python-related answers that have at least one accepted edit to determine whether edits improve (1) semantic relevance, (2) code usability, (3) code complexity, (4) security vulnerabilities, (5) code optimization, and (6) readability. Our findings show both positive and negative effects of edits. While 53.3% of edits improve how well answers match questions, 38.1% make them less relevant. Some previously broken code (9%) becomes executable, yet working code (14.7%) turns non-parsable after edits. Many edits increase complexity (32.3%), making code harder to maintain. Instead of fixing security issues, 20.5% of edits introduce additional issues. Even though 51.0% of edits optimize performance, execution time still increases overall. Readability also suffers, as 49.7% of edits make code harder to read. This study highlights the inconsistencies in editing outcomes and provides insights into how edits impact software maintainability, security, and efficiency that might caution users and moderators and help future improvements in collaborative editing systems.


翻译:在Stack Overflow(SO)等技术问答平台中,高质量的答案至关重要,因为它们直接影响软件开发实践。低质量答案可能导致效率低下、程序缺陷和安全漏洞,从而增加生产软件的维护成本和技术债务。为提升内容质量,SO允许协作编辑,即用户通过修订答案来提高其清晰度、正确性和格式规范性。已有若干研究考察了被拒绝的编辑并识别了拒绝原因。然而,先前研究尚未系统评估已接受的编辑是否提升了关键质量维度。尽管有一项研究探讨了编辑对C/C++代码漏洞的影响,但更广泛的质量维度仍有待探索。本研究分析了94,994条至少接受过一次编辑的Python相关答案,以评估编辑是否改善了以下六个方面:(1)语义相关性,(2)代码可用性,(3)代码复杂度,(4)安全漏洞,(5)代码优化,以及(6)可读性。我们的研究结果表明编辑同时具有正面和负面影响。虽然53.3%的编辑提升了答案与问题的匹配度,但38.1%的编辑却降低了相关性。部分先前无法运行的代码(9%)在编辑后变得可执行,但同时有原本可运行的代码(14.7%)在编辑后变得无法解析。许多编辑增加了代码复杂度(32.3%),使其更难以维护。不仅未能修复安全问题,20.5%的编辑反而引入了新的安全问题。尽管51.0%的编辑优化了性能,但总体执行时间仍然增加。可读性也受到影响,49.7%的编辑使代码更难以阅读。本研究揭示了编辑结果的不一致性,深入剖析了编辑如何影响软件的可维护性、安全性和效率,这些发现可为用户和版主提供警示,并有助于未来协作编辑系统的改进。

0
下载
关闭预览

相关内容

代码(Code)是专知网的一个重要知识资料文档板块,旨在整理收录论文源代码、复现代码,经典工程代码等,便于用户查阅下载使用。
FlowQA: Grasping Flow in History for Conversational Machine Comprehension
专知会员服务
34+阅读 · 2019年10月18日
Stabilizing Transformers for Reinforcement Learning
专知会员服务
60+阅读 · 2019年10月17日
Transferring Knowledge across Learning Processes
CreateAMind
29+阅读 · 2019年5月18日
Unsupervised Learning via Meta-Learning
CreateAMind
44+阅读 · 2019年1月3日
STRCF for Visual Object Tracking
统计学习与视觉计算组
15+阅读 · 2018年5月29日
Focal Loss for Dense Object Detection
统计学习与视觉计算组
12+阅读 · 2018年3月15日
IJCAI | Cascade Dynamics Modeling with Attention-based RNN
KingsGarden
13+阅读 · 2017年7月16日
国家自然科学基金
13+阅读 · 2017年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
2+阅读 · 2014年12月31日
VIP会员
相关资讯
Transferring Knowledge across Learning Processes
CreateAMind
29+阅读 · 2019年5月18日
Unsupervised Learning via Meta-Learning
CreateAMind
44+阅读 · 2019年1月3日
STRCF for Visual Object Tracking
统计学习与视觉计算组
15+阅读 · 2018年5月29日
Focal Loss for Dense Object Detection
统计学习与视觉计算组
12+阅读 · 2018年3月15日
IJCAI | Cascade Dynamics Modeling with Attention-based RNN
KingsGarden
13+阅读 · 2017年7月16日
相关基金
国家自然科学基金
13+阅读 · 2017年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
2+阅读 · 2014年12月31日
Top
微信扫码咨询专知VIP会员