Democracia em Xeque: Um Estudo Comparativo sobre Detecção de Code Smells
Resumo
Existem muitas ferramentas e técnicas diferentes para detecção de code smells. Alguns estudos indicam que as formas de detecção de smells podem variar significativamente mesmo quando aplicadas em um mesmo contexto. Visando avaliar e compreender se alguma forma de detecção automática de code smells provê resultados mais próximos da realidade, nesse artigo é realizada uma investigação quantitativa envolvendo três ferramentas de detecção de code smells e um sistema de votação que combina o uso dessas ferramentas. Todas essas formas de detecção de code smells foram comparadas com um oráculo proposto por especialistas para classificar uma classe como God Class. Por meio do uso de estatística descritiva, os resultados indicaram que a ferramenta JDeodorant apresenta melhor revocação na detecção de God Class quando usada individualmente e que o sistema de votação não gera ganhos significativos.
Referências
S. Chidamber and C. Kemerer. 1994. A metrics suite for object oriented design. IEEE Trans. on Software Engineering 20, 6 (1994), 476-493.
D. Cruz, A. Santana, and E. Figueiredo. 2020. Detecting bad smells with machine learning algorithms: an empirical study. In 3rd Int. Conf. on Technical Debt. 31-40.
D. Di Nucci, F. Palomba, D. Tamburri, A. Serebrenik, and A. De Lucia. 2018. Detecting code smells using machine learning techniques: are we there yet?. In IEEE 25th Int. Conf. on Software Analysis, Evolution and Reengineering. 612-621.
E. Fernandes, J. Oliveira, G. Vale, T. Paiva, and E. Figueiredo. 2016. A review-based comparative study of bad smell detection tools. In 20th Int. Conf. on Evaluation and Assessment in Software Engineering (EASE). 1-12.
M. Fokaefs, N. Tsantalis, E. Stroulia, and A. Chatzigeorgiou. 2011. JDeodorant: identification and application of extract class refactorings. In 2011 33rd Int. Conf. on Software Engineering (ICSE). 1037-1039.
F. Fontana, M. Zanoni, A. Marino, and M. Mäntylä. 2013. Code smell detection: towards a machine learning-based approach. In IEEE 29th Int. Conf. on Software Maintenance (ICSM). 396-399.
M. Fowler and K. Beck. 1999. Refactoring: improving the design of existing code (1 ed.). Addison-Wesley.
A. Ichtsis, N. Mittas, A. Ampatzoglou, and A. Chatzigeorgiou. 2022. Merging Smell Detectors: Evidence on the Agreement of Multiple Tools. In 5th Int. Conf. on Technical Debt. 61-65.
J. Landis and G. Koch. 1977. The Measurement of Observer Agreement for Categorical Data. Biometrics 33, 1 (1977), 159-174.
M.V. Mantyla, J. Vanhanen, and C. Lassenius. 2004. Bad smells - humans as code critics. In 20th IEEE Int. Conf. on Software Maintenance. 399-408.
R. Marinescu. 2001. Detecting design flaws via metrics in object-oriented systems. In 39th Int. Conf. and Exhibition on Technology of Object-Oriented Languages and Systems. 173-182.
R. Marinescu. 2005. Measurement and quality in object-oriented design. In 21st IEEE Int. Conf. on Software Maintenance (ICSM). 701-704.
S. Olbrich, D. Cruzes, and D. Sjøberg. 2010. Are all code smells harmful? A study of God Classes and Brain Classes in the evolution of three open source systems. In 26th IEEE Int. Conf. on Software Maintenance (ICSM). 1-10.
G. Rasool and Z. Arshad. 2015. A review of code smell mining techniques. Journal of Software: Evolution and Process 27, 11 (2015), 867-895.
A. Riel. 1996. Object-Oriented Design Heuristics. Addison-Wesley.
A. Santana, D. Cruz, and E. Figueiredo. 2021. An exploratory study on the identification and evaluation of bad smell agglomerations. In 36th Annual ACM Symposium on Applied Computing (SAC '21). 1289-1297.
E. Sobrinho, A. De Lucia, and M. Maia. 2021. A systematic literature review on bad smells-5 w's: which, when, what, who, where. IEEE Trans. on Software Engineering 47, 1 (2021), 17-66.
T. A Soliman, A. El-Swesy, and S. Ahmed. 2010. Utilizing CK metrics suite to UML models: A case study of microarray midas software. In 7th Int. Conf. on Informatics and Systems. 1-6.
L. F. M. Vegi and M. T. Valente. 2022. Code smells in Elixir: early results from a grey literature review. In 30th Int. Conf. on Program Comprehension (ICPC). 1-5.
S. Vidal, H. Vazquez, J. Diaz-Pace, C. Marcos, A. Garcia, and W. Oizumi. 2015. JSpIRIT: a flexible tool for the analysis of code smells. In 34th Int. Conf. of the Chilean Computer Science Society. 1-6.
C. Wohlin, P. Runeson, M. Hst, M. Ohlsson, B. Regnell, and A. Wessln. 2012. Experimentation in Software Engineering. Springer.