DOI QR코드

DOI QR Code

Empirical assessment of design patterns' fault-proneness at different granularity levels

  • Mohammed, Mawal A. (Information and Computer Science Department, King Fahd University of Petroleum and Minerals) ;
  • Elish, Mahmoud O. (Computer Science Department, Gulf University for Science and Technology)
  • Received : 2017.03.07
  • Accepted : 2017.10.01
  • Published : 2017.10.25

Abstract

There are several claimed benefits for the impact of design patterns (DPs) on software quality. However, the association between design patterns and fault-proneness has been a controversial issue. In this work, we evaluate the fault-proneness of design patterns at four levels: the design level, category level, pattern level, and role level. We used five subject systems in our empirical study. As a result, we found that, at the design level, the classes that participate in the design patterns are less fault-prone than the non-participant classes. At the category level, we found that the classes that participate in the behavioral and structural categories are less fault-prone than the non-participant classes. In addition, we found that the classes that participate in the structural design patterns are less fault-prone than the classes that participate in the other categories. At the pattern level, we found that only five patterns show significant associations with fault-proneness: builder, factory method, adapter, composite, and decorator. All of these patterns except for builder show that the classes that participate in each one of them are less fault-prone than the non-participant classes in that pattern. The classes that participate in the builder design pattern were more fault-prone than the non-participant classes and the classes that participate in several patterns: the adapter, the composite, and the decorator design patterns. At the role level, the most significant differences were between the classes that participate in some roles and the non-participant classes. Only three pairs of design pattern roles show significant differences. These roles are concrete-product vs. concrete-creator, adapter vs. adaptee, and adapter vs. client. The results recommend the use of design patterns because they are less fault-prone in general except for the builder design pattern, which should be applied with care and addressed with more test cases.

Keywords

Acknowledgement

Supported by : King Fahd University of Petroleum & Minerals (KFUPM)

