当前位置: X-MOL 学术J. Syst. Softw. › 论文详情
Our official English website, www.x-mol.net, welcomes your feedback! (Note: you will need to create a separate account there.)
Generating summaries for methods of event-driven programs: An Android case study
Journal of Systems and Software ( IF 3.5 ) Pub Date : 2020-12-01 , DOI: 10.1016/j.jss.2020.110800
Alireza Aghamohammadi , Maliheh Izadi , Abbas Heydarnoori

The lack of proper documentation makes program comprehension a cumbersome process for developers. Source code summarization is one of the existing solutions to this problem. Lots of approaches have been proposed to summarize source code in recent years. A prevalent weakness of these solutions is that they do not pay much attention to interactions among elements of a software. An element is simply a callable code snippet such as a method or even a clickable button. As a result, these approaches cannot be applied to event-driven programs, such as Android applications, because they have specific features such as numerous interactions between their elements. To tackle this problem, we propose a novel approach based on deep neural networks and dynamic call graphs to generate summaries for methods of event-driven programs. First, we collect a set of comment/code pairs from Github and train a deep neural network on the set. Afterward, by exploiting a dynamic call graph, the Pagerank algorithm, and the pre-trained deep neural network, we generate summaries. An empirical evaluation with 14 real-world Android applications and 42 participants indicates 32.3% BLEU4 which is a definite improvement compared to the existing state-of-the-art techniques. We also assessed the informativeness and naturalness of our generated summaries from developers' perspectives and showed they are sufficiently understandable and informative.

中文翻译:

为事件驱动程序的方法生成摘要:Android 案例研究

缺乏适当的文档使得程序理解对开发人员来说是一个繁琐的过程。源代码摘要是该问题的现有解决方案之一。近年来,人们提出了许多方法来总结源代码。这些解决方案的一个普遍弱点是它们不太关注软件元素之间的交互。元素只是一个可调用的代码片段,例如一个方法甚至一个可点击的按钮。因此,这些方法不能应用于事件驱动的程序,例如 Android 应用程序,因为它们具有特定的特性,例如其元素之间的大量交互。为了解决这个问题,我们提出了一种基于深度神经网络和动态调用图的新方法来生成事件驱动程序方法的摘要。第一的,我们从 Github 收集了一组评论/代码对,并在该集合上训练了一个深度神经网络。之后,通过利用动态调用图、Pagerank 算法和预训练的深度神经网络,我们生成摘要。对 14 个真实世界的 Android 应用程序和 42 名参与者的实证评估表明,BLEU4 为 32.3%,与现有的最先进技术相比,这是一个明确的改进。我们还从开发人员的角度评估了我们生成的摘要的信息量和自然度,并表明它们具有足够的可理解性和信息量。对 14 个真实世界的 Android 应用程序和 42 名参与者的实证评估表明,BLEU4 为 32.3%,与现有的最先进技术相比,这是一个明确的改进。我们还从开发人员的角度评估了我们生成的摘要的信息量和自然度,并表明它们具有足够的可理解性和信息量。对 14 个真实世界的 Android 应用程序和 42 名参与者进行的实证评估表明,BLEU4 为 32.3%,与现有的最先进技术相比,这是一个明确的改进。我们还从开发人员的角度评估了我们生成的摘要的信息量和自然度,并表明它们具有足够的可理解性和信息量。
更新日期:2020-12-01
down
wechat
bug