Towards Lightweight Detection of Design Patterns in Source Code
Jeffy Jahfar Poozhithara, Hazeline U. Asuncion, Brent Lagesse · Proceedings/Proceedings of the ... International Conference on Software Engineering and Knowledge Engineering · 2022
Identifying which design patterns exist in source code helps maintenance engineers better understand source code and determine if new requirements can be satisfied.Automated techniques for finding design patterns generally require much time to label training datasets or to specify rules/queries for each pattern, and is difficult to extend support to secure design patterns (SDPs) and combination patterns.To address these challenges, we introduce PatternScout, a technique for automatic generation of SPARQL queries from UML Class diagrams and Sequence diagrams.These queries are used to detect patterns in the source code.Our results indicate that PatternScout can detect object-oriented design patterns (OODP) with accuracy that is comparable or better than existing techniques.It can also generate queries for SDPs that can be represented as UML Class diagrams.