Selection and Presentation Practices in Code Example Summarization

Annie Ying - PhD Candidate, McGill SOCS

Feb. 24, 2014, 12:10 p.m. - Feb. 24, 2014, 12:40 p.m.

MC320


Code examples are an important source for answering questions about software libraries and applications. Many usage contexts for code examples require them to be distilled to their essence: for example when serving as cues to longer documents, or for reminding developers of a previously-known idiom. We conducted a study on the practices employed by 16 programmers to summarize code examples. As part of the study, we collected 156 pairs of code examples and their summaries, along with over 26 hours of think-aloud verbalizations detailing the decisions of the participants during their summarization activities. We report on the summarization process, provide a list of practices followed by the participants to summarize code examples, and propose empirically-supported hypotheses justifying the use of specific practices. The results provide a grounded basis for the development of code example summarization technology. Special acknowledgements to the study's participants, many of whom are from SOCS!