SEAIJan 8, 2025

Do Code LLMs Understand Design Patterns?

arXiv:2501.04835v121 citationsh-index: 202025 IEEE/ACM International Workshop on Large Language Models for Code (LLM4Code)
Originality Incremental advance
AI Analysis

This addresses a practical problem for software developers who must post-process LLM-generated code to meet project design standards.

The researchers investigated whether Code LLMs understand design patterns, finding that biases in these models significantly affect the reliability of downstream tasks like code generation and bug detection.

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.

Foundations

The foundational work for this paper's niche, ranked by how specifically the neighbourhood builds on it — not by global fame.

Your Notes