Toward an understanding of bug fix patterns

被引:161
作者
Pan, Kai [2 ]
Kim, Sunghun [1 ]
Whitehead, E. James, Jr. [2 ]
机构
[1] Hong Kong Univ Sci & Technol, Dept Comp Sci & Engn, Kowloon, Hong Kong, Peoples R China
[2] Univ Calif Santa Cruz, Dept Comp Sci, Santa Cruz, CA 95064 USA
关键词
Software bugs; Bug fix changes; Categorization of software faults; Software fault taxonomy; Software fault; Software error; Causes of software bugs; Algorithms; Measurement; Experimentation;
D O I
10.1007/s10664-008-9077-5
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
Twenty-seven automatically extractable bug fix patterns are defined using the syntax components and context of the source code involved in bug fix changes. Bug fix patterns are extracted from the configuration management repositories of seven open source projects, all written in Java ( Eclipse, Columba, JEdit, Scarab, ArgoUML, Lucene, and MegaMek). Defined bug fix patterns cover 45.7% to 63.3% of the total bug fix hunk pairs in these projects. The frequency of occurrence of each bug fix pattern is computed across all projects. The most common individual patterns are MC-DAP ( method call with different actual parameter values) at 14.9 - 25.5%, IF-CC ( change in if conditional) at 5.6-18.6%, and AS-CE ( change of assignment expression) at 6.0-14.2%. A correlation analysis on the extracted pattern instances on the seven projects shows that six have very similar bug fix pattern frequencies. Analysis of if conditional bug fix sub-patterns shows a trend towards increasing conditional complexity in if conditional fixes. Analysis of five developers in the Eclipse projects shows overall consistency with project-level bug fix pattern frequencies, as well as distinct variations among developers in their rates of producing various bug patterns. Overall, data in the paper suggest that developers have difficulty with specific code situations at surprisingly consistent rates. There appear to be broad mechanisms causing the injection of bugs that are largely independent of the type of software being produced.
引用
收藏
页码:286 / 315
页数:30
相关论文
共 27 条
[1]  
[Anonymous], 10441993 IEEE
[2]   SOFTWARE ERRORS AND COMPLEXITY - AN EMPIRICAL-INVESTIGATION [J].
BASILI, VR ;
PERRICONE, BT .
COMMUNICATIONS OF THE ACM, 1984, 27 (01) :42-52
[3]   Identification of software instabilities [J].
Bevan, J ;
Whitehead, EJ .
10TH WORKING CONFERENCE ON REVERSE ENGINEERING, PROCEEDINGS, 2003, :134-143
[4]   ORTHOGONAL DEFECT CLASSIFICATION - A CONCEPT FOR IN-PROCESS MEASUREMENTS [J].
CHILLAREGE, R ;
BHANDARI, IS ;
CHAAR, JK ;
HALLIDAY, MJ ;
MOEBUS, DS ;
RAY, BK ;
WONG, MY .
IEEE TRANSACTIONS ON SOFTWARE ENGINEERING, 1992, 18 (11) :943-956
[5]   SHOTGUN CORRELATIONS IN SOFTWARE MEASURES [J].
COURTNEY, RE ;
GUSTAFSON, DA .
SOFTWARE ENGINEERING JOURNAL, 1993, 8 (01) :5-13
[6]   Hipikat: Recommending pertinent software development artifacts [J].
Cubranic, D ;
Murphy, GC .
25TH INTERNATIONAL CONFERENCE ON SOFTWARE ENGINEERING, PROCEEDINGS, 2003, :408-418
[7]   Emulation of software faults: A field data study and a practical approach [J].
Duraes, Joao A. ;
Madeira, Henrique S. .
IEEE TRANSACTIONS ON SOFTWARE ENGINEERING, 2006, 32 (11) :849-867
[8]  
*ECL, 2006, ECL JAV DEV TOOLS JD
[9]  
Endres Albert., 1975, Proceedings: International Conference on Reliable Software, P327
[10]   Populating a release history database from version control and bug tracking systems [J].
Fischer, M ;
Pinzger, M ;
Gall, H .
INTERNATIONAL CONFERENCE ON SOFTWARE MAINTENANCE, PROCEEDINGS, 2003, :23-32