Do Code LLMs Understand Design Patterns?

Zhenyu Pan, Xuefeng Song, Yunkun Wang, Rongyu Cao, Binhua Li +2 more
1/8/2025
cs.SEcs.AI

No confident code implementation found for this paper. 5 possible matches can be shown below.

Abstract

Code Large Language Models (LLMs) demonstrate great versatility in adapting to various downstream tasks, including code generation and completion, as well as bug detection and fixing. However, Code LLMs often fail to capture existing coding standards, leading to the generation of code that conflicts with the required design patterns for a given project. As a result, developers must post-process to adapt the generated code to the project's design norms. In this work, we empirically investigate the biases of Code LLMs in software development. Through carefully designed experiments, we assess the models' understanding of design patterns across recognition, comprehension, and generation. Our findings reveal that biases in Code LLMs significantly affect the reliability of downstream tasks.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. 5 weaker matches are hidden by default — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{pan2025code,
  title  = {Do Code LLMs Understand Design Patterns?},
  author = {Zhenyu Pan and Xuefeng Song and Yunkun Wang and Rongyu Cao and Binhua Li and Yongbin Li and Han Liu},
  year   = {2025},
  eprint = {2501.04835},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2501.04835v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2501.04835.svg)](https://codeofpaper.com/paper/2501.04835)

Discussion