Abstract
Software evolution, an integral part of the software development process, encompasses frequent and numerous changes and updates that may lead to complex and poor-quality systems. Software engineers and quality practitioners continually refactor the software components to mitigate the negative effects of code and design smells. Although these smells are not directly connected to design and coding bugs, they are high indicators of technical debt that may arise as bugs in future software releases. Therefore, refactoring plays a significant role in the overall software evolution process. To fix the underlying code and design smells, they must be first detected and classified. As code smells have been the focus of research in the literature, this paper focuses on detecting design smells. A novel design smell detection scheme is proposed using adaptive neuro-fuzzy approaches. This scheme can be seamlessly integrated with any refactoring scheduling and prioritization models as it is efficiently designed using a fast-training scheme based on a neuro-fuzzy architecture. In addition, the design smell detection solution relies on a reduced set of software metrics. A large custom dataset with more than 30,000 class records is created to assess the performance of the design smell detection solution. The reported performance scores confirm the superiority of the proposed technique over the existing ones. The accuracy, precision, recall, and area-under-the-curve (AUC) scores attained 0.97, 0.98, 0.98, and 0.99, respectively. Thanks to the high detection scores, design smell refactoring sequencing and prioritization routines can be further enhanced.








Similar content being viewed by others
Explore related subjects
Discover the latest articles and news from researchers in related subjects, suggested using machine learning.Notes
Some variants of this clustering type can be implemented using a soft approach such as clustering based on the Gaussian mixtures model (GMM) [20].
The tool was initially called Borland Together by Borland company. Now, it is by Micro Focus company under the commercial brand of Together.
References
Fowler, M.: Refactoring: improving the design of existing code, 2nd edn. Addison-Wesley Signature Series (Fowler), Boston (2018)
Fontana, F.A., Braione, P., Zanoni, M.: Automatic detection of bad smells in code: An experimental assessment. J. Object Technol. 11(2), 1–38 (2012)
Suryanarayana, G., Samarthyam, G., Sharma, T.: Refactoring for software design smells: managing technical debt. ACM SIGSOFT Softw. Eng. Notes 40, 36 (2015)
Mansoor, U., Kessentini, M., Bechikh, S., Deb, K.: Code-smells detection using good and bad software design examples. Technical report, Technical Report (2013).
Sobrinho, E.V.D.P., Lucia, A.D., Maia, M.D.A.: A systematic literature review on bad smells—5 W’s: which, when, what, who, where. IEEE Trans. Softw. Eng. 47, 1–1 (2018)
Sabir, F., Palma, F., Rasool, G., Guéhéneuc, Y.-G., Moha, N.: A systematic literature review on the detection of smells and their evolution in object-oriented and service-oriented systems. Software 49(1), 3–39 (2019)
Paiva, T., Damasceno, A., Figueiredo, E., Sant’Anna, C.: On the evaluation of code smells and detection tools. J. Softw. Eng. Res. Dev. 5(1), 7 (2017)
Misbhauddin, M., Alshayeb, M.: UML model refactoring: A systematic literature review. Empir. Softw. Eng. 20(1), 206–251 (2015)
AbuHassan, A., Alshayeb, M., Ghouti, L.: Software smell detection techniques: A systematic literature review. J. Softw. 33(3), e2320 (2021)
Tsoukalas, L.H., Uhrig, R.E.: Fuzzy and Neural Approaches in Engineering, 1st edn. Wiley, Hoboken (1997)
Zadeh, L.A., Aliev, R.A.: Fuzzy Logic Theory and Applications: Part I and Part II. World Scientific Publishing Company, Singapore (2018)
Negnevitsky, M.: Artificial Intelligence: A Guide to Intelligent Systems. Pearson Education, London (2005)
Choinzon, M., Ueda, Y.: Detecting defects in object oriented designs using design metrics. In: Proceedings of the 2006 conference on Knowledge-Based Software Engineering: Proceedings of the Seventh Joint Conference on Knowledge-Based Software Engineering. IOS Press pp. 61–72 (2006)
Brown, W.J., Malveau, R.C., Brown, W.H., McCormick, H.W., III., Mowbray, T.J.: AntiPatterns: Refactoring Software Architectures and Projects in Crisis, 1st edn. Wiley, Hoboken (1998)
Shihabudheen, K.V., Pillai, G.N.: Recent advances in neuro-fuzzy system: A survey. Knowl.-Based Syst. 152, 136–162 (2018)
Tomasiello, S., Uzair, M.: Some Remarks on ANFIS for Forest Fires Prediction. In 2021 IEEE International Conference on Fuzzy Systems (FUZZ-IEEE), pp. 1–5 (2021).
Omair, M., et al.: The selection of the sustainable suppliers by the development of a decision support framework based on analytical hierarchical process and fuzzy inference system. Int. J. Fuzzy Syst. 23(7), 1986–2003 (2021)
Imran, M., Agha, H., Ahmed, W., Sarkar, B., Ramzan, M.: Simultaneous customers and supplier’s prioritization: An AHP-based fuzzy inference decision support system (AHP-FIDSS). Int. J. Fuzzy Syst. 22, 10 (2020)
Kumar, R., Chandrawat, R.K., Sarkar, B., Joshi, V., Majumder, A.: An advanced optimization technique for smart production using α-cut based quadrilateral fuzzy number. Int. J. Fuzzy Syst. 23(1), 107–127 (2021)
Chiu, S.L.: Fuzzy model identification based on cluster estimation. J. Intell. Fuzzy Syst. 2(3), 267–278 (1994)
Trevor, H., Robert, T.: The Elements of Statistical Learning: Data Mining, Inference, and Prediction. Springer, New York (2009)
Bezdek, J.C., Ehrlich, R., Full, W.: FCM: The fuzzy c-means clustering algorithm. Comput. Geosci. 10(2–3), 191–203 (1984)
Alazba, A., Aljamaan, H.: Code smell detection using feature selection and stacking ensemble: An empirical investigation. Inf. Softw. Technol. 138, 106648 (2021)
Baqais, A., Alshayeb, M.: Automatic software refactoring: A systematic literature review. Softw. Qual. J. 2(28), 459–502 (2020)
Basit, H.A., Jarzabek, S.: Detecting higher-level similarity patterns in programs. ACM Sigsoft Softw. Eng. Notes 30(5), 156–165 (2005)
Basit, H.A., Jarzabek, S.: A data mining approach for detecting higher-level clones in software. IEEE Trans. Softw. Eng. 35(4), 497–514 (2009)
Fourati, R., Bouassida, N., Abdallah, H.B.: A metric-based approach for anti-pattern detection in uml designs. Comput. Inf. Sci. 2011, 17–33 (2011)
Hecht, G., Rouvoy, R., Moha, N., Duchien, L.: Detecting antipatterns in Android apps. Presented at the Proceedings of the Second ACM International Conference on Mobile Software Engineering and Systems, Florence, Italy (2015).
Kessentini, W., Kessentini, M., Sahraoui, H., Bechikh, S., Ouni, A.: A cooperative parallel search-based software engineering approach for code-smells detection. IEEE Trans. Software Eng. 40(9), 841–861 (2014)
Ducasse, S., Rieger, M., Demeyer, S.: A language independent approach for detecting duplicated code. Presented at the Proceedings of the IEEE International Conference on Software Maintenance, (1999).
Nguyen, H.A., Nguyen, T.T., Pham, N.H., Al-Kofahi, J.M., Nguyen, T.N.: Accurate and Efficient Structural Characteristic Feature Extraction for Clone Detection, pp. 440–455. Springer, Berlin (2009)
Mekruksavanich, S., Muenchaisri, P.: Using declarative meta programming for design flaws detection in object-oriented software. Int. Conf. Signal Process. Syst. 2009, 502–507 (2009)
Rattan, D., Bhatia, R., Singh, M.: Model clone detection based on tree comparison. Annu. IEEE India Conf. (INDICON) 2012, 1041–1046 (2012)
Rago, A., Marcos, C., Diaz-Pace, Andres, J.: Identifying duplicate functionality in textual use cases by aligning semantic actions. Softw. Syst. Model. 15(2), 579–603 (2016)
Ratiu, 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’04), pp. 223–232 (2004)
Alalfi, M.H., Antony, E.P., Cordy, J.R.: An approach to clone detection in sequence diagrams and its application to security analysis. Softw. Syst. Model. 17, 1287–1309 (2016)
Liu, H., Niu, Z., Ma, Z., Shao, W.: Suffix tree-based approach to detecting duplications in sequence diagrams. IET Softw. 5(4), 385–397 (2011)
Liu, H., Ma, Z., Zhang, L., Shao, W.: Detecting duplications in sequence diagrams based on suffix trees. In 13th Asia Pacific Software Engineering Conference, Kanpur, India, 2006, pp. 269–276: IEEE Computer Society.
Liu, H., Shao, W., Zhang, L., Ma, Z.: Detecting overlapping use cases. IET Softw. 1(1), 29–36 (2007)
Cortellessa, V., Di Marco, A., Trubiani, C.: An approach for modeling and detecting software performance antipatterns based on first-order logics. Softw. Syst. Model. 13(1), 391–432 (2014)
Maneerat, N., Muenchaisri, P.: Bad-smell prediction from software design model using machine learning techniques. Eighth Int. Joint Conf. Comput. Sci. Softw. Eng. (JCSSE) 2011, 331–336 (2011)
Ghannem, A., El Boussaidi, G., Kessentini, M.: On the use of design defect examples to detect model refactoring opportunities. Softw. Qual. J. 24(4), 947–965 (2016)
Hassaine, S., Khomh, F., Gueheneuc, Y.G., Hamel, S.: IDS: An immune-inspired approach for the detection of software design smells. Seventh Int. Conf. Qual. Inform. Commun. Technol. 2010, 343–348 (2010)
Khomh, F., Vaucher, S., Guéhéneuc, Y.G., Sahraoui, H.: A Bayesian approach for the detection of code and design smells. Ninth Int. Conf. Qual. Softw. 2009, 305–314 (2009)
Ardimento, P., Aversano, L., Bernardi, M.L., Cimitile, M., Iammarino, M.: Temporal convolutional networks for just-in-time design smells prediction using fine-grained software metrics. Neurocomputing 463, 454–471 (2021)
Arcelli, D., Cortellessa, V., Trubiani, C.: Experimenting the influence of numerical thresholds on model-based detection and refactoring of performance antipatterns. ECEASST 59, 03 (2013)
Moha, N., Gueheneuc, Y.-G., Duchien, A.-F.: Decor: A method for the specification and detection of code and design smells. IEEE Trans. Softw. Eng. (TSE) 36(1), 20–36 (2010)
Pettersson, N., Lowe, W., Nivre, J.: Evaluation of accuracy in design pattern occurrence detection. IEEE Trans. Softw. Eng. 36(4), 575–590 (2010)
Designite, https://www.designite-tools.com/designitejava/. Accessed May 2021.
Sharma, T., Mishra, P., Tiwari, R.: Designite: A software design quality assessment tool. In Proceedings of the 1st International Workshop on Bringing Architectural Design Thinking into Developers' Daily Activities, pp. 1–4 (2016).
Sharma, T., Efstathiou, V., Louridas, P., Spinellis, D.: On the feasibility of transfer-learning code smells using deep learning. http://arxiv.org/abs/1904.03031 (2019).
Padilha, J., Figueiredo, E., Sant’Anna, C., Garcia, A.: Detecting god methods with concern metrics: An exploratory study. In: Latin-American Workshop on Aspect-Oriented Software Development (2013).
ArgoUML: http://argouml.tigris.org. Accessed May 2021.
ArgoUML: https://wayback.archive-it.org/all/20120128012458/http://www.isr.uci.edu/tech-transition.html. Accessed May 2021.
GanttProject: https://www.ganttproject.biz/. Accessed May 2021.
jEdit: http://www.jedit.org/. Accessed May 2021.
JFreeChart: http://www.jfree.org/jfreechart/. Accessed May 2021.
JUnit: https://junit.org. Accessed May 2021.
Xerces: http://xerces.apache.org/. Accessed May 2021.
Genero, M., Piattini, M., Calero, C.: A survey of metrics for UML class diagrams. J. Object Technol. 4(9), 59–92 (2005)
Lorenz, M., Kidd, J.: Object-Oriented Software Metrics. Prentice Hall Englewood Cliffs, Hoboken (1994)
Chidamber, S.R., Kemerer, C.F.: A metrics suite for object oriented design. IEEE Trans. Softw. Eng. 20(6), 476–493 (1994)
Bansiya, J.: Class cohesion metric for object oriented designs. J. Object-Oriented Program. 11(8), 47–52 (1999)
Henry, S., Kafura, D.: Software structure metrics based on information flow. IEEE Trans. Softw. Eng. 5, 510–518 (1981)
Jang, J.-S.: ANFIS: Adaptive-network-based fuzzy inference system. IEEE Trans. Syst. Man Cybern. 23(3), 665–685 (1993)
Priyono, A., Ridwan, M., Alias, A.J., Rahmat, R.A.O., Hassan, A., Ali, M.A.M.: Generation of fuzzy rules with subtractive clustering. Jurnal Teknologi 43(1), 143–153 (2012)
Hammouda, K., Karray, F.: A Comparative Study of Data Clustering Techniques. University of Waterloo, Ontario (2000)
Oliveto, R., Khomh, F., Antoniol, G., Gueheneuc, Y.G.: Numerical signatures of antipatterns: An approach based on B-splines. In 14th European Conference on Software Maintenance and Reengineering, pp. 248–251 (2010).
Özgür, A., Erdem, H.: A review of KDD99 dataset usage in intrusion detection and machine learning between 2010 and 2015. PeerJ 4, e1954v1 (2016)
Shepperd, M., Kadoda, G.: Using simulation to evaluate prediction techniques [for software]. In: Proceedings Seventh International Software Metrics Symposium, IEEE, pp. 349–359 (2001).
Japkowicz, N., Stephen, S.: The class imbalance problem: A systematic study. Intell. Data Anal. 6(5), 429–449 (2002)
Bataineh, K., Naji, M., Saqer, M.: A comparison study between various fuzzy clustering algorithms. Jordan J. Mech. Ind. Eng. 5, 4 (2011)
Claes, W., Per, R., Martin, H., Magnus, C., Björn, R., Wesslén, A.: Experimentation in software engineering: An introduction. http://books.google.com/books (2000).
de Oliveira Barros, M., Dias-Neto, A.C.: Threats to validity in search-based software engineering empirical studies. RelaTe-DIA 5, 1 (2011)
Capra, E., Francalanci, C., Merlo, F., Rossi-Lamastra, C.: Firms’ involvement in Open Source projects: A trade-off between software structural quality and popularity. J. Syst. Softw. 84(1), 144–161 (2011)
Acknowledgements
A. AbuHassan and M. Alshayeb would like to acknowledge the support provided by the Deanship of Scientific Research at King Fahd University of Petroleum and Minerals. L. Ghouti acknowledges the support of Prince Sultan University.
Author information
Authors and Affiliations
Corresponding author
Rights and permissions
About this article
Cite this article
AbuHassan, A., Alshayeb, M. & Ghouti, L. Detection of Design Smells Using Adaptive Neuro-Fuzzy Approaches. Int. J. Fuzzy Syst. 24, 1927–1943 (2022). https://doi.org/10.1007/s40815-022-01248-5
Received:
Revised:
Accepted:
Published:
Issue Date:
DOI: https://doi.org/10.1007/s40815-022-01248-5