Ammonia: An Approach for Deriving Project-specific Bug Patterns

01/27/2020
by   Yoshiki Higo, et al.
0

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.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
09/06/2021

Find Bugs in Static Bug Finders

Static bug finders have been widely-adopted by developers to find bugs i...
research
05/22/2020

DevReplay: Automatic Repair with Editable Fix Pattern

Static analysis tools, or linters, detect violation of source code conve...
research
03/22/2021

Mea culpa: How developers fix their own simple bugs differently from other developers

In this work, we study how the authorship of code affects bug-fixing com...
research
08/05/2022

Bug-Fix Variants: Visualizing Unique Source Code Changes across GitHub Forks

Forking is a common practice for developers when building upon on alread...
research
08/22/2017

Finding Regressions in Projects under Version Control Systems

Version Control Systems (VCS) are frequently used to support development...
research
12/08/2017

Mining Fix Patterns for FindBugs Violations

In this paper, we first collect and track large-scale fixed and unfixed ...
research
03/10/2018

Learning Quick Fixes from Code Repositories

Code analyzers such as ErrorProne and FindBugs detect code patterns symp...

Please sign up or login with your details

Forgot password? Click here to reset