Code Summarization with Abstract Syntax Tree

被引:8
|
作者
Chen, Qiuyuan [1 ]
Hu, Han [2 ]
Liu, Zhaoyi [3 ]
机构
[1] Zhejiang Univ, Coll Comp Sci & Technol, Hangzhou, Peoples R China
[2] Tsinghua Univ, Sch Software, Beijing, Peoples R China
[3] Peking Univ, Sch Shenzhen Grad, Shenzhen 518055, Peoples R China
关键词
Code summarization; Code clone; Code representation;
D O I
10.1007/978-3-030-36802-9_69
中图分类号
TP18 [人工智能理论];
学科分类号
081104 ; 0812 ; 0835 ; 1405 ;
摘要
Code summarization, which provides a high-level description of the function implemented by code, plays a vital role in software maintenance and code retrieval. Traditional approaches focus on retrieving similar code snippets to generate summaries, and recently researchers pay increasing attention to leverage deep learning approaches, especially the encoder-decoder framework. Approaches based on encoder-decoder suffer from two drawbacks: (a) Lack of summarization in functionality level; (b) Code snippets are always too long (more than ten words), regular encoders perform poorly. In this paper, we propose a novel code representation with the help of Abstract Syntax Trees, which could describe the functionality of code snippets and shortens the length of inputs. Based on our proposed code representation, we develop Generative Task, which aims to generate summary sentences of code snippets. Experiments on large-scale real-world industrial Java projects indicate that our approaches are effective and outperform the state-of-the-art approaches in code summarization.
引用
收藏
页码:652 / 660
页数:9
相关论文
共 50 条
  • [41] Automating Abstract Syntax Tree construction for Context Free Grammars
    Arusoaie, Andrei
    Vicol, Daniel Ionut
    14TH INTERNATIONAL SYMPOSIUM ON SYMBOLIC AND NUMERIC ALGORITHMS FOR SCIENTIFIC COMPUTING (SYNASC 2012), 2012, : 152 - 159
  • [42] A Program Plagiarism Detection Approach Based On Abstract Syntax Tree
    Xiong, Hao
    Yan, Hai-hua
    Li, Zhou-jun
    Li, Hu
    ICAIE 2009: PROCEEDINGS OF THE 2009 INTERNATIONAL CONFERENCE ON ARTIFICIAL INTELLIGENCE AND EDUCATION, VOLS 1 AND 2, 2009, : 196 - 205
  • [43] Loop Transformations using Clang's Abstract Syntax Tree
    Kruse, Michael
    50TH INTERNATIONAL CONFERENCE ON PARALLEL PROCESSING WORKSHOP PROCEEDINGS - ICPP WORKSHOPS '21, 2021,
  • [44] Visualizing Project Evolution Through Abstract Syntax Tree Analysis
    Feist, Michael D.
    Santos, Eddie Antonio
    Watts, Ian
    Hindle, Abram
    2016 IEEE WORKING CONFERENCE ON SOFTWARE VISUALIZATION, 2016, : 11 - 20
  • [45] Exploring the Effectiveness of Abstract Syntax Tree Patterns for Algorithm Recognition
    Neumuller, Denis
    Straub, Raphael
    Sihler, Florian
    Tichy, Matthias
    PROCEEDINGS OF THE 4TH INTERNATIONAL CONFERENCE ON CODE QUALITY, ICCQ 2024, 2024,
  • [46] Deep Learning With Customized Abstract Syntax Tree for Bug Localization
    Liang, Hongliang
    Sun, Lu
    Wang, Meilin
    Yang, Yuxing
    IEEE ACCESS, 2019, 7 : 116309 - 116320
  • [47] Clone detection algorithm based on the Abstract Syntax Tree approach
    Lazar, Flavius-Mihai
    Banias, Ovidiu
    2014 IEEE 9TH INTERNATIONAL SYMPOSIUM ON APPLIED COMPUTATIONAL INTELLIGENCE AND INFORMATICS (SACI), 2014, : 73 - 78
  • [48] Automatic Source Code Summarization with Extended Tree-LSTM
    Shido, Yusuke
    Kobayashi, Yasuaki
    Yamamoto, Akihiro
    Miyamoto, Atsushi
    Matsumura, Tadayuki
    2019 INTERNATIONAL JOINT CONFERENCE ON NEURAL NETWORKS (IJCNN), 2019,
  • [49] Effective pattern matching of source code using abstract syntax patterns
    Atkinson, DC
    Griswold, WG
    SOFTWARE-PRACTICE & EXPERIENCE, 2006, 36 (04): : 413 - 447
  • [50] PSIMINER: A Tool for Mining Rich Abstract Syntax Trees from Code
    Spirin, Egor
    Bogomolov, Egor
    Kovalenko, Vladimir
    Bryksin, Timofey
    2021 IEEE/ACM 18TH INTERNATIONAL CONFERENCE ON MINING SOFTWARE REPOSITORIES (MSR 2021), 2021, : 13 - 17