close this message
arXiv smileybones

arXiv Is Hiring a DevOps Engineer

Work on one of the world's most important websites and make an impact on open science.

View Jobs
Skip to main content
Cornell University

arXiv Is Hiring a DevOps Engineer

View Jobs
We gratefully acknowledge support from the Simons Foundation, member institutions, and all contributors. Donate
arxiv logo > cs > arXiv:2007.10146v1

Help | Advanced Search

arXiv logo
Cornell University Logo

quick links

  • Login
  • Help Pages
  • About

Computer Science > Software Engineering

arXiv:2007.10146v1 (cs)
[Submitted on 20 Jul 2020 (this version), latest version 26 Feb 2021 (v2)]

Title:Jupyter Notebooks on GitHub: Characteristics and Code Clones

Authors:Malin Källén, Ulf Sigvardsson, Tobias Wrigstad
View a PDF of the paper titled Jupyter Notebooks on GitHub: Characteristics and Code Clones, by Malin K\"all\'en and 2 other authors
View PDF
Abstract:Jupyter notebooks have emerged as a standard tool for data science programming. Programs in Jupiter notebooks are different from typical programs by dividing code into snippets interleaved with text and visualisation and allowing interactive exploration and execution of snippets in different order. Previous studies have shown the presence of considerable code duplication in sources of traditional programs, in both so-called systems programming languages and so-called scripting languages.
In this paper we present the first large-scale study of code cloning in Jupyter notebooks. We analyse a corpus of 2.7 million Jupyter notebooks hosted on GitHJub, representing over 36974714 individual snippets and 226744094 lines of code. We study clones at the level of individual snippets, and study the extent to which snippets are recurring across multiple notebooks. We study both identical clones clones (with possible differences in whitespaces) and approximate clones and conduct a small-scale ocular inspection of the most common clones.
We find that that code cloning is common in Jupyter notebooks -- more than 70% of all code snippets are exact copies of other snippets, and around 50% of all notebooks do not have a unique snippet, but consists solely of snippets that are also found elsewhere. In notebooks written in Python, around 80% of all snippets are near-miss clones and the prevalence of code cloning is higher in Python than in other languages.
We further find that clones between different repositories are far more common than clones within the same repository. However, the most common individual repository from which a Jupyter notebook contains clones is the repository in which itself resides.
Subjects: Software Engineering (cs.SE); Programming Languages (cs.PL)
Cite as: arXiv:2007.10146 [cs.SE]
  (or arXiv:2007.10146v1 [cs.SE] for this version)
  https://doi.org/10.48550/arXiv.2007.10146
arXiv-issued DOI via DataCite

Submission history

From: Tobias Wrigstad [view email]
[v1] Mon, 20 Jul 2020 14:19:10 UTC (1,718 KB)
[v2] Fri, 26 Feb 2021 22:38:32 UTC (2,104 KB)
Full-text links:

Access Paper:

    View a PDF of the paper titled Jupyter Notebooks on GitHub: Characteristics and Code Clones, by Malin K\"all\'en and 2 other authors
  • View PDF
  • Other Formats
license icon view license
Current browse context:
cs.SE
< prev   |   next >
new | recent | 2020-07
Change to browse by:
cs
cs.PL

References & Citations

  • NASA ADS
  • Google Scholar
  • Semantic Scholar

DBLP - CS Bibliography

listing | bibtex
Tobias Wrigstad
a export BibTeX citation Loading...

BibTeX formatted citation

×
Data provided by:

Bookmark

BibSonomy logo Reddit logo

Bibliographic and Citation Tools

Bibliographic Explorer (What is the Explorer?)
Connected Papers (What is Connected Papers?)
Litmaps (What is Litmaps?)
scite Smart Citations (What are Smart Citations?)

Code, Data and Media Associated with this Article

alphaXiv (What is alphaXiv?)
CatalyzeX Code Finder for Papers (What is CatalyzeX?)
DagsHub (What is DagsHub?)
Gotit.pub (What is GotitPub?)
Hugging Face (What is Huggingface?)
Papers with Code (What is Papers with Code?)
ScienceCast (What is ScienceCast?)

Demos

Replicate (What is Replicate?)
Hugging Face Spaces (What is Spaces?)
TXYZ.AI (What is TXYZ.AI?)

Recommenders and Search Tools

Influence Flower (What are Influence Flowers?)
CORE Recommender (What is CORE?)
  • Author
  • Venue
  • Institution
  • Topic

arXivLabs: experimental projects with community collaborators

arXivLabs is a framework that allows collaborators to develop and share new arXiv features directly on our website.

Both individuals and organizations that work with arXivLabs have embraced and accepted our values of openness, community, excellence, and user data privacy. arXiv is committed to these values and only works with partners that adhere to them.

Have an idea for a project that will add value for arXiv's community? Learn more about arXivLabs.

Which authors of this paper are endorsers? | Disable MathJax (What is MathJax?)
  • About
  • Help
  • contact arXivClick here to contact arXiv Contact
  • subscribe to arXiv mailingsClick here to subscribe Subscribe
  • Copyright
  • Privacy Policy
  • Web Accessibility Assistance
  • arXiv Operational Status
    Get status notifications via email or slack