JOURNAL ARTICLE

Function Call Graph Context Encoding for Neural Source Code Summarization

Aakash BansalZachary EberhartZachary KarasYu HuangCollin McMillan

Year: 2023 Journal:   IEEE Transactions on Software Engineering Vol: 49 (9)Pages: 4268-4281   Publisher: IEEE Computer Society

Abstract

Source code summarization is the task of writing natural language descriptions of source code. The primary use of these descriptions is in documentation for programmers. Automatic generation of these descriptions is a high value research target due to the time cost to programmers of writing these descriptions themselves. In recent years, a confluence of software engineering and artificial intelligence research has made inroads into automatic source code summarization through applications of neural models of that source code. However, an Achilles’ heel to a vast majority of approaches is that they tend to rely solely on the context provided by the source code being summarized. But empirical studies in program comprehension are quite clear that the information needed to describe code much more often resides in the context in the form of Function Call Graph surrounding that code. In this paper, we present a technique for encoding this call graph context for neural models of code summarization. We implement our approach as a supplement to existing approaches, and show statistically significant improvement over existing approaches. In a human study with 20 programmers, we show that programmers perceive generated summaries to generally be as accurate, readable, and concise as human-written summaries.

Keywords:
Computer science Automatic summarization Source code Program comprehension Call graph Code review Documentation Context (archaeology) Encoding (memory) Programming language KPI-driven code analysis Artificial intelligence Static program analysis Software Software system Software development

Metrics

15
Cited By
9.28
FWCI (Field Weighted Citation Impact)
91
Refs
0.97
Citation Normalized Percentile
Is in top 1%
Is in top 10%

Citation History

Topics

Software Engineering Research
Physical Sciences →  Computer Science →  Information Systems
Topic Modeling
Physical Sciences →  Computer Science →  Artificial Intelligence
Natural Language Processing Techniques
Physical Sciences →  Computer Science →  Artificial Intelligence

Related Documents

© 2026 ScienceGate Book Chapters — All rights reserved.