design pattern identification

Identifying and applying recurring solution patterns in software or product/design work to address code smells, strengthen invariants, or achieve desired user effects, taking into account data, design, and audience facets.

designpatternidentification

12-Month Skill Trend

Momentum and market value over time
Trending
Score
+20 in 12 mo
96
12 mo agoNow
Career
Value
+$12K in 12 mo
$42K/year
12 mo agoNow

Recommended Survey Paper

Quick overview of the field
View more

Must-Read Papers

Most classic and influential ideas
View more

This study addresses the challenge of automatically detecting software design patterns in source code to support architectural understanding and quality assessment. It presents the first systematic evaluation of four large language models—including NextCoder and Gemma 3—as well as two ensemble strategies combining three models, for recognizing five classic design patterns: Singleton, Adapter, Bridge, Composite, and Decorator. The work investigates the impact of three input modalities—raw source code, PlantUML diagrams, and textual descriptions—on detection performance. Experimental results demonstrate that NextCoder and Gemma 3 achieve the highest accuracy among individual models, while ensemble approaches further enhance performance, thereby confirming the effectiveness and potential of large language models in design pattern recognition tasks.

automatic detectiondesign pattern recognitionsoftware architecture understanding

LLM-Based Design Pattern Detection

Feb 25, 2025
CS
Christian Schindler
🏛️ Clausthal University of Technology

Identifying design pattern instances in unfamiliar codebases remains challenging due to reliance on explicit annotations and rigid syntactic templates in traditional static analysis. Method: This paper pioneers the integration of large language models (LLMs) into design pattern detection, shifting focus from syntax-based matching to semantic role identification of classes. We propose a hybrid approach combining fine-tuning and prompt engineering, incorporating formal pattern role definitions, context-aware code slicing, and multi-turn reasoning for validation—adapted to CodeLlama and DeepSeek-Coder. Results: Evaluated on 12 open-source projects, our method achieves an average F1-score of 86.3%, substantially outperforming existing tools. It supports all 7 Gang-of-Four patterns and robustly detects implicit implementations, thereby enhancing software architecture comprehension, refactoring decision-making, and cross-project knowledge transfer.

Detect design patterns in codeImprove software quality and maintainabilityLeverage Large Language Models for analysis

A Causal Perspective on Measuring, Explaining and Mitigating Smells in llm-Generated Code

Nov 19, 2025
AV
Alejandro Velasco
🏛️ William & Mary | Microsoft | University of Dhaka

Code generated by large language models (LLMs) frequently reproduces anti-patterns, introducing code smells that impair readability and maintainability; however, their root causes and evolutionary patterns remain poorly understood. Method: We propose the first causality-aware framework for assessing code smell propensity in LLM-generated code, centered on the Propensity Smell Score (PSC)—a novel metric quantifying how generation strategies, model scale, architecture, and prompt design systematically influence structural quality. Contribution/Results: Through empirical modeling and a developer user study, we validate that PSC effectively captures structural defects and supports actionable development decisions. We further demonstrate that refining prompt engineering and model architecture significantly reduces smell incidence. This work advances a quality-aware paradigm for LLM-based code generation and provides both theoretical foundations and practical tools for trustworthy AI-assisted programming.

Developing mitigation strategies for smell-prone generated codeExplaining causes of code smells through generation parametersMeasuring structural quality issues in LLM-generated code

Do Code LLMs Understand Design Patterns?

Jan 08, 2025
ZP
Zhenyu Pan
🏛️ Northwestern University | Zhejiang University | Alibaba Group

This study reveals a systematic cognitive bias in mainstream code large language models (Code LLMs) regarding software design patterns: average pattern identification accuracy falls below 58%, and only ~32% of generated code satisfies both the semantic and structural constraints of the target pattern, compromising downstream task reliability. To address this, the authors introduce the first comprehensive design pattern benchmark covering three core capabilities—identification, comprehension, and generation—and propose a multidimensional evaluation framework integrating prompt engineering, expert annotation, and statistical analysis. Through cross-model and cross-pattern controlled experiments, the work provides the first systematic diagnosis of Code LLMs’ deficiencies at the design paradigm level. It establishes a reproducible methodological foundation and empirical evidence for rigorous model assessment, prompt optimization, and domain-aligned fine-tuning.

Code StandardsLarge Language ModelsProgramming Bias

How Do Code Smells Affect Skill Growth in Scratch Novice Programmers?

Jul 23, 2025
RH
Ricardo Hidalgo Aragón
🏛️ Universidad Rey Juan Carlos

This study investigates how design-level code smells in novice Scratch programs impede the development of computational thinking (CT) skills. Focusing on fine-grained associations between nine CT constructs and forty code smell categories, we employ an open-source linter to extract program features, then apply robust correlation analysis, hierarchical cross-validation, and exploratory machine learning modeling—while accounting for task context as a moderating factor. To our knowledge, this is the first large-scale study in block-based programming to establish interpretable, empirically grounded mappings between specific design defects and CT competencies, revealing mechanistic pathways through which novice programming habits hinder skill acquisition. We release a publicly available, de-identified benchmark dataset and a fully reproducible analytical pipeline, providing effect-size evidence to inform targeted pedagogical interventions, curriculum design, and optimization of automated feedback systems.

