Revisiting the Impact of Pursuing Modularity for Code Generation

Deokyeong Kang, KiJung Seo, Taeuk Kim


Abstract
Modular programming, which aims to construct the final program by integrating smaller, independent building blocks, has been regarded as a desirable practice in software development. However, with the rise of recent code generation agents built upon large language models (LLMs), a question emerges: is this traditional practice equally effective for these new tools? In this work, we assess the impact of modularity in code generation by introducing a novel metric for its quantitative measurement. Surprisingly, unlike conventional wisdom on the topic, we find that modularity is not a core factor for improving the performance of code generation models. We also explore potential explanations for why LLMs do not exhibit a preference for modular code compared to non-modular code.
Anthology ID:
2024.findings-emnlp.676
Volume:
Findings of the Association for Computational Linguistics: EMNLP 2024
Month:
November
Year:
2024
Address:
Miami, Florida, USA
Editors:
Yaser Al-Onaizan, Mohit Bansal, Yun-Nung Chen
Venue:
Findings
SIG:
Publisher:
Association for Computational Linguistics
Note:
Pages:
11561–11571
Language:
URL:
https://preview.aclanthology.org/ingest_wac_2008/2024.findings-emnlp.676/
DOI:
10.18653/v1/2024.findings-emnlp.676
Bibkey:
Cite (ACL):
Deokyeong Kang, KiJung Seo, and Taeuk Kim. 2024. Revisiting the Impact of Pursuing Modularity for Code Generation. In Findings of the Association for Computational Linguistics: EMNLP 2024, pages 11561–11571, Miami, Florida, USA. Association for Computational Linguistics.
Cite (Informal):
Revisiting the Impact of Pursuing Modularity for Code Generation (Kang et al., Findings 2024)
Copy Citation:
PDF:
https://preview.aclanthology.org/ingest_wac_2008/2024.findings-emnlp.676.pdf