Abstract: To tackle the trouble of incomplete, insufficient, or misaligned code comments during software development and maintenance, various techniques are emerged to modify the comments of plain language in accordance with code alterations. However, these methods have two significant limitations: addressing the source code involving non-temporal and long-rang dependencies poses challenges. With the aim of surpassing these restrictions, we present a novel approach named Code Comment Update (CCU) model, which incorporates self-attention, positional encoding, and relative positional representation to effectively capture the relationships between different source code tags. This allows it to effectively grasp extended and non-temporal interdependencies within the source code. The comment-update module of CCU produces fresh comments by harnessing the power of existing code alterations and comments. The results of Experiment demonstrate that CCU outperforms the three baseline methods in terms of metrics such as exact match, METEOR, BLEU, and SARI.
Submission Number: 120
Loading