Revisiting File Context for Source Code Summarization
Source code summarization is the task of writing natural language descriptions of source code. A typical use case is generating short summaries of subroutines for use in API documentation. The heart of almost all current research into code summarization is the encoder-decoder neural architecture, and the encoder input is almost always a single subroutine or other short code snippet. The problem with this setup is that the information needed to describe the code is often not present in the code itself -- that information often resides in other nearby code. In this paper, we revisit the idea of ``file context'' for code summarization. File context is the idea of encoding select information from other subroutines in the same file. We propose a novel modification of the Transformer architecture that is purpose-built to encode file context and demonstrate its improvement over several baselines. We find that file context helps on a subset of challenging examples where traditional approaches struggle.
Code (1)
Tasks
Code SummarizationDecoderSource Code SummarizationMethods 이 논문이 사용한 방법론
Similar Papers 제목 키워드 기반
Long-Range Modeling of Source Code Files with eWASH: Extended Window Access by Syntax Hierarchy
Statistical language modeling and translation with transformers have found many successful applications in program understanding and generation tasks, setting high benchmarks for tools in modern software development envi…
Code CompletionCode GenerationCode SummarizationLanguage Modeling+3Project-Level Encoding for Neural Source Code Summarization of Subroutines
Source code summarization of a subroutine is the task of writing a short, natural language description of that subroutine. The description usually serves in documentation aimed at programmers, where even brief phrase (e.…
Code SummarizationDecoderSource Code SummarizationHierarchical Repository-Level Code Summarization for Business Applications Using Local LLMs
In large-scale software development, understanding the functionality and intent behind complex codebases is critical for effective development and maintenance. While code summarization has been widely studied, existing m…
Code SummarizationRevisiting Cross-Lingual Summarization: A Corpus-based Study and A New Benchmark with Improved Annotation
Most existing cross-lingual summarization (CLS) work constructs CLS corpora by simply and directly translating pre-annotated summaries from one language to another, which can contain errors from both summarization and tr…
Conversation SummarizationNatural Language Summarization Enables Multi-Repository Bug Localization by LLMs in Microservice Architectures
Bug localization in multi-repository microservice architectures is challenging due to the semantic gap between natural language bug reports and code, LLM context limitations, and the need to first identify the correct re…
Cross-Modal Retrieval