Developing an automated script for detecting design pattern in software project using Python
Abstract
In software development, design patterns are fundamental because they solve considerable design issues and promote best practices. However, locating these patterns in large codebases may be challenging and requires frequent human inspection. This study explains a computerised method, written in Python, that utilises regular expression and Abstract Syntax Tree (AST) analysis to identify common design patterns like Singleton, Factory, Decorator, State, Strategy, Abstract Factory, Chain of Responsibility, Bridge, Composite, Builder, Facade, Iterator, Prototype, Template, Proxy, and Interpreter across the source code. An implemented script indicates a sufficient path to derive these trends, and knowledge of the project structure is provided to the programmers. The automated script’s business prerequisites are transformation into the legacy system, code quality audits, compliance with quality assurance, and helping the software engineers in code comprehension and documentation. Hence, automated pattern detection enables performance optimisation, scalability planning, and training of new programmers. A script accuracy in finding design patterns observed by investigations also indicates how it improves automatic refactoring efforts, lowers technical debt, and enhances program maintainability. With significant ramifications for software engineering’s technical and business facets, this study offers a reliable, scalable method for identifying patterns.
Fields of Study & Subjects
Software Engineering Research
Software Engineering and Design Patterns
Advanced Software Engineering Methodologies
Publication details
- Journal / source
- CRC Press eBooks
- Pages
- 283–291
- Publication date
- 5 March 2026
- Language
- EN
- Document type
- Book chapter