arrow
Return

An Extractive-and-Abstractive Framework for Source Code Summarization

delete2024-03-14
delete5
delete
OA
AI
W
Weisong Sun
房
房春荣 (Chunrong Fang) *
Y
Yuchen Chen
Q
Quanjun Zhang
G
Guanhong Tao
Y
Yudu You
T
Tingxu Han
Y
Yifei Ge
Y
Yuling Hu
骆斌 cover
骆斌 (Bin Luo)
陈
陈振宇 (Zhenyu Chen)
DOI:10.1145/3632742delete
deleteOriginal
deleteOriginal request for help
deleteShare
deleteSave
Abstract

Abstract

En 中文
(Source) Code summarization aims to automatically generate summaries/comments for given code snippets in the form of natural language. Such summaries play a key role in helping developers understand and maintain source code. Existing code summarization techniques can be categorized into extractive methods and abstractive methods. The extractive methods extract a subset of important statements and keywords from the code snippet using retrieval techniques and generate a summary that preserves factual details in important statements and keywords. However, such a subset may miss identifier or entity naming, and consequently, the naturalness of the generated summary is usually poor. The abstractive methods can generate human-written-like summaries leveraging encoder-decoder models. However, the generated summaries often miss important factual details. To generate human-written-like summaries with preserved factual details, we propose a novel extractive-and-abstractive framework. The extractive module in the framework performs the task of extractive code summarization, which takes in the code snippet and predicts important statements containing key factual details. The abstractivemodule in the framework performs the task of abstractive code summarization, which takes in the code snippet and important statements in parallel and generates a succinct and human-written-like natural language summary. We evaluate the effectiveness of our technique, called EACS, by conducting extensive experiments on three datasets involving six programming languages. Experimental results show that EACS significantly outperforms state-of-the-art techniques for all three widely used metrics, including BLEU, METEOR, and ROUGH-L. In addition, the human evaluation demonstrates that the summaries generated by EACS have higher naturalness and informativeness and are more relevant to given code snippets.
Keywords:
Code summarization
extractive code summarization
abstractive code summarization program comprehension

Journal

A
ACM Transactions on Software Engineering and Methodology
IF:
6.2
Papers:
1.2K
Citations:
3.4K

Organization

Purdue University System cover
Purdue University System
Scholars:
4.0W
Papers: 3.6W
Citations: 66
N
nanjing university
Scholars:
7.8W
Papers: 5.6W
Citations: 87
Cited Papers

Cited Papers

err
IF0
err
err0
errOAAI
err
errShare
errSave
SCALING WITH KNOWN UNCERTAINTY: A SYNTHESIS
err2006-01-01
err0
PREAI
errJIANGUO WU; HARBIN LI; K. BRUCE JONES; ORIE L. LOUCKS
errShare
errSave
Ninety-six suspected transfusion related acute lung injury cases: Investigation findings and clinical outcome
err2013-09-04
err0
errOAAI
errNay Win; Edwin Massey; Geoff Lucas; Deborah Sage; Colin Brown; Ann Green; Marcela Contreras; Cristina Navarrete
errShare
errSave
Homeobox Gene Involvement in Normal Hematopoiesis and in the Pathogenesis of Childhood Leukemias
err2017-01-01
err0
PREAI
errMaria Adamaki; Maria Goulielmaki; Ioannis Christodoulou; Spiros Vlahopoulos; Vassilis Zoumpourlis
errShare
errSave
errShare
errSave
errShare
errSave
Molecular carcinogenesis in equine penile cancer: A potential animal model for human penile cancer
err2018-12-01
err0
PREAI
errAlejandro Suárez-Bonnet; Claire Willis; Rachel Pittaway; Ken Smith; Tim Mair; Simon L. Priestnall
errShare
errSave
researcher View more