Skip to main content
QUICK REVIEW

[Paper Review] Awareness and Experience of Developers to Outdated and License-Violating Code on Stack Overflow: An Online Survey

Chaiyong Ragkhitwetsagul, Jens Krinke|arXiv (Cornell University)|Jun 21, 2018
Software Engineering ResearchComputer Science9 references9 citations
TL;DR

This study investigates developers' awareness and experiences with outdated and license-violating code snippets on Stack Overflow through two online surveys of answerers (n=200) and visitors (n=89). Findings reveal that 19% of answerers rarely or never update outdated code, 98% omit licenses in their snippets, and 85% of visitors are unaware of Stack Overflow’s CC BY-SA 3.0 license, with 66% not checking for licensing conflicts—highlighting a critical need for improved user awareness on code reuse risks.

ABSTRACT

We performed two online surveys of Stack Overflow answerers and visitors to assess their awareness to outdated code and software licenses in Stack Overflow answerers. The answerer survey targeted 607 highly reputed Stack Overflow users and received a high response rate of 33%. Our findings are as follows. Although most of the code snippets in the answers are written from scratch, there are code snippets cloned from the corresponding questions, from personal or company projects, or from open source projects. Stack Overflow answerers are aware that some of their snippets are outdated. However, 19% of the participants report that they rarely or never fix their outdated code. At least 98% of the answerers never include software licenses in their snippets and 69% never check for licensing conflicts with Stack Overflow's CC BY-SA 3.0 if they copy the code from other sources to Stack Overflow answers. The visitor survey uses convenient sampling and received 89 responses. We found that 66% of the participants experienced a problem from cloning and reusing Stack Overflow snippets. Fifty-six percent of the visitors never reported the problems back to the Stack Overflow post. Eighty-five percent of the participants are not aware that StackOverflow applies the CC BY-SA 3.0 license, and sixty-two percent never give attributions to Stack Overflow posts or answers they copied the code from. Moreover, 66% of the participants do not check for licensing conflicts between the copied Stack Overflow code and their software. With these findings, we suggest Stack Overflow raise awareness of their users, both answerers and visitors, to the problem of outdated and license-violating code snippets.

Motivation & Objective

  • To assess developers’ awareness and experiences with outdated and license-violating code snippets in Stack Overflow answers.
  • To investigate the origins of code snippets in Stack Overflow answers, particularly cloning from external sources.
  • To examine how developers handle licensing and obsolescence when reusing code from Stack Overflow.
  • To identify gaps in attribution, license checking, and reporting of problematic code among both answerers and visitors.
  • To recommend platform-level interventions to improve awareness of code reuse risks on Stack Overflow.

Proposed method

  • Conducted two online surveys: one targeting 607 highly reputed Stack Overflow answerers with a 33% response rate.
  • Used a second survey with convenient sampling to collect responses from 89 Stack Overflow visitors.
  • Collected data on code snippet origins, awareness of licensing (especially CC BY-SA 3.0), and practices around updating or attributing code.
  • Analyzed responses to identify patterns in code reuse, license omission, and lack of conflict checking.
  • Compared findings between answerers (content creators) and visitors (code reusers) to assess systemic risks.

Experimental results

Research questions

  • RQ1To what extent are Stack Overflow answerers aware of outdated code in their own answers, and how often do they update such code?
  • RQ2How frequently do answerers include software licenses in their code snippets, and how often do they check for licensing conflicts when copying from external sources?
  • RQ3How aware are Stack Overflow visitors of the CC BY-SA 3.0 license, and what proportion give proper attribution when reusing code snippets?
  • RQ4What percentage of visitors experience issues such as bugs, obsolescence, or licensing conflicts after reusing code from Stack Overflow?
  • RQ5How often do visitors report problems back to the original Stack Overflow posts?

Key findings

  • 19% of Stack Overflow answerers rarely or never fix outdated code snippets in their answers, despite being aware of the issue.
  • 98% of answerers never include a software license in their code snippets, even when copying from external sources.
  • 69% of answerers never check for licensing conflicts with the original source when copying code to Stack Overflow.
  • 85% of visitors are unaware that Stack Overflow applies the CC BY-SA 3.0 license to code snippets.
  • 62% of visitors never give attribution to Stack Overflow posts when reusing code snippets.
  • 66% of visitors do not check for licensing conflicts between reused Stack Overflow code and their own software projects.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.