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

基于统计语言模型的熵导谱缺陷定位

Entropy Guided Spectrum Based Bug Localization Using Statistical Language Model

Saikat Chakraborty, Yujian Li, Matt Irvine, Ripon Saha, Baishakhi Ray

摘要:

在软件开发和维护阶段,定位bug是一项具有挑战性的工作,但也是最重要的工作之一,因为没有确定的规则来识别所有类型的bug。现有的自动错误定位工具使用各种基于测试覆盖率,预先确定的错误模式,或与错误报告的文本相似性,排名可疑的程序元素。然而,由于这些技术依赖于来自单一来源的信息,当相应的来源信息不足时,它们经常受到影响。例如,流行的基于频谱的错误定位可能无法在编写得很差的测试套件下工作。在本文中,我们提出了一种新的方法,EnSpec,指导频谱为基础的错误本地化使用代码熵,一个度量,基本上表示自然的代码来自统计语言模型。我们的直觉是,由于错误代码是高熵的,基于频谱的错误定位与代码熵将更强大的区别错误行与非错误行。我们在原型中实现了我们的想法,并对两个流行的公开基准进行了广泛的评估。我们的研究结果表明,EnSpec优于一个国家的最先进的频谱为基础的错误定位技术。

英文摘要:

Locating bugs is challenging but one of the most important activities in software development and maintenance phase because there are no certain rules to identify all types of bugs. Existing automatic bug localization tools use various heuristics based on test coverage, pre-determined buggy patterns, or textual similarity with bug report, to rank suspicious program elements. However, since these techniques rely on information from single source, they often suffer when the respective source information is inadequate. For instance, the popular spectrum based bug localization may not work well under poorly written test suite. In this paper, we propose a new approach, EnSpec, that guides spectrum based bug localization using code entropy, a metric that basically represents naturalness of code derived from a statistical language model. Our intuition is that since buggy code are high entropic, spectrum based bug localization with code entropy would be more robust in discriminating buggy lines vs. non-buggy lines. We realize our idea in a prototype, and performed an extensive evaluation on two popular publicly available benchmarks. Our results demonstrate that EnSpec outperforms a state-of-the-art spectrum based bug localization technique.

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

↑