Automated source code summarization is a task that generates summarized information about the purpose, usage, and--or implementation of methods and classes to support understanding of these code entities. Multiple approaches and techniques have been proposed for supervised and unsupervised learning in code summarization, however, they were mostly focused on generating a summary for a piece of code. In addition, very few works have leveraged unofficial documentation. This paper proposes an automatic and novel approach for summarizing Android API methods discussed in Stack Overflow that we consider as unofficial documentation in this research. Our approach takes the API method's name as an input and generates a natural language summary based on Stack Overflow discussions of that API method. We have conducted a survey that involves 16 Android developers to evaluate the quality of our automatically generated summaries and compare them with the official Android documentation. Our results demonstrate that while developers find the official documentation more useful in general, the generated summaries are also competitive, in particular for offering implementation details, and can be used as a complementary source for guiding developers in software development and maintenance tasks.
翻译:自动源代码汇总是一项任务,它生成了关于支持理解这些代码实体的方法和班级的目的、使用和/或实施情况的汇总信息。提出了多种方法和技术,用于在代码汇总中监督和不受监督的学习。然而,这些方法和技术大多侧重于生成一个代码的概要。此外,很少有作品利用了非官方文件。本文提出了一种自动和新颖的方法,用于总结在Stack Overproll中讨论的、我们认为是本研究中非正式文件的Android API方法。我们的方法采用API方法的名称,作为投入,根据对API方法的堆积过度讨论产生自然语言概要。我们进行了一项调查,有16个机器人开发商参与,以评估我们自动生成的概要的质量,并将其与官方的机器人文件进行比较。我们的结果表明,虽然开发商发现正式文件在总体上更加有用,但生成的概要也具有竞争力,特别是提供实施细节,并且可以用作指导软件开发商开发和维护任务的辅助来源。