Dataset Open Access

Usage and Attribution of Stack Overflow Code Snippets in GitHub Projects — Supplementary Material

Baltes, Sebastian


DataCite XML Export

<?xml version='1.0' encoding='utf-8'?>
<resource xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://datacite.org/schema/kernel-4" xsi:schemaLocation="http://datacite.org/schema/kernel-4 http://schema.datacite.org/meta/kernel-4.1/metadata.xsd">
  <identifier identifierType="DOI">10.5281/zenodo.1148070</identifier>
  <creators>
    <creator>
      <creatorName>Baltes, Sebastian</creatorName>
      <givenName>Sebastian</givenName>
      <familyName>Baltes</familyName>
      <nameIdentifier nameIdentifierScheme="ORCID" schemeURI="http://orcid.org/">0000-0002-2442-7522</nameIdentifier>
      <affiliation>University of Trier</affiliation>
    </creator>
  </creators>
  <titles>
    <title>Usage and Attribution of Stack Overflow Code Snippets in GitHub Projects — Supplementary Material</title>
  </titles>
  <publisher>Zenodo</publisher>
  <publicationYear>2018</publicationYear>
  <subjects>
    <subject>empirical study</subject>
    <subject>code snippets</subject>
    <subject>licensing</subject>
    <subject>stack overflow</subject>
    <subject>github</subject>
    <subject>online survey</subject>
    <subject>mining software repositories</subject>
  </subjects>
  <dates>
    <date dateType="Issued">2018-01-15</date>
  </dates>
  <resourceType resourceTypeGeneral="Dataset"/>
  <alternateIdentifiers>
    <alternateIdentifier alternateIdentifierType="url">https://zenodo.org/record/1148070</alternateIdentifier>
  </alternateIdentifiers>
  <relatedIdentifiers>
    <relatedIdentifier relatedIdentifierType="DOI" relationType="IsVersionOf">10.5281/zenodo.1148069</relatedIdentifier>
    <relatedIdentifier relatedIdentifierType="URL" relationType="IsPartOf">https://zenodo.org/communities/empirical-software-engineering</relatedIdentifier>
  </relatedIdentifiers>
  <version>2017-01-15</version>
  <rightsList>
    <rights rightsURI="https://creativecommons.org/licenses/by-sa/4.0/legalcode">Creative Commons Attribution Share Alike 4.0 International</rights>
    <rights rightsURI="info:eu-repo/semantics/openAccess">Open Access</rights>
  </rightsList>
  <descriptions>
    <description descriptionType="Abstract">&lt;p&gt;&lt;em&gt;Background:&lt;/em&gt; Stack Overflow (SO) is the largest Q&amp;amp;A website for software developers, providing a huge amount of copyable code snippets. Using those snippets raises various maintenance and legal issues. SO&amp;rsquo;s license (CC BY-SA 3.0) requires attribution, i.e., referencing the original question or answer, and requires derived work to adopt a compatible license. While there is a heated debate on SO&amp;rsquo;s license model for code snippets and the required attribution, little is known about the extent to which snippets are copied from SO without proper attribution.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Aim:&lt;/em&gt; Our main goal was to analyze how often code from SO posts is used in public GitHub projects, but not attributed as required by the license. Further, we wanted to investigate if developers are aware of SO&amp;rsquo;s license and its implications, and to what degree they adhere to the attribution requirements defined in SO&amp;rsquo;s terms of service.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Method:&lt;/em&gt; We present results of a large-scale empirical study analyzing the usage and attribution of non-trivial Java code snippets from SO answers in public GitHub projects. We followed three different approaches to triangulate an estimate for the ratio of unattributed usages and conducted two online surveys with software developers to complement our results.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Results:&lt;/em&gt; For the different sets of projects that we analyzed, the amount of projects containing files with a reference to SO varied between 3.3% and 11.9%. We found that at most 1.8% of all analyzed repositories containing code from SO used the code in a way compatible with CC BY-SA 3.0. Moreover, we estimate that at most a quarter of the copied code snippets from SO are attributed as required, i.e., using a link in a source code comment. About half of the surveyed developers admitted copying code from SO without attribution. Furthermore, about two thirds of them were not aware of the license of SO code snippets and its implications.&lt;/p&gt;</description>
  </descriptions>
</resource>
104
35
views
downloads
All versions This version
Views 104105
Downloads 3535
Data volume 245.4 MB245.4 MB
Unique views 9798
Unique downloads 66

Share

Cite as