Recognizing Antipatterns and Analyzing Their Effects on Software Maintainability

TitleRecognizing Antipatterns and Analyzing Their Effects on Software Maintainability
Publication TypeConference Paper
Year of Publication2014
AuthorsBán D, Ferenc R
Conference NameProceedings of the 14th International Conference on Computational Science and Its Applications (ICCSA 2014)
Date Publishedjun
Conference LocationGuimarães, Portugal
KeywordsAntipatterns, Empirical validation, ISO/IEC 25010, OO design, Software maintainability, SQuaRE

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.

Page last modified: January 23, 2018