Bug detection and prevention is one of the most important goals of software quality assurance. Nowadays, many of the major problems faced by developers can be detected or even fixed fully or partially with automatic tools. However, recent works explored that there exists a substantial amount of simple yet very annoying errors in code-bases, which are easy to fix, but hard to detect as they do not hinder the functionality of the given product in a major way. Programmers introduce such errors accidentally, mostly due to inattention. Using the ManySStuBs4J dataset, which contains many simple, stupid bugs, found in GitHub repositories written in the Java programming language, we investigated the history of such bugs. We were interested in properties such as: How long do such bugs stay unnoticed in code-bases? Whether they are typically fixed by the same developer who introduced them? Are they introduced with the addition of new code or caused more by careless modification of existing code? We found that most of such stupid bugs lurk in the code for a long time before they get removed. We noticed that the developer who made the mistake seems to find a solution faster, however less then half of SStuBs are fixed by the same person. We also examined PMD's performance when to came to flagging lines containing SStuBs, and found that similarly to SpotBugs, it is insufficient when it comes to finding these types of errors. Examining the life-cycle of such bugs allows us to better understand their nature and adjust our development processes and quality assurance methods to better support avoiding them.
翻译:错误的检测和预防是软件质量保证最重要的目标之一。 如今, 开发者面临的许多主要问题都可以通过自动工具来检测, 甚至完全或部分地用自动工具来修正。 但是, 最近的工作探索了在代码库中存在大量简单但非常烦人的错误, 这些错误很容易修复, 但很难检测, 因为它们不会妨碍给定产品的功能。 程序员不小心地引入了这些错误, 大多是无意的。 使用 ManySStuBs4J 数据集, 该数据集包含许多简单的、 愚蠢的错误, 在 GitHub 存储器中找到的都是以 Java 编程语言编写的, 我们调查了这些错误的历史。 我们感兴趣的属性如下: 这种错误在代码库中被忽略多久? 这些错误是否通常由推出这些错误的开发者来固定, 因为它们不会妨碍给给特定产品的功能。 我们发现大多数愚蠢的错误在代码中潜伏了很长一段时间, 在它们被删除之前, 我们发现错误的开发者似乎会找到一个更好的解决方案, 而它们的底线, 当我们找到了这样的底线, 当我们找到了这样的底线的底线, 当我们找到了这样的底线的底线时, 当我们找到了这些底的动作的动作的动作是更好的方法的时候, 我们找到了更精确的动作, 当我们找到了它们的时候, 我们的底底底的底的底的底线, 找到了了。