Anti-pattern Detection with Model Queries: A Comparison of Approaches

TitleAnti-pattern Detection with Model Queries: A Comparison of Approaches
Publication TypeConference Paper
Year of Publication2014
AuthorsUjhelyi Z, Horváth Á, Varró D, Csiszár NIstván, Szőke G, Vidács L, Ferenc R
Conference NameProceedings of the 2014 Software Evolution Week (Merger of the 18th IEEE European Conference on Software Maintenance and Reengineering & 21st IEEE Working Conference on Reverse Engineering – CSMR-WCRE 2014)
PublisherIEEE Computer Society
Conference LocationAntwerp, Belgium
Keywordsantipattern detection, program queries, query technologies, select:quality

Program queries play an important role in several software evolution tasks like program comprehension, impact analysis, or the automated identification of anti-patterns for complex refactoring operations. A central artifact of these tasks is the reverse engineered program model built up from the source code (usually an Semantic Graph, ASG), which is traditionally post-processed by dedicated, hand-coded queries. Our paper investigates the use of the popular industrial Eclipse Modeling Framework (EMF) as an underlying representation of program models processed by three general-purpose model query techniques based on native Java code, local-search and incremental evaluation. We provide in-depth comparison of these techniques on the source code of 17 Java projects using queries taken from refactoring operations in different usage profiles. Our results show that general purpose model queries outperform hand-coded queries by 2-3 orders of magnitude, while there is a 5-10 times increase in memory consumption and model load time. In addition, measurement results of usage profiles can be used as guidelines for selecting the appropriate query technologies in concrete scenarios.

Page last modified: September 26, 2019