Understanding Stack Overflow Code Fragments
Open accessThe DOI matches its Crossref record; 5 of the 5 references it cites were found in a registry or an index.
Abstract
Code fragments posted in answers on Q&A forums can form an important source of developer knowledge. However, effective reuse of code fragments found online often requires information other than the code fragment alone. We report on the results of a survey-based study to investigate to what extent developers perceive Stack Overflow code fragments to be self-explanatory. As part of the study, we also investigated the types of information missing from fragments that were not self-explanatory. We find that less than half of the Stack Overflow code fragments in our sample are considered to be self-explanatory by the 321 participants who answered our survey, and that the main issues that negatively affect code fragment understandability include incomplete fragments, code quality, missing rationale, code organization, clutter, naming issues, and missing domain information. This study is a step towards understanding developers' information needs as they relate to code fragments, and how these needs can be addressed.
Overview
The claims and statistics of this paper haven’t been checked yet.
Free: it reads the open-access text and checks the first 5 claims that cite a source we can check. Create a free account to check every claim.
Integrity signals
Registry
Cites
Statistics
Verification
Claims the paper makes
The claims and statistics of this paper haven’t been checked yet.
Free: it reads the open-access text and checks the first 5 claims that cite a source we can check. Create a free account to check every claim.
Self-check
Percentages, sums and reported differences re-computed from the paper’s own numbers.
The self-check needs the paper’s full text.
Citations
Cites
Information Needs in Collocated Software Development Teams
Ko, A. J., DeLine, R., & Venolia, G. (2007) · 29th International Conference on Software Engineering (ICSE'07) · doi:10.1109/icse.2007.45 · Cited by 499 · cited 1×
“[13] found that the most frequently sought information included awareness about artifacts and coworkers.”
BackgroundQuestions programmers ask during software evolution tasks
Sillito, J., Murphy, G. C., & De Volder, K. (2006) · Proceedings of the 14th ACM SIGSOFT international symposium on Foundations of software engineering · doi:10.1145/1181775.1181779 · Cited by 270 · cited 1×
“[11] provided a similar list focusing on questions during evolution tasks.”
BackgroundUsing information fragments to answer the questions developers ask
Fritz, T., & Murphy, G. C. (2010) · Proceedings of the 32nd ACM/IEEE International Conference on Software Engineering - Volume 1 · doi:10.1145/1806799.1806828 · Cited by 163
Hard-to-answer questions about code
LaToza, T. D., & Myers, B. A. (2010) · Evaluation and Usability of Programming Languages and Tools · doi:10.1145/1937117.1937125 · Cited by 141 · cited 1×
“LaToza and Myers [12] found that the most difficult questions from a developer’s perspective dealt with intent and rationale.”
BackgroundNLP2Code: Code Snippet Content Assist via Natural Language Tasks
Campbell, B. A., & Treude, C. (2017) · 2017 IEEE International Conference on Software Maintenance and Evolution (ICSME) · doi:10.1109/icsme.2017.56 · Cited by 65
Self-citation
Cited by
NLP2Code: Code Snippet Content Assist via Natural Language Tasks
Campbell, B. A., & Treude, C. (2017) · 2017 IEEE International Conference on Software Maintenance and Evolution (ICSME) · doi:10.1109/icsme.2017.56 · Cited by 65
Self-citationA Survey on Online Learning Preferences for Computer Science and Programming
Escobar-Avila, J., Venuti, D., Di Penta, M., & Haiduc, S. (2019) · 2019 IEEE/ACM 41st International Conference on Software Engineering: Software Engineering Education and Training (ICSE-SEET) · doi:10.1109/icse-seet.2019.00026 · Cited by 24
A disruptive research playbook for studying disruptive innovations
Storey, M.-A., Russo, D., Novielli, N., Kobayashi, T., & Wang, D. (2024) · ACM Transactions on Software Engineering and Methodology · doi:10.1145/3678172 · Cited by 15
Metadata
- Authors
- Treude, C., & Robillard, M. P.
- Venue
- 2017 IEEE International Conference on Software Maintenance and Evolution (ICSME)
- Publisher
- IEEE
- Published
- 2017-09
- Pages
- 509-513
- OpenAlex
- W2767380523
- Cited by
- 56
- References
- 5
- FWCI
- 5.29
- Type
- conference paper
- Language
- en
- Open access
- green
About these checks
Registry, retraction, Cites and statistics results are computed, not judged, with one exception: a printed reference that no index lists is read once by a model before it counts as a citation error. Claims are extracted by a model and kept only when their quote appears verbatim in the text; each cited source is then checked, with a model’s help, for whether it says what the claim relies on. Those verdicts can be wrong — read the claim’s quote and the cited source before relying on one.
Statistics and arithmetic are recomputed, not judged.
Confidence bands are shown only for fields calibrated on our annotated test set. None is calibrated yet, so no band is shown.
What counts as a claim ›How we measure confidence ›How we check this ›
Are you an author, or do you see a problem with this page? Request a review
How to cite
Cite CoChat for the checks on this page, and the paper for its own findings.
- This page
- CoChat. (2026). Citation check: Understanding Stack Overflow Code Fragments. https://app.cochat.ai/papers/10.1109/icsme.2017.24
- The paper
- Treude, C., & Robillard, M. P. (2017). Understanding Stack Overflow Code Fragments. 2017 IEEE International Conference on Software Maintenance and Evolution (ICSME). https://doi.org/10.1109/icsme.2017.24
Data sources
Bibliographic data: Semantic Scholar, OpenAlex, Crossref.
Contains information from the Semantic Scholar Academic Graph Datasets, made available under the ODC Attribution License (ODC-BY 1.0).
Semantic Scholar’s data is described in: Kinney, R., et al. (2023). The Semantic Scholar Open Data Platform. arXiv:2301.10140.