Understanding How Developers Reuse Stack Overflow Code in Their GitHub Projects

It appears your Web browser is not configured to display PDF files. Download adobe Acrobat or click here to download the PDF file.

Click here to download the PDF file.


Tekieh, Razieh




Stack Overflow and other popular Q&A forums include a variety of reusable code snippets for software developers. In a software system, this reuse of code is referred to as "code cloning". In this study we look into how software developers reused and adopted code snippets from Stack Overflow in projects hosted on GitHub. The first part of the study concentrates on finding clones between Stack Overflow and GitHub code snippets and its challenges. Based on findings, developers are more likely to integrate Stack Overflow code snippets rather than use them directly in their projects. In the second part we develop and test multi-label classifiers for predicting the types of code clones for four feature sets. The results reveal that most of the models are likely overfit for the majority class. However, the best classifier was able to predict clone types with a F1-Score more than 76%.


Computer Science




Carleton University

Thesis Degree Name: 

Master of Computer Science: 

Thesis Degree Level: 


Thesis Degree Discipline: 

Computer Science

Parent Collection: 

Theses and Dissertations

Items in CURVE are protected by copyright, with all rights reserved, unless otherwise indicated. They are made available with permission from the author(s).