arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2103.12447cs.SE
收藏

我们可以从程序员如何调试代码中学到什么

What we can learn from how programmers debug their code

Thomas Hirsch, Birgit Hofer

摘要:

研究人员已经开发了许多调试方法来帮助程序员在调试过程中,但这些方法很少在实践中使用。在本文中,我们将探讨程序员如何调试他们的代码,以及研究人员在开发调试方法时应该考虑什么。我们进行了一个在线问卷调查,102名程序员提供了最近修复的错误的信息。我们发现大多数bug(69.6%)是语义bug.内存和并发性bug不那么频繁地发生(6.9%和8.8%),但它们消耗更多的调试时间。定位一个bug比复制和修复它更困难,程序员通常只使用IDE内置的工具进行调试。此外,程序员在调试时经常使用复制-观察-演绎模式。这些结果表明,调试支持是特别有价值的内存和并发错误。此外,研究人员应该专注于故障定位阶段,并将他们的工具集成到常用的IDE中。

英文摘要:

Researchers have developed numerous debugging approaches to help programmers in the debugging process, but these approaches are rarely used in practice. In this paper, we investigate how programmers debug their code and what researchers should consider when developing debugging approaches. We conducted an online questionnaire where 102 programmers provided information about recently fixed bugs. We found that the majority of bugs (69.6 %) are semantic bugs. Memory and concurrency bugs do not occur as frequently (6.9 % and 8.8 %), but they consume more debugging time. Locating a bug is more difficult than reproducing and fixing it. Programmers often use only IDE build-in tools for debugging. Furthermore, programmers frequently use a replication-observation-deduction pattern when debugging. These results suggest that debugging support is particularly valuable for memory and concurrency bugs. Furthermore, researchers should focus on the fault localization phase and integrate their tools into commonly used IDEs.

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

↑