The competent programmer hypothesis states that most programmers are competent enough to create correct or almost correct source code. Because this implies that bugs should usually manifest through small variations of the correct code, the competent programmer hypothesis is one of the fundamental assumptions of mutation testing. Unfortunately, it is still unclear if the competent programmer hypothesis holds and past research presents contradictory claims. Within this article, we provide a new perspective on the competent programmer hypothesis and its relation to mutation testing. We try to re-create real-world bugs through chains of mutations to understand if there is a direct link between mutation testing and bugs. The lengths of these paths help us to understand if the source code is really almost correct, or if large variations are required. Our results indicate that while the competent programmer hypothesis seems to be true, mutation testing is missing important operators to generate representative real-world bugs.
翻译:称职程序员假说认为,多数程序员具备足够能力编写正确或近乎正确的源代码。由于该假说暗示缺陷通常表现为正确代码的微小变体,因此它成为变异测试的基础假设之一。遗憾的是,目前尚不清楚称职程序员假说是否成立,且过往研究呈现相互矛盾的结论。本文为称职程序员假说及其与变异测试的关系提供了新视角。我们尝试通过变异链重现真实世界中的缺陷,以探究变异测试与缺陷之间是否存在直接关联。这些路径的长度有助于我们判断源代码是否真正近乎正确,抑或需要较大的变异操作。研究结果表明,尽管称职程序员假说似乎成立,但变异测试缺乏生成具有代表性的真实世界缺陷的关键算子。