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 条
  • [21] The impact of context metrics on just-in-time defect prediction
    Masanari Kondo
    Daniel M. German
    Osamu Mizuno
    Eun-Hye Choi
    Empirical Software Engineering, 2020, 25 : 890 - 939
  • [22] Generation of Efficient Obfuscated Code through Just-in-Time Compilation
    Hataba, Muhammad
    El-Mahdy, Ahmed
    Ueda, Kazunori
    IEICE TRANSACTIONS ON INFORMATION AND SYSTEMS, 2019, E102D (03) : 645 - 649
  • [23] JitVector: Just-in-Time Code Generation for Network Packet Classification
    Brack, Samuel
    Hager, Sven
    Scheuermann, Bjoern
    40TH ANNUAL IEEE CONFERENCE ON LOCAL COMPUTER NETWORKS (LCN 2015), 2015, : 161 - 164
  • [24] Programming GPUs with C++14 and Just-In-Time Compilation
    Haidl, Michael
    Hagedorn, Bastian
    Gorlatch, Sergei
    PARALLEL COMPUTING: ON THE ROAD TO EXASCALE, 2016, 27 : 247 - 256
  • [25] On Automating Hybrid Execution of Ahead-of-Time and Just-in-Time Compiled Code
    Pichler, Christoph
    Li, Paley
    Schatz, Roland
    Mossenbock, Hanspeter
    PROCEEDINGS OF THE 16TH ACM SIGPLAN INTERNATIONAL WORKSHOP ON VIRTUAL MACHINES AND INTERMEDIATE LANGUAGES, VMIL 2024, 2024, : 1 - 11
  • [26] Bolt: Instantaneous Crowdsourcing via Just-in-Time Training
    Lundgard, Alan
    Yang, Yiwei
    Foster, Maya L.
    Lasecki, Walter S.
    PROCEEDINGS OF THE 2018 CHI CONFERENCE ON HUMAN FACTORS IN COMPUTING SYSTEMS (CHI 2018), 2018,
  • [27] Fast, effective code generation in a just-in-time Java']Java compiler
    Adl-Tabatabai, AR
    Cierniak, M
    Lueh, GY
    Parikh, VM
    Stichnoth, JM
    ACM SIGPLAN NOTICES, 1998, 33 (05) : 280 - 290
  • [28] Deep Just-In-Time Inconsistency Detection Between Comments and Source Code
    Panthaplackel, Sheena
    Li, Junyi Jessy
    Gligoric, Milos
    Mooney, Raymond J.
    THIRTY-FIFTH AAAI CONFERENCE ON ARTIFICIAL INTELLIGENCE, THIRTY-THIRD CONFERENCE ON INNOVATIVE APPLICATIONS OF ARTIFICIAL INTELLIGENCE AND THE ELEVENTH SYMPOSIUM ON EDUCATIONAL ADVANCES IN ARTIFICIAL INTELLIGENCE, 2021, 35 : 427 - 435
  • [29] Code size and performance optimization for mobile JavaScript just-in-time compiler
    Lee, Seong-Won
    Moon, Soo-Mook
    Jung, Won-Ki
    Oh, Jin-Seok
    Oh, Hyeong-Seok
    Proceedings - Annual Workshop on Interaction between Compilers and Computer Architectures, INTERACT, 2010,
  • [30] Just-in-Time Adaptive Interventions: Opportunities and challenges in the context of behavioural addictions
    Nahum-Shani, Inbal
    Bonnie, J. Spring
    Susan, A. Murphy
    JOURNAL OF BEHAVIORAL ADDICTIONS, 2017, 6 : 37 - 38