When Do You Repeat Yourself? Voices from the Trenches of Linux Kernel Maintainers on Code Duplication
Open Access
- 12 April 2026
- conference paper
- Published by Association for Computing Machinery (ACM)
- p. 47-52
Abstract
The Don’t Repeat Yourself (DRY) principle is central to software maintainability, but empirical studies challenge its rigid use, describing beneficial cases of duplication. However, these rely on retrospective analyses, leaving a gap in understanding real-time decision-making and socio-technical dynamics. This paper presents an ethnographic study on how the Linux kernel community manages duplication debt via deduplication contributions. We conducted a multimethod ethnographic study by submitting patches to the AMDGPU and IIO subsystems. Our analysis of the patch reviews identified two tolerated duplications, driver-forking (T1) and readability prioritization (T2), that partially contradict the literature and warrant further investigation. Furthermore, these analyses identify two new Linux-specific factors that affect deduplication acceptance: integration overhead (T3) and performance impact (T4). This work offers a fresh discussion, grounded in new empirical observations and perspectives, of the dogmatic adherence to DRY.Keywords
Funding Information
- FAPESP and SEADE (2023/18026-8, and 2025/05395-0)
This publication has 13 references indexed in Scilit:
- Definition, approaches, and analysis of code duplication detection (2006–2020): a critical reviewNeural Computing and Applications, 2022
- The Role of Ethnographic Studies in Empirical Software EngineeringIEEE Transactions on Software Engineering, 2016
- An Exploratory Study on Self-Admitted Technical Debt2014
- Clones: what is that smell?Empirical Software Engineering, 2011
- A Study of Cloning in the Linux SCSI Drivers2011
- Do code clones matter?2009
- “Cloning considered harmful” considered harmful: patterns of cloning in softwareEmpirical Software Engineering, 2008
- CP-Miner: finding copy-paste and related bugs in large-scale software codeIEEE Transactions on Software Engineering, 2006
- CCFinder: a multilinguistic token-based code clone detection system for large scale source codeIEEE Transactions on Software Engineering, 2002
- Term-weighting approaches in automatic text retrievalInformation Processing & Management, 1988