English

LLM-Based Design Pattern Detection

Software Engineering 2025-02-26 v1 Machine Learning

Abstract

Detecting design pattern instances in unfamiliar codebases remains a challenging yet essential task for improving software quality and maintainability. Traditional static analysis tools often struggle with the complexity, variability, and lack of explicit annotations that characterize real-world pattern implementations. In this paper, we present a novel approach leveraging Large Language Models to automatically identify design pattern instances across diverse codebases. Our method focuses on recognizing the roles classes play within the pattern instances. By providing clearer insights into software structure and intent, this research aims to support developers, improve comprehension, and streamline tasks such as refactoring, maintenance, and adherence to best practices.

Keywords

Cite

@article{arxiv.2502.18458,
  title  = {LLM-Based Design Pattern Detection},
  author = {Christian Schindler and Andreas Rausch},
  journal= {arXiv preprint arXiv:2502.18458},
  year   = {2025}
}

Comments

Submitted Version, that was accepted at PATTERNS 2025