arrow
Return

Automatic Code Summarization Using Abbreviation Expansion and Subword Segmentation

delete2025-01-08
delete0
PRE
AI
Y
Yuguo Liang
G
Guisheng Fan
余
余慧群 (Huiqun Yu) *
M
Mingchen Li
Z
Zijie Huang
DOI:10.1111/exsy.13835delete
deleteOriginal
deleteOriginal request for help
deleteShare
deleteSave
Abstract

Abstract

En 中文
Automatic code summarization refers to generating concise natural language descriptions for code snippets. It is vital for improving the efficiency of program understanding among software developers and maintainers. Despite the impressive strides made by deep learning-based methods, limitations still exist in their ability to understand and model semantic information due to the unique nature of programming languages. We propose two methods to boost code summarization models: context-based abbreviation expansion and unigram language model-based subword segmentation. We use heuristics to expand abbreviations within identifiers, reducing semantic ambiguity and improving the language alignment of code summarization models. Furthermore, we leverage subword segmentation to tokenize code into finer subword sequences, providing more semantic information during training and inference, thereby enhancing program understanding. These methods are model-agnostic and can be readily integrated into existing automatic code summarization approaches. Experiments conducted on two widely used Java code summarization datasets demonstrated the effectiveness of our approach. Specifically, by fusing original and modified code representations into the Transformer model, our Semantic Enhanced Transformer for Code Summarizsation (SETCS) serves as a robust semantic-level baseline. By simply modifying the datasets, our methods achieved performance improvements of up to 7.3%, 10.0%, 6.7%, and 3.2% for representative code summarization models in terms of BLEU-4, METEOR, ROUGE-L and SIDE, respectively.
Keywords:
automatic code summarization
code abbreviation expansion
deep learning
program understanding
subword segmentation

Journal

Expert Systems cover
Expert Systems
IF:
2.3
Papers:
2.6K
Citations:
3.8K

Organization

No organization information available
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
Summarizing source code through heterogeneous feature fusion and extraction
err2024-03-01
err0
PREAI
errGuo, Juncai; Liu, Jin; Liu, Xiao; Li, Li
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
“It's almost like they're trying to hide it”: How User-Provided Image Descriptions Have Failed to Make Twitter Accessible
err2019-05-13
err0
errOAAI
errCole Gleason; Patrick Carrington; Cameron Cassidy; Meredith Ringel Morris; Kris M. Kitani; Jeffrey P. Bigham
errShare
errSave
Hemospermia
err1975-09-01
err0
PREAI
errD.A. Tolley; J.E. Castro
errShare
errSave
errShare
errSave
Establishment and characterization of a new triple-negative canine mammary cancer cell line
err2018-10-01
err0
PREAI
errHong Zhang; Shimin Pei; Bin Zhou; Huanan Wang; Hongchao Du; Di Zhang; Degui Lin
errShare
errSave
researcher View more