Aims to inform curricula and tools for sustainable software maintenanceExplores link between computational thinking and design flaws in Scratch projectsInvestigates code smells' impact on novice Scratch programmers' skill growth

Latest Papers

What's happening recently
View more

This study addresses the challenges of high cost, error-proneness, and defect propagation in cross-repository code and test reuse during software refactoring. Through action research, the authors conduct bidirectional empirical analyses on real-world cases such as Soot/SootUp and FindBugs/SpotBugs, identifying for the first time the bidirectional reuse requirements and semantic reuse patterns inherent in refactoring scenarios. They propose a semantic alignment–based code mapping approach coupled with a hierarchical, extensible clone detection mechanism. Experimental results demonstrate that their method reduces irrelevant clones by 33%–99% on average and achieves a benchmark precision of 86%. The practical impact is further evidenced by five reported issues and ten pull requests submitted to open-source communities, eight of which have already been merged, confirming the approach’s effectiveness and applicability.

clone detectioncode reusecross-repository migration

This work addresses the high false-positive rates of traditional code smell detection tools, which often ignore development context and thus hinder effective refactoring. To overcome this limitation, the authors propose an event-driven detection approach that integrates contextual factors such as team composition, project phase, and geographical distribution. They introduce SmellDSL, a domain-specific language that unifies static code metrics with contextual rules, and implement a scalable architecture based on a service bus. The resulting system has been integrated into Eclipse and augmented with a mobile visualization interface, enabling precise identification of smell types, severity levels, and locations. This facilitates targeted refactoring by assigning appropriate developers, thereby significantly improving both detection accuracy and actionable insights for development teams.

code smellscontext-aware detectiondevelopment context

This study addresses the lack of empirical validation regarding the practical application of AI design patterns in real-world codebases. By mining the literature, the authors identify 14 distinct AI design patterns and, for the first time, integrate active learning with pattern mining to construct a quantifiable analytical framework across 100 open-source AI projects on GitHub. This framework enables estimation of the occurrence frequency and statistical confidence bounds for each pattern. Evaluated on an 8-class classification task, the approach achieves 56% accuracy and 55% recall—substantially outperforming the 11% random baseline. The work fills a critical gap in empirical research on AI design patterns and provides practitioners with actionable estimates of pattern applicability boundaries.

AI patternsempirical validationprevalence

This study addresses the challenge that large language models (LLMs) often fail to consistently adhere to software design patterns during code generation, thereby compromising architectural quality. To mitigate this issue, the authors propose four prompting strategies—instructional prompting, binary automated feedback, detailed automated feedback, and feedback augmented with few-shot examples—and evaluate their effectiveness across 13 LLMs on 164 Java tasks from the HumanEval-X benchmark, focusing specifically on the Singleton pattern. Experimental results reveal substantial variation in how different models respond to these strategies, demonstrating that lightweight feedback mechanisms can effectively guide adherence to design patterns. Notably, Llama 3.3 achieves 100% structural compliance with the Singleton pattern under instructional prompting, yielding a 34.1 percentage point increase in test pass rate, while Qwen 3 (8B) attains 99.2% pattern alignment and 58.6% functional correctness using binary feedback.

Code GenerationLarge Language ModelsPrompting Strategies

This study addresses the challenges in assessing the completeness of multi-patch vulnerability fixes and the lack of systematic understanding of their root causes and characteristics. Through manual analysis of 1,646 multi-patch repair records, this work proposes the first three-tier classification framework grounded in root causes, revealing the evolutionary patterns of such repairs. By contrasting key features, it clarifies the distinctions between multi-patch and single-patch fixes and evaluates the effectiveness of mainstream vulnerability detection tools in verifying repair completeness. The findings delineate predominant multi-patch repair patterns and associated challenges, expose limitations of current tools, and provide a novel perspective along with an empirical foundation for future research on repair validation.

multi-patch fixesopen-source softwarepatch analysis

Hot Scholars

AR

Andreas Rausch

Full Professor for Software Systems Engineering, Institute for Software & Systems Engineering, TU
Software Systems EngineeringRequirements Engineering and Software ArchitectureDesign and ModelingEngineering Processes
TS

Tushar Sharma

Asst. professor, FCS, Dalhousie University
Software engineeringMachine learning for software engineeringGreen AI
AR

Anna Rita Fasolino

Full Professor, University of Naples Federico II
Software EngineeringSoftware TestingSoftware MaintenanceReverse Engineering
DA

Domenico Amalfitano

University of Naples
Software engineeringSoftware testingSoftware ArchitectureEmpirical Software Engineering