论文标题
氨:一种推导特定项目错误模式的方法
Ammonia: An Approach for Deriving Project-specific Bug Patterns
论文作者
论文摘要
查找和修复车辆代码是一项重要且成本密集的维护任务,静态分析(SA)是开发人员使用它的方法之一。 SA工具警告开发人员通过扫描其源代码通常发生的错误模式,从而使开发人员在发布软件之前为这些开发人员修复警告(潜在错误)的机会。通常,SA工具扫描任何软件项目共有的通用错误模式(例如NULL指针解除),而不是针对项目的特定模式。但是,过去的研究表明,这种缺乏可定制性是SA中严重的限制问题。因此,在本文中,我们提出了一种称为Ammonia的方法,该方法基于静态分析项目开发历史上的变化,作为识别特定项目的错误模式的手段。此外,我们工具确定的错误模式与一个开发人员或一个特定的提交无关,它们反映了整个项目,并补充了其他SA工具的警告,这些警告识别一般的错误模式。在此,我们报告了实施工具和方法在四个Java项目中的应用:Ant,Camel,Poi和Wicket。获得的结果表明,我们的工具可以在这四个项目中检测19个项目特定的错误模式。接下来,通过手动分析,我们确定其中六个更改模式是实际错误,并根据这些错误模式提交了拉的请求。结果,合并了五个拉的请求。
Finding and fixing buggy code is an important and cost-intensive maintenance task, and static analysis (SA) is one of the methods developers use to perform it. SA tools warn developers about potential bugs by scanning their source code for commonly occurring bug patterns, thus giving those developers opportunities to fix the warnings (potential bugs) before they release the software. Typically, SA tools scan for general bug patterns that are common to any software project (such as null pointer dereference), and not for project specific patterns. However, past research has pointed to this lack of customizability as a severe limiting issue in SA. Accordingly, in this paper, we propose an approach called Ammonia, which is based on statically analyzing changes across the development history of a project, as a means to identify project-specific bug patterns. Furthermore, the bug patterns identified by our tool do not relate to just one developer or one specific commit, they reflect the project as a whole and compliment the warnings from other SA tools that identify general bug patterns. Herein, we report on the application of our implemented tool and approach to four Java projects: Ant, Camel, POI, and Wicket. The results obtained show that our tool could detect 19 project specific bug patterns across those four projects. Next, through manual analysis, we determined that six of those change patterns were actual bugs and submitted pull requests based on those bug patterns. As a result, five of the pull requests were merged.