Title
Some from here, some from there: cross-project code reuse in GitHub.
Abstract
Code reuse has well-known benefits on code quality, coding efficiency, and maintenance. Open Source Software (OSS) programmers gladly share their own code and they happily reuse others'. Social programming platforms like GitHub have normalized code foraging via their common platforms, enabling code search and reuse across different projects. Removing project borders may facilitate more efficient code foraging, and consequently faster programming. But looking for code across projects takes longer and, once found, may be more challenging to tailor to one's needs. Learning how much code reuse goes on across projects, and identifying emerging patterns in past cross-project search behavior may help future foraging efforts. To understand cross-project code reuse, here we present an in-depth study of cloning in GitHub. Using Deckard, a clone finding tool, we identified copies of code fragments across projects, and investigate their prevalence and characteristics using statistical and network science approaches, and with multiple case studies. By triangulating findings from different methods, we find that cross-project cloning is prevalent in GitHub, ranging from cloning few lines of code to whole project repositories. Some of the projects serve as popular sources of clones, and others seem to contain more clones than their fair share. Moreover, we find that ecosystem cloning follows an onion model: most clones come from the same project, then from projects in the same application domain, and finally from projects in different domains. Our results show directions for new tools that can facilitate code foraging and sharing within GitHub.
Year
DOI
Venue
2017
10.1109/MSR.2017.15
MSR
Keywords
Field
DocType
code reuse,cross-project clones,GitHub
Network science,World Wide Web,Reuse,Computer science,Application domain,Code reuse,Software quality,Java,Onion model,Source lines of code
Conference
ISSN
ISBN
Citations 
2160-1852
978-1-5386-1545-4
9
PageRank 
References 
Authors
0.54
28
3
Name
Order
Citations
PageRank
Mohammad Gharehyazie1503.16
Baishakhi Ray273734.84
Vladimir Filkov3150375.32