HEDF: A Method for Early Forecasting Software Defects Based on Human Error Mechanisms

As the primary cause of software defects, human error is the key to understanding, and perhaps to predicting and avoiding them. Little research has been done to predict defects on the basis of the cognitive errors that cause them. This paper proposes an approach to predicting software defects through knowledge about the cognitive mechanisms of human errors. Our theory is that the main process behind a software defect is that an error-prone scenario triggers human error modes, which psychologists have observed to recur across diverse activities. Software defects can then be predicted by identifying such scenarios, guided by this knowledge of typical error modes. The proposed idea emphasizes predicting the exact location and form of a possible defect. We conducted two case studies to demonstrate and validate this approach, with 55 programmers in a programming competition and 5 analysts serving as the users of the approach. We found it impressive that the approach was able to predict, at the requirement phase, the exact locations and forms of 7 out of the 22 (31.8%) specific types of defects that were found in the code. The defects predicted tended to be common defects: their occurrences constituted 75.7% of the total number of defects in the 55 developed programs; each of them was introduced by at least two persons. The fraction of the defects introduced by a programmer that were predicted was on average (over all programmers) 75%. Furthermore, these predicted defects were highly persistent through the debugging process. If the prediction had been used to successfully prevent these defects, this could have saved 46.2% of the debugging iterations. This excellent capability of forecasting the exact locations and forms of possible defects at the early phases of software development recommends the approach for substantial benefits to defect prevention and early detection.

[1]  Didar Zowghi,et al.  On the interplay between consistency, completeness, and correctness in requirements evolution , 2003, Inf. Softw. Technol..

[2]  Daoqiang Zhang,et al.  Two-Stage Cost-Sensitive Learning for Software Defect Prediction , 2014, IEEE Transactions on Reliability.

[3]  Harald C. Gall,et al.  Don't touch my code!: examining the effects of ownership on software quality , 2011, ESEC/FSE '11.

[4]  Witold Pedrycz,et al.  A comparative analysis of the efficiency of change metrics and static code attributes for defect prediction , 2008, 2008 ACM/IEEE 30th International Conference on Software Engineering.

[5]  Lech Madeyski,et al.  Which process metrics can significantly improve defect prediction models? An empirical study , 2014, Software Quality Journal.

[6]  Richard Torkar,et al.  Software fault prediction metrics: A systematic literature review , 2013, Inf. Softw. Technol..

[7]  Mary Shaw,et al.  Experiences and results from initiating field defect prediction and product test prioritization efforts at ABB Inc. , 2006, ICSE.

[8]  Mary Shaw,et al.  Selecting a Defect Prediction Model for Maintenance Resource Planning and Software Insurance , 2003 .

[9]  Françoise Détienne,et al.  Software Design — Cognitive Aspects , 2001, Practitioner Series.

[10]  Javam C. Machado,et al.  The prediction of faulty classes using object-oriented design metrics , 2001, J. Syst. Softw..

[11]  Bin Liu,et al.  The links between human error diversity and software diversity: Implications for fault diversity seeking , 2014, Sci. Comput. Program..

[12]  Anastasios A. Economides,et al.  Adaptive assessment of student's knowledge in programming courses , 2010, J. Comput. Assist. Learn..

[13]  Per Runeson,et al.  Guidelines for conducting and reporting case study research in software engineering , 2009, Empirical Software Engineering.

[14]  A. Fuqun Huang,et al.  A Taxonomy System to Identify Human Error Causes for Software Defects , 2012 .

[15]  William Marsh,et al.  Predicting software defects in varying development lifecycles using Bayesian nets , 2007, Inf. Softw. Technol..

[16]  Elaine J. Weyuker,et al.  The limited impact of individual developer data on software defect prediction , 2011, Empirical Software Engineering.

[17]  Karim O. Elish,et al.  Predicting defect-prone software modules using support vector machines , 2008, J. Syst. Softw..

[18]  W. Schnotz,et al.  A Reconsideration of Cognitive Load Theory , 2007 .

[19]  Tim Menzies,et al.  Data Mining Static Code Attributes to Learn Defect Predictors , 2007, IEEE Transactions on Software Engineering.

[20]  Bojan Cukic,et al.  Defect Prediction between Software Versions with Active Learning and Dimensionality Reduction , 2014, 2014 IEEE 25th International Symposium on Software Reliability Engineering.

[21]  Elaine J. Weyuker,et al.  Do too many cooks spoil the broth? Using the number of developers to enhance defect prediction models , 2008, Empirical Software Engineering.

[22]  Ingo Scholtes,et al.  Categorizing bugs with social networks: A case study on four open source software communities , 2013, 2013 35th International Conference on Software Engineering (ICSE).

[23]  H. Sharp Relating Code Faults to Human Developer Characteristics , 2015 .

[24]  R. Glaser Education and Thinking: The Role of Knowledge. , 1984 .

[25]  Nachiappan Nagappan,et al.  Predicting defects using network analysis on dependency graphs , 2008, 2008 ACM/IEEE 30th International Conference on Software Engineering.