References

  1. Afacan, T. (2011), "State design pattern implementation of a DSP processor: A case study of TMS5416C", Proceedings of the 6th IEEE International Symposium on Industrial Embedded Systems (SIES).
  2. Alexander, C., Ishikawa, S., Silverstein, M., Jacobson, M., Fiksdahl-King, I. and Angel, A.S. (1977), A Pattern Language, Oxford University Press, New York, U.S.A.
  3. Ali, M. and Elish, M. (2013), "A comparative literature survey of design patterns impact on software quality", Proceedings of the 4th International Conference on Information Science and Applications (ICISA).
  4. Ampatzoglou, A., Chatzigeorgiou, A., Charalampidou, S. and Avgeriou, P. (2015), "The effect of GoF design patterns on stability: A case study", IEEE Trans. Softw. Eng., 41(8), 781-802. https://doi.org/10.1109/TSE.2015.2414917
  5. Ampatzoglou, A., Kritikos, A., Arvanitou, E.M., Gortzis, A., Chatziasimidis, F. and Stamelos, I. (2011), "An empirical investigation on the impact of design pattern application on computer game defects", Proceedings of the 15th International Academic MindTrek Conference, Tampere, Finland.
  6. Arcelli Fontana, F., Maggioni, S. and Raibulet, C. (2011), "Understanding the relevance of micro-structures for design patterns detection", J. Syst. Softw., 84(12), 2334-2347. https://doi.org/10.1016/j.jss.2011.07.006
  7. Arcelli Fontana, F. and Zanoni, M. (2011), "A tool for design pattern detection and software architecture reconstruction", Informat. Sci., 181(7), 1306-1324. https://doi.org/10.1016/j.ins.2010.12.002
  8. Aversano, L., Canfora, G., Cerulo, L., Grosso, C.D. and Penta, M.D. (2007), "An empirical study on the evolution of design patterns", Proceedings of the the 6th Joint Meeting of the European Software Engineering Conference and the ACM SIGSOFT Symposium on the Foundations of Software Engineering, Dubrovnik, Croatia.
  9. Bernardi, M.L., Cimitile, M. and Di Lucca, G.A. (2013), "A model-driven graph-matching approach for design pattern detection", Proceedings of the 20th Working Conference on Reverse Engineering (WCRE).
  10. Bieman, J.M., Straw, G., Wang, H., Munger, P.W. and Alexander, R.T. (2003), "Design patterns and change proneness: An examination of five evolving systems", Proceedings of the 9th International Software Metrics Symposium.
  11. Boehm, B.W. and Papaccio, P.N. (1988), "Understanding and controlling software costs", IEEE Trans. Softw. Eng., 14(10), 1462-1477. https://doi.org/10.1109/32.6191
  12. Bosu, M.F. and MacDonell, S.G. (2013), "A taxonomy of data quality challenges in empirical software engineering", Proceedings of the Software Engineering Conference (ASWEC).
  13. De Lucia, A., Deufemia, V., Gravino, C. and Risi, M. (2009), "Behavioral pattern identification through visual language parsing and code instrumentation", Proceedings of the 13th European Conference on Software Maintenance and Reengineering.
  14. De Lucia, A., Deufemia, V., Gravino, C. and Risi, M. (2010), "Improving behavioral design pattern detection through model checking", Proceedings of the 14th European Conference on Software Maintenance and Reengineering (CSMR).
  15. Dietrich, J. and Elgar, C. (2007), "Towards a web of patterns", Web Semant.: Sci. Serv. Agent. World Wide Web, 5(2), 108-116. https://doi.org/10.1016/j.websem.2006.11.007
  16. Gamma, E., Helm, R., Johnson, R. and Vlissides, J. (1995), Design Patterns: Elements of Reusable Object-Oriented Software, Addison-Wesley.
  17. Garzas, J. and Piattini, M. (2009), "Do rules and patterns affect design maintainability?", J. Comput. Sci. Technol., 24(2), 262-272. https://doi.org/10.1007/s11390-009-9222-7
  18. Gatrell, M. and Counsell, S. (2011), "Design patterns and fault-proneness a study of commercial C# software", Proceedings of the 5th International Conference on Research Challenges in Information Science (RCIS).
  19. Gatrell, M., Counsell, S. and Hall, T. (2009), "Design patterns and change proneness: A replication using proprietary C# software", Proceedings of the 16th Working Conference on Reverse Engineering.
  20. Gueheneuc, Y.G. (2005), "Ptidej: Promoting patterns with patterns", Proceedings of the 1st ECOOP workshop on Building a System using Patterns, Glasgow, U.K.
  21. Gueheneuc, Y.G. (2007), "P-mart: Pattern-like micro architecture repository", Proceedings of the 1st EuroPLoP Focus Group on Pattern Repositories.
  22. Gueheneuc, Y.G., Guyomarc'H, J.Y. and Sahraoui, H. (2010), "Improving design-pattern identification: A new approach and an exploratory study", Softw. Qualit. Contr., 18(1), 145-174. https://doi.org/10.1007/s11219-009-9082-y
  23. Gueheneuc, Y.G. and Antoniol, G. (2008), "DeMIMA: A multilayered approach for design pattern identification", IEEE Trans. Softw. Eng., 34(5), 667-684. https://doi.org/10.1109/TSE.2008.48
  24. Hegedus, P., Ban, D., Ferenc, R. and Gyimothy, T. (2012), Myth or Reality? Analyzing the Effect of Design Patterns on Software Maintainability, Computer Applications for Software Engineering, Disaster Recovery, and Business Continuity, Springer Berlin Heidelberg, 340, 138-145.
  25. Jaafar, F., Gueheneuc, Y.G., Hamel, S., Khomh, F. and Zulkernine, M. (2016), "Evaluating the impact of design pattern and anti-pattern dependencies on changes and faults", Empir. Softw. Eng., 21(3), 896-931. https://doi.org/10.1007/s10664-015-9361-0
  26. Jing, D., Lad, D.S. and Yajing, Z. (2007), "DP-Miner: Design pattern discovery using matrix", Proceedings of the 14th Annual IEEE International Conference and Workshops on the Engineering of Computer-Based Systems.
  27. Juristo, N. and Vegas, S. (2011), "Design patterns in software maintenance: An experiment replication at UPM-experiences with the RESER'11 joint replication project", Proceedings of the 2nd International Workshop on Replication in Empirical Software Engineering Research (RESER).
  28. Krein, J.L., Pratt, L.J., Swenson, A.B., MacLean, A.C., Knutson, C.D. and Eggett, D.L. (2011), "Design patterns in software maintenance: An experiment replication at brigham young university", Proceedings of the 2nd International Workshop on Replication in Empirical Software Engineering Research (RESER).
  29. Kruskal, W.H. and Wallis, W.A. (1952), "Use of ranks in one-criterion variance analysis", J. Am. Stat. Assoc., 47, 583-621. https://doi.org/10.1080/01621459.1952.10483441
  30. Lucia, A.D., Deufemia, V., Gravino, C. and Risi, M. (2009), "Design pattern recovery through visual language parsing and source code analysis", J. Syst. Softw., 82(7), 1177-1193. https://doi.org/10.1016/j.jss.2009.02.012
  31. Mann, H.B. and Whitney, D.R. (1947), On a Test of Whether One of Two Random Variables is Stochastically Larger Than the Other, Institute of Mathematical Statistics.
  32. Mayvan, B.B., Rasoolzadegan, A. and Yazdi, Z.G. (2017), "The state of the art on design patterns: A systematic mapping of the literature", J. Syst. Softw., 127, 93-118.
  33. Nanthaamornphong, A. and Carver, J.C. (2011), "Design patterns in software maintenance: An experiment replication at university of alabama", Proceedings of the 2nd International Workshop on Replication in Empirical Software Engineering Research (RESER).
  34. Niere, J., Schafer, W., Wadsack, J.P., Wendehals, L. and Welsh, J. (2002), "Towards pattern-based design recovery", Proceedings of the 24th International Conference on Software Engineering.
  35. Nija, S. and Olsson, R.A. (2006), "Reverse engineering of design patterns from java source code", Proceedings of the 21st IEEE/ACM International Conference on Automated Software Engineering.
  36. Pham, H. (2001), Software Reliability, Wiley Encyclopedia of Electrical and Electronics Engineering, John Wiley & Sons, Inc.
  37. Porter, A.A. and Selby, R.W. (1990), "Empirically guided software development using metric-based classification trees", Softw. IEEE, 7(2), 46-54.
  38. Prechelt, L. and Liesenberg, M. (2011), "Design patterns in software maintenance: An experiment replication at freie university; Berlin", Proceedings of the 2nd International Workshop on Replication in Empirical Software Engineering Research (RESER).
  39. Prechelt, L., Unger, B., Tichy, W.F., Brossler, P. and Votta, L.G. (2001), "A controlled experiment in maintenance: Comparing design patterns to simpler solutions", IEEE Trans. Softw. Eng., 27(12), 1134-1144. https://doi.org/10.1109/32.988711
  40. Rudzki, J. (2005), "How design patterns affect application performance-a case of a multi-tier J2EE application", Proceedings of the 4th international conference on Scientific Engineering of Distributed Java Applications, Luxembourg-Kirchberg, Luxembourg.
  41. Scanniello, G., Gravino, C., Risi, M., Tortora, G. and Dodero, G. (2015), "Documenting design-pattern instances: A family of experiments on source-code comprehensibility", ACM Trans. Softw. Eng. Meth., 24(3), 1-35.
  42. SciTools (2014), http://www.scitools.com/download/.
  43. Smith, J.M. and Stotts, D. (2003), SPQR: Flexible Automated Design Pattern Extraction from Source Code.
  44. Tsantalis, N., Chatzigeorgiou, A., Stephanides, G. and Halkidis, S.T. (2006), "Design pattern detection using similarity scoring", IEEE Trans. Softw. Eng., 32(11), 896-909. https://doi.org/10.1109/TSE.2006.112
  45. Vokac, M. (2004), "Defect frequency and design patterns: An empirical study of industrial code", IEEE Trans. Softw. Eng., 30(12), 904-917. https://doi.org/10.1109/TSE.2004.99
  46. Vokac, M., Tichy, W., Sjoberg, D., Arisholm, E. and Aldrin, M. (2004), "A controlled experiment comparing the maintainability of programs designed with and without design patterns-a replication in a real programming environment", Empir. Softw. Eng., 9(3), 149-195. https://doi.org/10.1023/B:EMSE.0000027778.69251.1f
  47. Wohlin, C. (2013), "Empirical software engineering research with industry: Top 10 challenges", Proceedings of the 1st International Workshop on Conducting Empirical Studies in Industry.