Code Cloning Habits Of The Jupyter Notebook Community : Code Cloning Habits Of The Jupyter Notebook Community

Code reuse has the benefits of saving time and resources but poses a risk when attempting to tailor copied code for a new purpose or in cases when such copies are buggy or otherwise faulty. In the field of data science, the web application JupyterNotebook is a popular tool for creating computational...

Full description

Bibliographic Details
Main Author: Sigvardsson, Ulf
Format: Others
Language:English
Published: Uppsala universitet, Institutionen för informationsteknologi 2019
Subjects:
Online Access:http://urn.kb.se/resolve?urn=urn:nbn:se:uu:diva-415391
Description
Summary:Code reuse has the benefits of saving time and resources but poses a risk when attempting to tailor copied code for a new purpose or in cases when such copies are buggy or otherwise faulty. In the field of data science, the web application JupyterNotebook is a popular tool for creating computational notebooks, documents containing both plain text and code snippets, many of which are publicly available on code hosting sites such as GitHub. This thesis describes the acquisition of approximately 2.6 million computational notebooks and analysis of this data set.By hashing the contents of every code snippet, using the MD5 hashing algorithm,cloned snippets were found through snippets producing identical hashes. By subsequently mapping the snippets to their corresponding notebooks, the relative originality of a notebook could be determined. This analysis shows that nearly 95% of notebooks are written in some version of Python. Furthermore, nearly 54% of notebooks in the data set are comprised of code blocks also found in other notebooks and, on average, approximately 70% of the code in any given notebookis copied from elsewhere.