Code Duplication and Reuse in Jupyter Notebooks
Not on the map. Why?
Abstract (arXiv)
Duplicating one's own code makes it faster to write software. This expediency is particularly valuable for users of computational notebooks. Duplication allows notebook users to quickly test hypotheses and iterate over data. In this paper, we explore how much, how and from where code duplication occurs in computational notebooks, and identify potential barriers to code reuse. Previous work in the area of computational notebooks describes developers' motivations for reuse and duplication but does not show how much reuse occurs or which barriers they face when reusing code. To address this gap, we first analyzed GitHub repositories for code duplicates contained in a repository's Jupyter notebooks, and then conducted an observational user study of code reuse, where participants solved specific tasks using notebooks. Our findings reveal that repositories in our sample have a mean self-duplication rate of 7.6%. However, in our user study, few participants duplicated their own code, preferring to reuse code from online sources.
Key facts. Cited by 5 papers in the map (data through 7 Oct 2026). First posted on arXiv 27 May 2020.
Builds on
No reference list yet.
Built on by
Citing papers per year: 2022: 2; 2023: 1; 2024: 0; 2025: 2.
5 papers.
- 2022Eliciting Best Practices for Collaboration with Computational Notebookscited by 4
- 2023Machine Learning practices and infrastructurescited by 2
- 2025ReSpark: Leveraging Previous Data Reports as References to Generate New Reports with LLMscited by 2
- 2022Assessing the Quality of Computational Notebooks for a Frictionless Transition from Exploration to Productioncited by 1
- 2025Analysing Python Machine Learning Notebooks with Moosecited by 0
- 2025Analysing Python Machine Learning Notebooks with Moose15 Sep 2025
- 2025ReSpark: Leveraging Previous Data Reports as References to Generate New Reports with LLMs4 Feb 2025
- 2023Machine Learning practices and infrastructures13 Jul 2023
- 2022Assessing the Quality of Computational Notebooks for a Frictionless Transition from Exploration to Production24 May 2022
- 2022Eliciting Best Practices for Collaboration with Computational Notebooks15 Feb 2022