Automatic Assessments of Code Explanations

Predicting Answering Times on Stack Overflow

More Info
expand_more

Abstract

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.