Project-Level Encoding for Neural Source Code Summarization of Subroutines

被引:19
|
作者
Bansal, Aakash [1 ]
Haque, Sakib [1 ]
McMillan, Collin [1 ]
机构
[1] Univ Notre Dame, Dept Comp Sci & Engn, Notre Dame, IN 46556 USA
关键词
source code summarization; automatic documentation generation; neural networks; PROGRAM COMPREHENSION;
D O I
10.1109/ICPC52881.2021.00032
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
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.g. "compresses data to a zip file") can help readers rapidly comprehend what a subroutine does without resorting to reading the code itself. Techniques based on neural networks (and encoder-decoder model designs in particular) have established themselves as the state-of-the-art. Yet a problem widely recognized with these models is that they assume the information needed to create a summary is present within the code being summarized itself - an assumption which is at odds with program comprehension literature. Thus a current research frontier lies in the question of encoding source code context into neural models of summarization. In this paper, we present a project-level encoder to improve models of code summarization. By project-level, we mean that we create a vectorized representation of selected code files in a software project, and use that representation to augment the encoder of state-of-the-art neural code summarization techniques. We demonstrate how our encoder improves several existing models, and provide guidelines for maximizing improvement while controlling time and resource costs in model size.
引用
收藏
页码:253 / 264
页数:12
相关论文
共 50 条
  • [21] Survey on Neural Network-based Automatic Source Code Summarization Technologies
    Song X.-T.
    Sun H.-L.
    Ruan Jian Xue Bao/Journal of Software, 2022, 33 (01): : 55 - 77
  • [22] A review of automatic source code summarization
    Zhang, Xuejun
    Hou, Xia
    Qiao, Xiuming
    Song, Wenfeng
    Empirical Software Engineering, 2024, 29 (06)
  • [23] Distilled GPT for source code summarization
    Chia-Yi Su
    Collin McMillan
    Automated Software Engineering, 2024, 31
  • [24] TASSAL: Autofolding for Source Code Summarization
    Fowkes, Jaroslav
    Chanthirasegaran, Pankajan
    Ranca, Razvan
    Allamanis, Miltiadis
    Lapata, Mirella
    Sutton, Charles
    2016 IEEE/ACM 38TH INTERNATIONAL CONFERENCE ON SOFTWARE ENGINEERING COMPANION (ICSE-C), 2016, : 649 - 652
  • [25] Recommendations for Datasets for Source Code Summarization
    LeClair, Alex
    McMillan, Collin
    2019 CONFERENCE OF THE NORTH AMERICAN CHAPTER OF THE ASSOCIATION FOR COMPUTATIONAL LINGUISTICS: HUMAN LANGUAGE TECHNOLOGIES (NAACL HLT 2019), VOL. 1, 2019, : 3931 - 3937
  • [26] Pyramid Attention For Source Code Summarization
    Chai, Lei
    Li, Ming
    ADVANCES IN NEURAL INFORMATION PROCESSING SYSTEMS 35 (NEURIPS 2022), 2022,
  • [27] Distilled GPT for source code summarization
    Su, Chia-Yi
    McMillan, Collin
    AUTOMATED SOFTWARE ENGINEERING, 2024, 31 (01)
  • [28] Recommendations for Datasets for Source Code Summarization
    LeClair, Alex
    McMillan, Collin
    arXiv, 2019,
  • [29] A Survey of Automatic Source Code Summarization
    Zhang, Chunyan
    Wang, Junchao
    Zhou, Qinglei
    Xu, Ting
    Tang, Ke
    Gui, Hairen
    Liu, Fudong
    SYMMETRY-BASEL, 2022, 14 (03):
  • [30] A Neural-Network based Code Summarization Approach by Using Source Code and its Call Dependencies
    Liu, Bohong
    Wang, Tao
    Zhang, Xunhui
    Fan, Qiang
    Yin, Gang
    Deng, Jinsheng
    11TH ASIA-PACIFIC SYMPOSIUM ON INTERNETWARE (INTERNETWARE 2019), 2019,