Using code quality features to predict bugs in procedural software systems

A wide range of metrics have been used as features to build bug (or fault) predictors. However, most of the existing predictors focus mostly on object-oriented (OO) systems, either because they rely on OO metrics or were evaluated mainly with OO systems. Procedural software systems (PSS), less addressed in bug prediction research, often suffer from maintainability problems because they typically consist of low-level applications, using for example preprocessors to cope with variability. Previous work evaluated sets of features (composed of static code metrics) proposed in existing approaches in the PSS context. However, explored metrics are limited to those that are part of traditional metric suites, being often associated with structural code properties. A type of information explored to a smaller extent in this context is the output of code quality tools that statically analyse source code, providing hints of code problems. In this paper, we investigate the use of information collected from quality tools to build bug predictors dedicated to PSS. We specify four features derived from code quality tools or associated with poor programming practices and evaluate the effectiveness of these features. Our evaluation shows that our proposed features improve bug predictors in our investigated context.

[1]  Cristiano Werner Araújo,et al.  On the Effectiveness of Bug Predictors with Procedural Systems: A Quantitative Study , 2017, FASE.

[2]  Banu Diri,et al.  Investigating the effect of dataset size, metrics sets, and feature selection techniques on software fault prediction problem , 2009, Inf. Sci..

[3]  Akito Monden,et al.  Software quality analysis by code clones in industrial legacy software , 2002, Proceedings Eighth IEEE Symposium on Software Metrics.

[4]  Andreas Zeller,et al.  Mining metrics to predict component failures , 2006, ICSE.

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

[6]  Taghi M. Khoshgoftaar,et al.  Choosing software metrics for defect prediction: an investigation on feature selection techniques , 2011, Softw. Pract. Exp..

[7]  Judith Masthoff,et al.  Group Recommender Systems: Combining Individual Models , 2011, Recommender Systems Handbook.

[8]  Andreas Zeller,et al.  It's not a bug, it's a feature: How misclassification impacts bug prediction , 2013, 2013 35th International Conference on Software Engineering (ICSE).

[9]  Martin Fowler,et al.  Refactoring - Improving the Design of Existing Code , 1999, Addison Wesley object technology series.

[10]  Michele Lanza,et al.  An extensive comparison of bug prediction approaches , 2010, 2010 7th IEEE Working Conference on Mining Software Repositories (MSR 2010).

[11]  Ian Witten,et al.  Data Mining , 2000 .

[12]  Lech Madeyski,et al.  Towards identifying software project clusters with regard to defect prediction , 2010, PROMISE '10.

[13]  Sebastian G. Elbaum,et al.  Code churn: a measure for estimating the impact of code change , 1998, Proceedings. International Conference on Software Maintenance (Cat. No. 98CB36272).

[14]  Premkumar T. Devanbu,et al.  Comparing static bug finders and statistical prediction , 2014, ICSE.

[15]  Sunghun Kim,et al.  Reducing Features to Improve Code Change-Based Bug Prediction , 2013, IEEE Transactions on Software Engineering.

[16]  Chris F. Kemerer,et al.  A Metrics Suite for Object Oriented Design , 2015, IEEE Trans. Software Eng..

[17]  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.

[18]  Nicholas A. Kraft,et al.  Cyclomatic Complexity and Lines of Code: Empirical Evidence of a Stable Linear Relationship , 2009, J. Softw. Eng. Appl..

[19]  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).

[20]  Richard M. Stallman,et al.  Using the GNU Compiler Collection , 2010 .

[21]  Hongfang Liu,et al.  Building effective defect-prediction models in practice , 2005, IEEE Software.

[22]  Vanius Zapalowski,et al.  Understanding Technical Debt at the Code Level from the Perspective of Software Developers , 2017, SBES'17.

[23]  Richard C. Holt,et al.  The top ten list: dynamic fault prediction , 2005, 21st IEEE International Conference on Software Maintenance (ICSM'05).

[24]  A. Zeller,et al.  Predicting Defects for Eclipse , 2007, Third International Workshop on Predictor Models in Software Engineering (PROMISE'07: ICSE Workshops 2007).

[25]  Mary Shaw,et al.  Finding predictors of field defects for open source software systems in commonly available data sources: a case study of OpenBSD , 2005, 11th IEEE International Software Metrics Symposium (METRICS'05).

[26]  Elmar Jürgens,et al.  Do code clones matter? , 2009, 2009 IEEE 31st International Conference on Software Engineering.

[27]  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..

[28]  Giancarlo Succi,et al.  Empirical analysis on the correlation between GCC compiler warnings and revision numbers of source files in five industrial software projects , 2006, Empirical Software Engineering.

[29]  Ingrid Nunes,et al.  Investigating the Effectiveness of Peer Code Review in Distributed Software Development , 2017, SBES'17.

[30]  Audris Mockus,et al.  Towards building a universal defect prediction model , 2014, MSR 2014.

[31]  Ahmed E. Hassan,et al.  Predicting faults using the complexity of code changes , 2009, 2009 IEEE 31st International Conference on Software Engineering.

[32]  Li Zhang,et al.  On the Relationship between Preprocessor-Based Software Variability and Software Defects , 2011, 2011 IEEE 13th International Symposium on High-Assurance Systems Engineering.

[33]  Márcio Ribeiro,et al.  The Love/Hate Relationship with the C Preprocessor: An Interview Study , 2015, ECOOP.

[34]  Letha H. Etzkorn,et al.  Empirical Validation of Three Software Metrics Suites to Predict Fault-Proneness of Object-Oriented Classes Developed Using Highly Iterative or Agile Software Development Processes , 2007, IEEE Transactions on Software Engineering.

[35]  Premkumar T. Devanbu,et al.  Fair and balanced?: bias in bug-fix datasets , 2009, ESEC/FSE '09.

[36]  Leo Breiman,et al.  Random Forests , 2001, Machine Learning.

[37]  Victor R. Basili,et al.  Experimentation in software engineering , 1986, IEEE Transactions on Software Engineering.

[38]  Maurice H. Halstead,et al.  Elements of software science (Operating and programming systems series) , 1977 .

[39]  Alessandro F. Garcia,et al.  The Discipline of Preprocessor-Based Annotations - Does #ifdef TAG n't #endif Matter , 2017, 2017 IEEE/ACM 25th International Conference on Program Comprehension (ICPC).

[40]  Yi Zhang,et al.  Classifying Software Changes: Clean or Buggy? , 2008, IEEE Transactions on Software Engineering.

[41]  Akito Monden,et al.  An Empirical Study of Fault Prediction with Code Clone Metrics , 2011, 2011 Joint Conference of the 21st International Workshop on Software Measurement and the 6th International Conference on Software Process and Product Measurement.

[42]  T. Zimmermann,et al.  Predicting Faults from Cached History , 2007, 29th International Conference on Software Engineering (ICSE'07).

[43]  Tibor Gyimóthy,et al.  Empirical validation of object-oriented metrics on open source software for fault prediction , 2005, IEEE Transactions on Software Engineering.

[44]  Henry Spencer,et al.  #ifdef Considered Harmful, or Portability Experience with C News , 1992, USENIX Summer.