Skip to main content

Recognizing Antipatterns and Analyzing Their Effects on Software Maintainability

  • Conference paper

Part of the book series: Lecture Notes in Computer Science ((LNTCS,volume 8583))

Abstract

Similarly to design patterns and their inherent extra information about the structure and design of a system, antipatterns – or bad code smells – can also greatly influence the quality of software. Although the belief that they negatively impact maintainability is widely accepted, there are still relatively few objective results that would support this theory.

In this paper we show our approach of detecting antipatterns in source code by structural analysis and use the results to reveal connections among antipatterns, number of bugs, and maintainability. We studied 228 open-source Java based systems and extracted bug-related information for 34 of them from the PROMISE database. For estimating the maintainability, we used the ColumbusQM probabilistic quality model.

We found that there is a statistically significant, 0.55 Spearman correlation between the number of bugs and the number of antipatterns. Moreover, there is an even stronger, -0.62 reverse Spearman correlation between the number of antipatterns and code maintainability.

We also found that even these few implemented antipatterns could nearly match the machine learning based bug-predicting power of 50 class level source code metrics.

Although the presented analysis is not conclusive by far, these first results suggest that antipatterns really do decrease code quality and can highlight spots that require closer attention.

This is a preview of subscription content, log in via an institution.

Buying options

Chapter
USD   29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD   39.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD   54.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Learn about institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. Alves, T.L., Ypma, C., Visser, J.: Deriving metric thresholds from benchmark data. In: 2010 IEEE International Conference on Software Maintenance (ICSM), pp. 1–10. IEEE (2010)

    Google Scholar 

  2. Bakota, T., Hegedűs, P., Körtvélyesi, P., Ferenc, R., Gyimóthy, T.: A probabilistic software quality model. In: 2011 27th IEEE International Conference on Software Maintenance (ICSM), pp. 243–252 (2011)

    Google Scholar 

  3. Brown, W.J., Malveau, R.C., McCormick III, I.H.W., Mowbray, T.J.: AntiPatterns: Refactoring Software, Architectures, and Projects in Crisis. John Wiley & Sons, Inc., New York (1998)

    Google Scholar 

  4. Ferenc, R., Beszédes, Á., Tarkiainen, M., Gyimóthy, T.: Columbus-reverse engineering tool and schema for c++. In: Proceedings of the International Conference on Software Maintenance, pp. 172–181. IEEE (2002)

    Google Scholar 

  5. Fowler, M., Beck, K.: Refactoring: Improving the Design of Existing Code. Addison-Wesley object technology series. Addison-Wesley (1999)

    Google Scholar 

  6. Gamma, E., Helm, R., Johnson, R., Vlissides, J.: Design Patterns: Elements of Reusable Object-oriented Software. Addison-Wesley Longman Publishing Co., Inc., Boston (1995)

    Google Scholar 

  7. Hall, M., Frank, E., Holmes, G., Pfahringer, B., Reutemann, P., Witten, I.H.: The weka data mining software: An update. SIGKDD Explor. Newsl. 11(1) (November 2009)

    Google Scholar 

  8. ISO/IEC: ISO/IEC 25000:2005. Software Engineering – Software product Quality Requirements and Evaluation (SQuaRE) – Guide to SQuaRE. ISO/IEC (2005)

    Google Scholar 

  9. Khomh, F., Di Penta, M., Guéhéneuc, Y.G.: An exploratory study of the impact of code smells on software change-proneness. In: 16th Working Conference on Reverse Engineering, WCRE 2009, pp. 75–84 (2009)

    Google Scholar 

  10. Lozano, A., Wermelinger, M., Nuseibeh, B.: Assessing the impact of bad smells using historical information. In: Ninth International Workshop on Principles of Software Evolution: In Conjunction with the 6th ESEC/FSE Joint Meeting, IWPSE 2007, pp. 31–34. ACM (2007)

    Google Scholar 

  11. Mäntylä, M., Vanhanen, J., Lassenius, C.: Bad smells - humans as code critics. In: Proceedings of the 20th IEEE International Conference on Software Maintenance, pp. 399–408 (2004)

    Google Scholar 

  12. Marinescu, R.: Detecting design flaws via metrics in object-oriented systems. In: Proceedings of TOOLS, pp. 173–182. IEEE Computer Society (2001)

    Google Scholar 

  13. Marinescu, R.: Detection strategies: Metrics-based rules for detecting design flaws. In: Proc. IEEE International Conference on Software Maintenance (2004)

    Google Scholar 

  14. Menzies, T., Caglayan, B., He, Z., Kocaguneli, E., Krall, J., Peters, F., Turhan, B.: The promise repository of empirical software engineering data (June 2012), http://promisedata.googlecode.com

  15. Quinlan, J.R.: C4.5: Programs for Machine Learning. Morgan Kaufmann Publishers Inc., San Francisco (1993)

    Google Scholar 

  16. Rapu, D., Ducasse, S., Girba, T., Marinescu, R.: Using history information to improve design flaws detection. In: Proceedings of the Eighth European Conference on Software Maintenance and Reengineering, CSMR 2004, pp. 223–232 (2004)

    Google Scholar 

  17. Trifu, A., Marinescu, R.: Diagnosing design problems in object oriented systems. In: Proceedings of the 12th Working Conference on Reverse Engineering, WCRE 2005, pp. 155–164. IEEE Computer Society (2005)

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2014 Springer International Publishing Switzerland

About this paper

Cite this paper

Bán, D., Ferenc, R. (2014). Recognizing Antipatterns and Analyzing Their Effects on Software Maintainability. In: Murgante, B., et al. Computational Science and Its Applications – ICCSA 2014. ICCSA 2014. Lecture Notes in Computer Science, vol 8583. Springer, Cham. https://doi.org/10.1007/978-3-319-09156-3_25

Download citation

  • DOI: https://doi.org/10.1007/978-3-319-09156-3_25

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-319-09155-6

  • Online ISBN: 978-3-319-09156-3

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics