Automating the Removal of Obsolete TODO Comments
Not on the map. Why?
Abstract (arXiv)
TODO comments are very widely used by software developers to describe their pending tasks during software development. However, after performing the task developers sometimes neglect or simply forget to remove the TODO comment, resulting in obsolete TODO comments. These obsolete TODO comments can confuse development teams and may cause the introduction of bugs in the future, decreasing the software's quality and maintainability. In this work, we propose a novel model, named TDCleaner (TODO comment Cleaner), to identify obsolete TODO comments in software projects. TDCleaner can assist developers in just-in-time checking of TODO comments status and avoid leaving obsolete TODO comments. Our approach has two main stages: offline learning and online prediction. During offline learning, we first automatically establish <code_change, todo_comment, commit_msg> training samples and leverage three neural encoders to capture the semantic features of TODO comment, code change and commit message respectively. TDCleaner then automatically learns the correlations and interactions between different encoders to estimate the final status of the TODO comment. For online prediction, we check a TODO comment's status by leveraging the offline trained model to judge the TODO comment's likelihood of being obsolete. We built our dataset by collecting TODO comments from the top-10,000 Python and Java Github repositories and evaluated TDCleaner on them. Extensive experimental results show the promising performance of our model over a set of benchmarks. We also performed an in-the-wild evaluation with real-world software projects, we reported 18 obsolete TODO comments identified by TDCleaner to Github developers and 9 of them have already been confirmed and removed by the developers, demonstrating the practical usage of our approach.
Key facts. Cited by 6 papers in the map (data through 13 Oct 2026). First posted on arXiv 12 Aug 2021.
Builds on
No reference list yet.
Built on by
Citing papers per year: 2022: 2; 2023: 4.
6 papers.
- 2022CoditT5: Pretraining for Source Code and Natural Language Editingcited by 45
- 2023Deep Learning for Code Intelligence: Survey, Benchmark and Toolkitcited by 22
- 2023Multilingual Code Co-Evolution Using Large Language Modelscited by 9
- 2023Automating Code-Related Tasks Through Transformers: The Impact of Pre-trainingcited by 8
- 2022Decomposing a Recurrent Neural Network into Modules for Enabling Reusability and Replacementcited by 3
- 2023Measuring Improvement of F1-Scores in Detection of Self-Admitted Technical Debtcited by 1
- 2023Deep Learning for Code Intelligence: Survey, Benchmark and Toolkit30 Dec 2023
- 2023Multilingual Code Co-Evolution Using Large Language Models27 Jul 2023
- 2023Measuring Improvement of F1-Scores in Detection of Self-Admitted Technical Debt16 Mar 2023
- 2023Automating Code-Related Tasks Through Transformers: The Impact of Pre-training8 Feb 2023
- 2022Decomposing a Recurrent Neural Network into Modules for Enabling Reusability and Replacement9 Dec 2022
- 2022CoditT5: Pretraining for Source Code and Natural Language Editing10 Aug 2022