arrow
Return

Learning a holistic and comprehensive code representation for code summarization

delete2023-09-01
delete2
PRE
AI
K
Kaiyuan Yang
王军锋 cover
王军锋 (Junfeng Wang) *
Z
Zihua Song
DOI:10.1016/j.jss.2023.111746delete
deleteOriginal
deleteShare
deleteSave
Abstract

Abstract

En 中文
Code summarization is the task of describing the function of code snippets in natural language, which benefits program comprehension and boosts software productivity. Despite lots of effort made by previous studies, existing models are not comprehensive enough to represent code, and yet the literature does not consider to model source code with API usage from a holistic perspective. To this end, this paper proposes a novel multi-modal code summarization approach called HCCS (Learning a Holistic and Comprehensive code representation for Code Summarization). We first design a neural network based on the graph attention mechanism to encode API Context Graph (ACG), which highlights holistic information of source code. Then, a multi-modal framework with a tree encoder for Abstract Syntax Tree (AST) and a code encoder for code tokens is incorporated to learn a more comprehensive code representation. Afterwards, we propose a fusing layer to integrate the encodings, which are then passed to a joint-decoder to generate summaries. The experimental results show that HCCS achieves better performance than the state of the arts (i.e., HCCS scores 9.5% higher in terms of BLEU metric and 11.46% in terms of BERTScore). As a result, HCCS is an effective approach to generate high-quality summaries.(c) 2023 Elsevier Inc. All rights reserved.
Keywords:
Code summarization
API
Deep learning
Program comprehension
Summarizing source code with hierarchical code representation
err2022-03-01
err14
PREAI
errZhou, Ziyi; Yu, Huiqun; Fan, Guisheng; Huang, Zijie; Yang, Xingguang
errShare
errSave
ClassSum: a deep learning model for class-level code summarization
err2022-10-10
err0
PREAI
errMingchen Li; Huiqun Yu; Guisheng Fan; Ziyi Zhou; Jiawen Huang
errShare
errSave
An Extractive-and-Abstractive Framework for Source Code Summarization
err2024-03-14
err5
errOAAI
errSun, Weisong; Fang, Chunrong; Chen, Yuchen; Zhang, Quanjun; Tao, Guanhong; You, Yudu; Han, Tingxu; Ge, Yifei; Hu, Yuling; Luo, Bin; Chen, Zhenyu
errShare
errSave
Autofolding for Source Code Summarization
err2017-12-01
err37
errOAAI
errFowkes, Jaroslav; Chanthirasegaran, Pankajan; Ranca, Razvan; Allamanis, Miltiadis; Lapata, Mirella; Sutton, Charles
errShare
errSave
Esale: Enhancing Code-Summary Alignment Learning for Source Code Summarization
err2024-08-01
err2
PREAI
errFang, Chunrong; Sun, Weisong; Chen, Yuchen; Chen, Xiao; Wei, Zhao; Zhang, Quanjun; You, Yudu; Luo, Bin; Liu, Yang; Chen, Zhenyu
errShare
errSave
Towards Retrieval-Based Neural Code Summarization: A Meta-Learning Approach
err2023-04-01
err6
PREAI
errZhou, Ziyi; Yu, Huiqun; Fan, Guisheng; Huang, Zijie; Yang, Kang
errShare
errSave

Journal

Journal of Systems and Software cover
Journal of Systems and Software
IF:
4.1
Papers:
5.5K
Citations:
1.0W

Organization

Sichuan University cover
Sichuan University
Scholars:
1.2W
Papers: 2.9K
Citations: 5.6W
Cited Papers

Cited Papers

Measuring Program Comprehension: A Large-Scale Field Study with Professionals
err2018-10-01
err195
errOAAI
errXia, Xin; Bao, Lingfeng; Lo, David; Xing, Zhenchang; Hassan, Ahmed E.; Li, Shanping
errShare
errSave
Automatic source code summarization with graph attention networks
err2022-06-01
err26
errOAAI
errZhou, Yu; Shen, Juanjuan; Zhang, Xiaoqing; Yang, Wenhua; Han, Tingting; Chen, Taolue
errShare
errSave
SequenceR: Sequence-to-Sequence Learning for End-to-End Program Repair
err2021-01-01
err217
errOAAI
errChen, Zimin; Kommrusch, Steve; Tufano, Michele; Pouchet, Louis-Noel; Poshyvanyk, Denys; Monperrus, Martin
errShare
errSave
SeCNN: A semantic CNN parser for code comment generation
err2021-11-01
err30
PREAI
errLi, Zheng; Wu, Yonghao; Peng, Bin; Chen, Xiang; Sun, Zeyu; Liu, Yong; Yu, Deli
errShare
errSave
Reinforcement-Learning-Guided Source Code Summarization Using Hierarchical Attention
err2022-01-01
err61
errOAAI
errWang, Wenhua; Zhang, Yuqun; Sui, Yulei; Wan, Yao; Zhao, Zhou; Wu, Jian; Yu, Philip S.; Xu, Guandong
errShare
errSave
researcher View more