• Complex
  • Title
  • Keyword
  • Abstract
  • Scholars
  • Journal
  • ISSN
  • Conference
搜索

Author:

Wang, Yanlin (Wang, Yanlin.) | Shi, Ensheng (Shi, Ensheng.) | Du, Lun (Du, Lun.) | Yang, Xiaodi (Yang, Xiaodi.) | Hu, Yuxuan (Hu, Yuxuan.) | Wang, Yanli (Wang, Yanli.) | Guo, Daya (Guo, Daya.) | Han, Shi (Han, Shi.) | Zhang, Hongyu (Zhang, Hongyu.) | Zhang, Dongmei (Zhang, Dongmei.)

Indexed by:

EI Scopus SCIE

Abstract:

Source code summaries are short natural language descriptions of code snippets that help developers better understand and maintain source code. There has been a surge of work on automatic code summarization to reduce the burden of writing summaries manually. However, contemporary approaches only leverage the information within the boundary of the method being summarized (i.e., local context), and ignore the broader context that could assist with code summarization. This paper explores two global contexts, namely intra-class and inter-class contexts, and proposes CoCoSUM: Context-Aware Code Summarization with Multi-Relational Graph Neural Network. CoCoSUM first incorporates class names as the intra-class context to generate the class semantic embeddings. Then, relevant Unified Modeling Language (UML) class diagrams are extracted as inter-class context and are encoded into the class relational embeddings using a novel Multi-Relational Graph Neural Network (MRGNN). Class semantic embeddings and class relational embeddings, together with the outputs from code token encoder and AST encoder, are passed to a decoder armed with a two-level attention mechanism to generate high-quality, context-aware code summaries. Experimental results show that CoCoSUM outperforms state-of-the-art methods and the global contexts adopted in CoCoSUM can also strengthen existing code summarization models. Our replication package is anonymously available at https://github.com/DeepSoftwareAnalytics/cocosum.

Keyword:

Transformer Unified modeling language Source code summarization Graph neural network

Author Community:

  • [ 1 ] [Wang, Yanlin]Sun Yat Sen Univ, Guangzhou, Peoples R China
  • [ 2 ] [Wang, Yanli]Sun Yat Sen Univ, Guangzhou, Peoples R China
  • [ 3 ] [Guo, Daya]Sun Yat Sen Univ, Guangzhou, Peoples R China
  • [ 4 ] [Shi, Ensheng]Xi An Jiao Tong Univ, Xian, Peoples R China
  • [ 5 ] [Du, Lun]Microsoft Res Asia, Beijing, Peoples R China
  • [ 6 ] [Han, Shi]Microsoft Res Asia, Beijing, Peoples R China
  • [ 7 ] [Zhang, Dongmei]Microsoft Res Asia, Beijing, Peoples R China
  • [ 8 ] [Yang, Xiaodi]Univ Hong Kong, Hong Kong, Peoples R China
  • [ 9 ] [Hu, Yuxuan]Beijing Univ Technol, Beijing, Peoples R China
  • [ 10 ] [Zhang, Hongyu]Chongqing Univ, Chongqing, Peoples R China

Reprint Author's Address:

  • [Shi, Ensheng]Xi An Jiao Tong Univ, Xian, Peoples R China

Show more details

Related Keywords:

Related Article:

Source :

AUTOMATED SOFTWARE ENGINEERING

ISSN: 0928-8910

Year: 2025

Issue: 1

Volume: 32

3 . 4 0 0

JCR@2022

Cited Count:

WoS CC Cited Count:

SCOPUS Cited Count:

ESI Highly Cited Papers on the List: 0 Unfold All

WanFang Cited Count:

Chinese Cited Count:

30 Days PV: 6

Affiliated Colleges:

Online/Total:689/10644910
Address:BJUT Library(100 Pingleyuan,Chaoyang District,Beijing 100124, China Post Code:100124) Contact Us:010-67392185
Copyright:BJUT Library Technical Support:Beijing Aegean Software Co., Ltd.