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

使用漏洞信息检测来自Source Code的相关漏洞

Detect Related Bugs from Source Code Using Bug Information

Deqing Wang, Mengxiang Lin, Hui Zhang, Hongping Hu

摘要:

开源项目在开发和维护过程中经常会维护开放的bug仓库,报告者在提交bug时往往会直接或含蓄地指出bug发生的原因。关于bug的注释对于开发人员定位和修复bug是非常有价值的。同时,在大型软件中,程序员根据相同的逻辑重写或重载某些方法是非常常见的。如果一个方法导致了一个bug,那么很明显,其他重写或重载的方法可能会导致相关或类似的bug。在本文中,我们提出并实现了一个工具Rebug- Detector,它使用错误信息和代码特征来检测相关的错误。该方法首先从缺陷库中的缺陷信息中提取缺陷特征;其次从源代码中定位缺陷方法,并提取缺陷方法的代码特征;然后计算每个被覆盖或重载的方法与缺陷方法之间的相似度;最后确定哪个方法可能导致潜在的相关或相似缺陷。我们在一个开源项目Apache Lucene-Java上评估Rebug-Detector。我们的工具总共检测到61个相关的错误,其中包括21个真正的错误和10个可疑的错误,它花费了我们大约15.5分钟。结果表明,我们的工具提取的错误特征和代码特征是有用的,以发现在现有的项目中的真正的错误。

英文摘要:

Open source projects often maintain open bug repositories during development and maintenance, and the reporters often point out straightly or implicitly the reasons why bugs occur when they submit them. The comments about a bug are very valuable for developers to locate and fix the bug. Meanwhile, it is very common in large software for programmers to override or overload some methods according to the same logic. If one method causes a bug, it is obvious that other overridden or overloaded methods maybe cause related or similar bugs. In this paper, we propose and implement a tool Rebug- Detector, which detects related bugs using bug information and code features. Firstly, it extracts bug features from bug information in bug repositories; secondly, it locates bug methods from source code, and then extracts code features of bug methods; thirdly, it calculates similarities between each overridden or overloaded method and bug methods; lastly, it determines which method maybe causes potential related or similar bugs. We evaluate Rebug-Detector on an open source project: Apache Lucene-Java. Our tool totally detects 61 related bugs, including 21 real bugs and 10 suspected bugs, and it costs us about 15.5 minutes. The results show that bug features and code features extracted by our tool are useful to find real bugs in existing projects.

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

↑