[26]  Xin Yao,et al.  A Learning-to-Rank Approach to Software Defect Prediction , 2015, IEEE Transactions on Reliability.

[27]  Jeffrey C. Carver,et al.  Using a Cognitive Psychology Perspective on Errors to Improve Requirements Quality: An Empirical Investigation , 2016, 2016 IEEE 27th International Symposium on Software Reliability Engineering (ISSRE).

[28]  Michalis Faloutsos,et al.  Graph-based analysis and prediction for software evolution , 2012, 2012 34th International Conference on Software Engineering (ICSE).

[29]  Xiao Liu,et al.  An empirical study on software defect prediction with a simplified metric set , 2014, Inf. Softw. Technol..

[30]  Yi Peng,et al.  Ensemble of Software Defect Predictors: an AHP-Based Evaluation Method , 2011, Int. J. Inf. Technol. Decis. Mak..

[31]  Mark Harman,et al.  Regression testing minimization, selection and prioritization: a survey , 2012, Softw. Test. Verification Reliab..

[32]  Norman E. Fenton,et al.  A Critique of Software Defect Prediction Models , 1999, IEEE Trans. Software Eng..

[33]  Anas N. Al-Rabadi,et al.  A comparison of modified reconstructability analysis and Ashenhurst‐Curtis decomposition of Boolean functions , 2004 .

[34]  Joanne Bechta Dugan,et al.  Empirical Analysis of Software Fault Content and Fault Proneness Using Bayesian Methods , 2007, IEEE Transactions on Software Engineering.

[35]  Andreas Zeller,et al.  The impact of tangled code changes on defect prediction models , 2015, Empirical Software Engineering.

[36]  Barbara A. Kitchenham,et al.  An evaluation of some design metrics , 1990, Softw. Eng. J..

[37]  Premkumar T. Devanbu,et al.  Recalling the "imprecision" of cross-project defect prediction , 2012, SIGSOFT FSE.

[38]  G. Robert J. Hockey,et al.  Cognitive Diversity: A Structured Approach to Trapping Human Error , 1995, SAFECOMP.

[39]  Jens Rasmussen,et al.  Skills, rules, and knowledge; signals, signs, and symbols, and other distinctions in human performance models , 1983, IEEE Transactions on Systems, Man, and Cybernetics.

[40]  Harald C. Gall,et al.  Time variance and defect prediction in software projects , 2011, Empirical Software Engineering.

[41]  Wang Yichen Review of Software Psychology , 2013 .

[42]  Elliot Soloway,et al.  A model of software design , 1986, Int. J. Intell. Syst..

[43]  Michael D. Byrne,et al.  A Working Memory Model of a Common Procedural Error , 1997, Cogn. Sci..

[44]  Mohammad Alshayeb,et al.  Software defect prediction using ensemble learning on selected features , 2015, Inf. Softw. Technol..

[45]  Lorenzo Strigini,et al.  Fault Tolerance Against Design Faults , 2005 .

[46]  Henrique Madeira,et al.  The role of the insula in intuitive expert bug detection in computer code: an fMRI study , 2018, Brain Imaging and Behavior.

[47]  William Marsh,et al.  On the effectiveness of early life cycle defect prediction with Bayesian Nets , 2008, Empirical Software Engineering.

[48]  Victor R. Basili,et al.  The influence of organizational structure on software quality , 2008, 2008 ACM/IEEE 30th International Conference on Software Engineering.

[49]  Michael D. Byrne,et al.  Cue effectiveness in mitigating postcompletion errors in a routine procedural task , 2008, Int. J. Hum. Comput. Stud..

[50]  Per Runeson,et al.  An Empirical Evaluation of Regression Testing Based on Fix-Cache Recommendations , 2010, 2010 Third International Conference on Software Testing, Verification and Validation.

[51]  Brendan Murphy,et al.  Can developer-module networks predict failures? , 2008, SIGSOFT '08/FSE-16.

[52]  Harald C. Gall,et al.  Cross-project defect prediction: a large scale experiment on data vs. domain vs. process , 2009, ESEC/SIGSOFT FSE.

[53]  Meine van der Meulen,et al.  The Effectiveness of Software Diversity in a Large Population of Programs , 2008, IEEE Transactions on Software Engineering.

[54]  Barbara Kitchenham,et al.  What's up with software metrics? - A preliminary mapping study , 2010, J. Syst. Softw..

[55]  Xiaoyan Zhu,et al.  Does bug prediction support human developers? Findings from a Google case study , 2013, 2013 35th International Conference on Software Engineering (ICSE).

[56]  Akito Monden,et al.  An analysis of developer metrics for fault prediction , 2010, PROMISE '10.

[57]  J. Shaoul Human Error , 1973, Nature.

[58]  Tu Minh Phuong,et al.  Topic-based defect prediction: NIER track , 2011, 2011 33rd International Conference on Software Engineering (ICSE).

[59]  N. Nagappan,et al.  Use of relative code churn measures to predict system defect density , 2005, Proceedings. 27th International Conference on Software Engineering, 2005. ICSE 2005..