# Generating Summaries for Methods of Event-Driven Programs: an Android   Case Study

**Authors:** Alireza Aghamohammadi, Maliheh Izadi, Abbas Heydarnoori

arXiv: 1812.04530 · 2020-08-31

## TL;DR

This paper introduces a deep learning-based method for generating summaries of methods in event-driven Android programs, effectively capturing interactions among elements to improve comprehension.

## Contribution

It presents a novel approach combining deep neural networks and dynamic call graphs specifically tailored for event-driven applications, addressing limitations of previous code summarization techniques.

## Key findings

- Achieved 32.3% BLEU4 score, outperforming existing methods.
- Summaries are considered understandable and informative by developers.
- Method effectively captures interactions in event-driven programs.

## Abstract

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.

## Full text

_Full body text omitted from this summary view._ Fetch the complete paper as Markdown: https://tomesphere.com/paper/1812.04530/full.md

## Figures

19 figures with captions in the complete paper: https://tomesphere.com/paper/1812.04530/full.md

## References

73 references — full list in the complete paper: https://tomesphere.com/paper/1812.04530/full.md

---
Source: https://tomesphere.com/paper/1812.04530