Automatic Assessments of Code Explanations: Predicting Answering Times on Stack Overflow

Selman Ercan, Quinten Stokkink, Alberto Bacchelli

Research output: Chapter in Book/Conference proceedings/Edited volumeConference contributionScientificpeer-review

5 Citations (Scopus)


Users of Question & Answer websites often include code fragments in their questions. However, large and unexplained code fragments make it harder for others to understand the question, thus possibly impacting the time required to obtain a correct answer. In this paper, we quantitatively study this relation: We look at questions containing code fragments and investigate the influence of explaining these fragments better on the time to answer. We devise an approach to quantify code explanations and apply it to ~300K posts. We find that it causes up to a 5σ (single-tail significant) increase in precision over baseline prediction times. This supports the use of our approach as an `edit suggestion': Questions with a low score could trigger a warning suggesting the user to better explain the included code.
Original languageEnglish
Title of host publicationProceedings of the 12th Working Conference on Mining Software Repositories, MSR 2015
EditorsM. Di Penta
Place of PublicationPiscataway.NJ
PublisherIEEE Society
Number of pages4
ISBN (Print)978-0-7695-5594-2
Publication statusPublished - 2015
EventMSR 2015, Florence, Italy - Piscataway
Duration: 16 May 201517 May 2015


ConferenceMSR 2015, Florence, Italy

Bibliographical note



  • stack overflow
  • answering time


Dive into the research topics of 'Automatic Assessments of Code Explanations: Predicting Answering Times on Stack Overflow'. Together they form a unique fingerprint.

Cite this