C++11/14 Mutation Operators Based on Common Fault Patterns

Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 11146)


The C++11/14 standard offers a wealth of features aimed at helping programmers write better code. Unfortunately, some of these features may cause subtle programming faults, likely to go unnoticed during code reviews. In this paper we propose four new mutation operators for C++11/14 based on common fault patterns, which allow to verify whether a unit test suite is capable of testing against such faults. We validate the relevance of the proposed mutation operators by performing a case study on seven real-life software systems.


Software testing Mutation testing C++11/14 Mutation operators 



This work is sponsored by (a) the ITEA3 ReVaMP\({}^2\) Project (number 15010), sponsored by VLAIO—Flanders Innovation Sponsoring Agency; (b) Flanders Make vzw, the strategic research centre for the manufacturing industry.


  1. 1.
    Baker, R., Habli, I.: An empirical evaluation of mutation testing for improving the test quality of safety-critical software. IEEE Trans. Softw. Eng. 39(6), 787–805 (2013). Scholar
  2. 2.
    Bradbury, J.S., Cordy, J.R., Dingel, J.: Mutation operators for concurrent java (J2SE 5.0). In: Second Workshop on Mutation Analysis (Mutation 2006 - ISSRE Workshops 2006), p. 11, November 2006.
  3. 3.
    Chekam, T.T., Papadakis, M., Traon, Y.L., Harman, M.: An empirical study on mutation, statement and branch coverage fault revelation that avoids the unreliable clean program assumption. In: 2017 IEEE/ACM 39th International Conference on Software Engineering (ICSE), pp. 597–608, May 2017.
  4. 4.
    Delgado-Pérez, P., Medina-Bulo, I., Domínguez-Jiménez, J.J., García-Domínguez, A., Palomo-Lozano, F.: Class mutation operators for C++ object-oriented systems. Ann. Telecommun. - annales des télécommunications 70(3), 137–148 (2015). Scholar
  5. 5.
    Delgado-Pérez, P., Medina-Bulo, I., Palomo-Lozano, F., García-Domínguez, A., Domínguez-Jiménez, J.J.: Assessment of class mutation operators for C++ with the MuCPP mutation system. Inf. Softw. Technol. 81, 169–184 (2017). Scholar
  6. 6.
    Deng, L., Offutt, J., Ammann, P., Mirzaei, N.: Mutation operators for testing android apps. Inf. Softw. Technol. 81, 154–168 (2017). Scholar
  7. 7.
    Ferrari, F.C., Maldonado, J.C., Rashid, A.: Mutation testing for Aspect-Oriented programs. In: 2008 1st International Conference on Software Testing, Verification, and Validation, pp. 52–61, April 2008.
  8. 8.
    Irwin, W., Churcher, N.: A generated parser of C++. NZ J. Comput. 8(3), 26–37 (2001)Google Scholar
  9. 9.
    Jia, Y., Harman, M.: An analysis and survey of the development of mutation testing. IEEE Trans. Softw. Eng. 37(5), 649–678 (2011). Scholar
  10. 10.
    Just, R., Jalali, D., Inozemtseva, L., Ernst, M.D., Holmes, R., Fraser, G.: Are mutants a valid substitute for real faults in software testing? In: Proceedings of the 22nd ACM SIGSOFT International Symposium on Foundations of Software Engineering, FSE 2014, pp. 654–665. ACM, New York (2014).
  11. 11.
    Kim, S., Clark, J.A., McDermid, J.A.: Class mutation: mutation testing for object-oriented programs. In: Proceedings of Net Object Days 2000, pp. 9–12 (2000).
  12. 12.
    King, K.N., Offutt, A.J.: A Fortran language system for mutation-based software testing. Softw.: Practice Exp. 21(7), 685–718 (1991). Scholar
  13. 13.
    Kusano, M., Wang, C.: CCmutator: a mutation generator for concurrency constructs in multithreaded C/C++ applications. In: Proceedings of 2013 28th IEEE/ACM International Conference on Automated Software Engineering, ASE 2013, pp. 722–725 (2013).
  14. 14.
    Lavavej, S.T.: ISO/IEC JTC1/SC22/WG21 N3853: Range-Based For-Loops: The Next Generation (2014).
  15. 15.
    Meyers, S.: Effective Modern C++: 42 Specific Ways to Improve Your Use of C++11 and C++14, 1st edn. O’Reilly Media Inc., Sebastopol (2014)Google Scholar
  16. 16.
    Offutt, A.J., Pan, J.: Automatically detecting equivalent mutants and infeasible paths. Softw. Test. Verif. Reliab. 7(3), 165–192 (1997).<165::aid-stvr143>;2-uCrossRefGoogle Scholar
  17. 17.
    Offutt, A.J., Voas, J.M.: Subsumption of condition coverage techniques by mutation testing. Technical report, George Mason University (1996)Google Scholar
  18. 18.
    Oliveira, R.A.P., Alégroth, E., Gao, Z., Memon, A.: Definition and evaluation of mutation operators for GUI-level mutation analysis. In: 2015 IEEE Eighth International Conference on Software Testing, Verification and Validation Workshops (ICSTW), pp. 1–10, April 2015.
  19. 19.
    Papadakis, M., Kintis, M., Zhang, J., Jia, Y., Traon, Y.L., Harman, M.: Mutation testing advances: an analysis and survey. In: Advances in Computers (2018). Scholar
  20. 20.
    Stroustrup, B.: Programming: Principles and Practice Using C++, 2nd edn. Addison-Wesley Professional, Boston (2014)Google Scholar
  21. 21.
    Stroustrup, B.: C++ Core Guidelines (2017).
  22. 22.
    Sutter, H., Stroustrup, B., Reis, G.D.: ISO/IEC JTC1/SC22/WG21 N4262: Wording for Forwarding References (2014).

Copyright information

© IFIP International Federation for Information Processing 2018

Authors and Affiliations

  1. 1.University of AntwerpAntwerpBelgium

Personalised recommendations