Boosting Just-In-Time Code Comment Updating Via Programming Context and Refactor

被引:1
|
作者
Mi, Xiangbo [1 ]
Zhang, Jingxuan [1 ]
Tang, Yixuan [1 ]
Ju, Yue [1 ]
Lan, Jinpeng [1 ]
机构
[1] Nanjing Univ Aeronaut & Astronaut, Coll Comp Sci & Technol, Nanjing, Peoples R China
基金
中国国家自然科学基金;
关键词
Code-comment co-evolution; refactoring type detection; programming context detection; encoder-decoder model;
D O I
10.1142/S0218194023500456
中图分类号
TP18 [人工智能理论];
学科分类号
081104 ; 0812 ; 0835 ; 1405 ;
摘要
Comments are summary descriptions of code snippets. When analyzing and maintaining programs, developers tend to read tidy comments rather than lengthy code. To prevent developers from misunderstanding the program or leading to potential bugs, ensuring the consistency and co-evolution of comments and the corresponding code is an integral development activity in practice. Nevertheless, when modifying code, developers sometimes neglect to update the relevant comments, resulting in inconsistency. Such comments may pose threats to the comprehension and maintenance of the software. In our study, we propose an overall approach named Context and Refactor based Comment Updater (CRCU). CRCU is a Just-In-Time (JIT) comment updater for specific commits. It takes a commit-id as input and updates all the method comments in this commit according to the code change. CRCU could be viewed as an optimization and augmentation of existing comment updaters, especially those that rely only on neural networks. Compared to the existing comment updaters, CRCU fully leverages the programming context and refactoring types of the modified methods to improve its performance. In addition, several customized enhancements in data pre-processing are introduced in CRCU to handle and filter out low-quality commits. We conduct extensive experiments to evaluate the effectiveness of CRCU. The evaluation results show that CRCU combined with the state-of-the-art approaches could improve the average Accuracy by 6.87% and reduce the developers' edits by 0.298 on average.
引用
收藏
页码:1619 / 1649
页数:31
相关论文
共 50 条
  • [1] Automating Just-In-Time Comment Updating
    Liu, Zhongxin
    Xia, Xin
    Yan, Meng
    Li, Shanping
    2020 35TH IEEE/ACM INTERNATIONAL CONFERENCE ON AUTOMATED SOFTWARE ENGINEERING (ASE 2020), 2020, : 585 - 597
  • [2] Improving Just-In-Time Comment Updating via AST Edit Sequence
    Huang, Jiawen
    Yu, Huiqun
    Fan, Guisheng
    Zhou, Ziyi
    Li, Mingchen
    INTERNATIONAL JOURNAL OF SOFTWARE ENGINEERING AND KNOWLEDGE ENGINEERING, 2022, 32 (10) : 1455 - 1476
  • [3] HatCUP: Hybrid Analysis and Attention based Just-In-Time Comment Updating
    Zhu, Hongquan
    He, Xincheng
    Xu, Lei
    30TH IEEE/ACM INTERNATIONAL CONFERENCE ON PROGRAM COMPREHENSION (ICPC 2022), 2022, : 619 - 630
  • [4] On Code Example-Aided Just-In-Time Learning for Programming Education
    Li, Zheng
    Gorrepati, Sridhar Sai
    Greer, Desmond
    PROCEEDINGS OF THE 2023 30TH ASIA-PACIFIC SOFTWARE ENGINEERING CONFERENCE, APSEC 2023, 2023, : 622 - 626
  • [5] Boosting Just-in-Time Defect Prediction with Specific Features of C/C plus plus Programming Languages in Code Changes
    Ni, Chao
    Xu, Xiaodan
    Yang, Kaiwen
    Lo, David
    2023 IEEE/ACM 20TH INTERNATIONAL CONFERENCE ON MINING SOFTWARE REPOSITORIES, MSR, 2023, : 472 - 484
  • [6] Isomeron: Code Randomization Resilient to (Just-In-Time) Return-Oriented Programming
    Davi, Lucas
    Liebchen, Christopher
    Sadeghi, Ahmad-Reza
    Snow, Kevin Z.
    Monrose, Fabian
    22ND ANNUAL NETWORK AND DISTRIBUTED SYSTEM SECURITY SYMPOSIUM (NDSS 2015), 2015,
  • [7] Just-in-time code duplicates extraction
    AlOmar, Eman Abdullah
    Ivanov, Anton
    Kurbatova, Zarina
    Golubev, Yaroslav
    Mkaouer, Mohamed Wiem
    Ouni, Ali
    Bryksin, Timofey
    Nguyen, Le
    Kini, Amit
    Thakur, Aditya
    INFORMATION AND SOFTWARE TECHNOLOGY, 2023, 158
  • [8] Reusing Just-in-Time Compiled Code
    Mehta, Meetesh Kalpesh
    Krynski, Sebastian
    Gualandi, Hugo Musso
    Thakur, Manas
    Vitek, Jan
    PROCEEDINGS OF THE ACM ON PROGRAMMING LANGUAGES-PACMPL, 2023, 7 (OOPSLA): : 1176 - 1197
  • [9] Boosting the Performance of Python']Python-based Geodynamic Code using the Just-In-Time Compiler
    Park, Sangjin
    An, Soojung
    So, Byung-Dal
    GEOPHYSICS AND GEOPHYSICAL EXPLORATION, 2021, 24 (02): : 35 - 44
  • [10] Just-in-Time Code Offloading for Wearable Computing
    Cheng, Zixue
    Li, Peng
    Wang, Junbo
    Guo, Song
    IEEE TRANSACTIONS ON EMERGING TOPICS IN COMPUTING, 2015, 3 (01) : 74 - 83