Just-In-Time TODO-Missed Commits Detection

被引:0
|
作者
Wang, Haoye [1 ]
Gao, Zhipeng [2 ]
Hu, Xing [3 ]
Lo, David [5 ]
Grundy, John
Wang, Xinyu [3 ,4 ]
机构
[1] Hangzhou City Univ, Hangzhou 310015, Peoples R China
[2] Zhejiang Univ, Shanghai Inst Adv Study, Shanghai 201210, Peoples R China
[3] Zhejiang Univ, Sch Technol, Hangzhou 310058, Peoples R China
[4] Zhejiang Univ, Coll Comp Sci & Technol, Hangzhou 188065, Peoples R China
[5] Singapore Management Univ, Comp Sci, Singapore, 3800, Singapore
基金
中国国家自然科学基金; 新加坡国家研究基金会;
关键词
Codes; Task analysis; Training; !text type='Python']Python[!/text; Stars; Software quality; Software development management; Technical debt; TODO comment; code-comment inconsistency; suboptimal implementation; PREDICTION;
D O I
10.1109/TSE.2024.3405005
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
TODO comments play an important role in helping developers to manage their tasks and communicate with other team members. TODO comments are often introduced by developers as a type of technical debt, such as a reminder to add/remove features or a request to optimize the code implementations. These can all be considered as notifications for developers to revisit regarding the current suboptimal solutions. TODO comments often bring short-term benefits - higher productivity or shorter development cost - and indicate attention needs to be paid for the long-term software quality. Unfortunately, due to their lack of knowledge or experience and/or the time constraints, developers sometimes may forget or even not be aware of suboptimal implementations. The loss of the TODO comments for these suboptimal solutions may hurt the software quality and reliability in the long-term. Therefore it is beneficial to remind the developers of the suboptimal solutions whenever they change the code. In this work, we refer this problem to the task of detecting TODO-missed commits, and we propose a novel approach named TDReminder (TODO comment Reminder) to address the task. With the help of TDReminder, developers can identify possible missing TODO commits just-in-time when submitting a commit. Our approach has two phases: offline training and online inference. We first embed code change and commit message into contextual vector representations using two neural encoders respectively. The association between these representations is learned by our model automatically. In the online inference phase, TDReminder leverages the trained model to compute the likelihood of a commit being a TODO-missed commit. We evaluate TDReminder on datasets crawled from 10k popular Python and Java repositories in GitHub respectively. Our experimental results show that TDReminder outperforms a set of benchmarks by a large margin in TODO-missed commits detection. Moreover, to better help developers use TDReminder in practice, we have incorporated Large Language Models (LLMs) with our approach to provide explainable recommendations. The user study shows that our tool can effectively inform developers not only "when" to add TODOs, but also "where" and "what" TODOs should be added, verifying the value of our tool in practical application.
引用
收藏
页码:2732 / 2752
页数:21
相关论文
共 50 条
  • [1] Automating TODO-missed Methods Detection and Patching
    Gao, Zhipeng
    Su, Yanqi
    Hu, Xing
    Xia, Xin
    ACM TRANSACTIONS ON SOFTWARE ENGINEERING AND METHODOLOGY, 2024, 34 (01)
  • [2] PerfJIT: Test-Level Just-in-Time Prediction for Performance Regression Introducing Commits
    Chen, Jinfu
    Shang, Weiyi
    Shihab, Emad
    IEEE TRANSACTIONS ON SOFTWARE ENGINEERING, 2022, 48 (05) : 1529 - 1544
  • [3] Towards Reliable Online Just-in-Time Software Defect Prediction
    Cabral, George G.
    Minku, Leandro L.
    IEEE TRANSACTIONS ON SOFTWARE ENGINEERING, 2023, 49 (03) : 1342 - 1358
  • [4] MULA: A Just-In-Time Multi-labeling System for Issue Reports
    Xie, Xiaoyuan
    Su, Yuhui
    Chen, Songqiang
    Chen, Lin
    Xuan, Jifeng
    Xu, Baowen
    IEEE TRANSACTIONS ON RELIABILITY, 2022, 71 (01) : 250 - 263
  • [5] Robust Just-in-time Learning Approach and Its Application on Fault Detection
    Yu, Han
    Yin, Shen
    Luo, Hao
    IFAC PAPERSONLINE, 2017, 50 (01): : 15277 - 15282
  • [6] 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
  • [7] An Improved Just-in-Time Learning Scheme for Online Fault Detection of Nonlinear Systems
    Yu, Han
    Yin, Shen
    Luo, Hao
    IEEE SYSTEMS JOURNAL, 2021, 15 (02): : 2078 - 2086
  • [8] A Formal Explainer for Just-In-Time Defect Predictions
    Yu, Jinqiang
    Fu, Michael
    Ignatiev, Alexey
    Tantithamthavorn, Chakkrit
    Stuckey, Peter
    ACM TRANSACTIONS ON SOFTWARE ENGINEERING AND METHODOLOGY, 2024, 33 (07)
  • [9] Cross-Project Online Just-In-Time Software Defect Prediction
    Tabassum, Sadia
    Minku, Leandro L.
    Feng, Danyi
    IEEE TRANSACTIONS ON SOFTWARE ENGINEERING, 2023, 49 (01) : 268 - 287
  • [10] Toward Reduction in False Positives Just-In-Time Software Defect Prediction Using Deep Reinforcement Learning
    Ismail, Ahmad Muhaimin
    AB Hamid, Siti Hafizah
    Sani, Asmiza Abdul
    Daud, Nur Nasuha Mohd
    IEEE ACCESS, 2024, 12 : 47568 - 47580