首页 | 本学科首页   官方微博 | 高级检索  
     


An exploratory study on cooccurrence of design patterns and bad smells using software metrics
Authors:Bruno L Sousa  Mariza A S Bigonha  Kecia A M Ferreira
Affiliation:1. Department of Computer Science, Universidade Federal de Minas Gerais, Belo Horizonte, Brazil;2. Department of Computing, Federal Center for Technological Education of Minas Gerais (CEFET-MG), Belo Horizonte, Brazil
Abstract:A design pattern is a general reusable solution to commonly recurring problems in software projects. Bad smells are symptoms existing in the source code that possibly indicate the presence of a structural problem that requires code refactoring. Although design pattern and bad smells be different concepts, literature has shown that they may be related and cooccur during the evolution of a software system. This paper presents an empirical study that investigates cooccurrences of design patterns and bad smells as well as identifies the main factors that contribute to the emergence of the relationship between them. We carried out a case study with five Java systems to: (1) investigate if the use of design pattern reduces bad smell occurrence, (2) identify cooccurrences of design patterns and bad smells, and (3) identify situations that contribute for the cooccurrence emergence. As the main result, we found that the application of design pattern not necessarily avoid bad smell occurrences. The results also show that some design patterns such as composite, factory method, and singleton, are intrinsically modular and might be useful in creating high-quality systems. However, other design patterns such as adapter-command, proxy, and state-strategy, have presented high cooccurrence frequency with bad smells; therefore, they require attention in their implementation. Finally, via manual inspection in the components with cooccurrence, we found that the identified cooccurrences appeared due to poor planning and inadequate application of design patterns.
Keywords:bad smell  cooccurrence  design pattern  software metrics
设为首页 | 免责声明 | 关于勤云 | 加入收藏

Copyright©北京勤云科技发展有限公司  京ICP备09084417号