An automatically created novel bug dataset and its validation in bug prediction

Abstract

Bugs are inescapable during software development due to frequent code changes, tight deadlines, etc.; therefore, it is important to have tools to find these errors. One way of performing bug identification is to analyze the characteristics of buggy source code elements from the past and predict the present ones based on the same characteristics, using e.g. machine learning models. To support model building tasks, code elements and their characteristics are collected in so-called bug datasets which serve as the input for learning. We present the BugHunter Dataset: a novel kind of automatically constructed and freely available bug dataset containing code elements (files, classes, methods) with a wide set of code metrics and bug information. Other available bug datasets follow the traditional approach of gathering the characteristics of all source code elements (buggy and non-buggy) at only one or more pre-selected release versions of the code. Our approach, on the other hand, captures the buggy and the fixed states of the same source code elements from the narrowest timeframe we can identify for a bug’s presence, regardless of release versions. To show the usefulness of the new dataset, we built and evaluated bug prediction models and achieved F-measure values over 0.74.

Publication
Journal of Systems and Software, 169:110691

BibTeX:

@Article{FGG20,
    author   = {Ferenc, Rudolf and Gyimesi, P{\'e}ter and Gyimesi, G{\'a}bor and T{\'o}th, Zolt{\'a}n and Gyim{\'o}thy, Tibor},
    journal  = {Journal of Systems and Software},
    title    = {An automatically created novel bug dataset and its validation in bug prediction},
    year     = {2020},
    issn     = {0164-1212},
    month    = nov,
    note     = {Open Access},
    pages    = {110691},
    volume   = {169},
    doi      = {10.1016/j.jss.2020.110691},
    keywords = {Bug dataset, Bug prediction, Static code analysis, Code metrics, Machine learning, GitHub},
    url      = {http://www.sciencedirect.com/science/article/pii/S0164121220301436},
}