Towards an Understanding of Change Types in Bug Fixing Code.

Yangyang Zhao,Hareton Leung,Yibiao Yang,Yuming Zhou,Baowen Xu
DOI: https://doi.org/10.1016/j.infsof.2017.02.003
IF: 3.9
2017-01-01
Information and Software Technology
Abstract:ContextAs developing high quality software becomes increasingly challenging because of the explosive growth of scale and complexity, bugs become inevitable in software systems. The knowledge of bugs will naturally guide software development and hence improve software quality. As changes in bug fixing code provide essential insights into the original bugs, analyzing change types is an intuitive and effective way to understand the characteristics of bugs. ObjectiveIn this work, we conduct a thorough empirical study to investigate the characteristics of change types in bug fixing code. MethodWe first propose a new change classification scheme with 5 change types and 9 change subtypes. We then develop an automatic classification tool CTforC to categorize changes. To gain deeper insights into change types, we perform our empirical study based on three questions from three perspectives, i.e. across project, across domain and across version. ResultsBased on 17 versions of 11 systems with thousands of faulty functions, we find that: (1) across project: the frequencies of change subtypes are significantly similar across most studied projects; interface related code changes are the most frequent bug-fixing changes (74.6% on average); most of faulty functions (65.2% on average) in studied projects are finally fixed by only one or two change subtypes; function call statements are likely to be changed together with assignment statements or branch statements; (2) across domain: the frequencies of change subtypes share similar trends across studied domains; changes on function call, assignment, and branch statements are often the three most frequent changes in studied domains; and (3) across version: change subtypes occur with similar frequencies across studied versions, and the most common subtype pairs tend to be same. ConclusionOur experimental results improve the understanding of changes in bug fixing code and hence the understanding of the characteristics of bugs.
What problem does this paper attempt to address?