Projects per year
Abstract
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. Manually identifying obsolete TODO comments is time-consuming and expensive. It is thus necessary to detect obsolete TODO comments and remove them automatically before they cause any unwanted side effects. In this work, we propose a novel model, named TDCleaner, 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.
Original language | English |
---|---|
Title of host publication | Proceedings of the 29th ACM Joint Meeting European Software Engineering Conference and Symposium on the Foundations of Software Engineering |
Editors | Diomidis Spinellis, Georgios Gousios, Marsha Chechik, Massimiliano Di Penta |
Place of Publication | New York NY USA |
Publisher | Association for Computing Machinery (ACM) |
Pages | 218-229 |
Number of pages | 12 |
ISBN (Electronic) | 9781450385626 |
DOIs | |
Publication status | Published - 2021 |
Event | Joint Meeting of the European Software Engineering Conference and the ACM SIGSOFT Symposium on the Foundations of Software Engineering 2021 - Online, Athens, Greece Duration: 23 Aug 2021 → 28 Aug 2021 Conference number: 29th https://dl.acm.org/doi/proceedings/10.1145/3468264 (Proceedings) https://2021.esec-fse.org (Website) |
Conference
Conference | Joint Meeting of the European Software Engineering Conference and the ACM SIGSOFT Symposium on the Foundations of Software Engineering 2021 |
---|---|
Abbreviated title | ESEC/FSE 2021 |
Country/Territory | Greece |
City | Athens |
Period | 23/08/21 → 28/08/21 |
Internet address |
|
Keywords
- Bert
- Code-Comment Inconsistency
- TODO comment
Projects
- 1 Active
-
HCMDSE: Human-centric Model-driven Software Engineering
Australian Research Council (ARC)
3/02/20 → 2/02/25
Project: Research