Skip to main navigation Skip to search Skip to main content

MS-CUP: A Multi-Source Code Comment Updating Method

  • Northwestern Polytechnical University Xian

Research output: Chapter in Book/Report/Conference proceedingConference contributionpeer-review

Abstract

Code comments are vital for program comprehension and maintenance, yet developers often neglect to update them during code evolution, which results in inconsistent or misleading documentation. Existing methods for automatic comment updates, such as CUP, HEB-CUP, and HAT-CUP, primarily treat code as natural language text. These methods overlook the inherent structural properties of code and struggle to align complex code changes with comment semantics. To address these limitations, we propose MS-CUP, a multi-source fusion method that integrates old comment sequences, code edit sequences, and AST difference sequences within a Transformer- based architecture. By simplifying AST differences and leveraging multi-head attention mechanisms, MS-CUP captures syntactic and semantic dependencies between code evolution and comment updates. Experiments on a dataset of 108k code-comment coevolution samples demonstrate that MS-CUP outperforms other advanced methods, achieving improvements of 5.3% in Accuracy and 2.6% in Recall@5 at least.

Original languageEnglish
Title of host publicationProceedings - 29th IEEE/ACIS International Conference on Software Engineering, Artificial Intelligence, Networking and Parallel/Distributed Computing, SNPD 2025-Summer
EditorsHyun Yoe, Ha Jin Hwang, Meonghun Lee, Rackwoo Kim, Ryugap Lim, Sungtaek Lee, Seaeul Kim, Simon Xu, Miguel Garcia-Ruiz, Wenyin Feng, A B M Bodrul Alam, Randy Lin, Ajmery Sultana, Faria Khandaker, Mahreen Nasir, Ken Higuchi, Shinichiro Mori, Teruhisa Hochin
PublisherInstitute of Electrical and Electronics Engineers Inc.
Pages57-62
Number of pages6
ISBN (Electronic)9798331512583
DOIs
StatePublished - 2025
Event29th IEEE/ACIS International Conference on Software Engineering, Artificial Intelligence, Networking and Parallel/Distributed Computing, SNPD 2025-Summer - Busa, Korea, Republic of
Duration: 25 Jun 202527 Jun 2025

Publication series

NameProceedings - 29th IEEE/ACIS International Conference on Software Engineering, Artificial Intelligence, Networking and Parallel/Distributed Computing, SNPD 2025-Summer

Conference

Conference29th IEEE/ACIS International Conference on Software Engineering, Artificial Intelligence, Networking and Parallel/Distributed Computing, SNPD 2025-Summer
Country/TerritoryKorea, Republic of
CityBusa
Period25/06/2527/06/25

Keywords

  • Comment update
  • Deep learning
  • Transformer

Fingerprint

Dive into the research topics of 'MS-CUP: A Multi-Source Code Comment Updating Method'. Together they form a unique fingerprint.

Cite this