Automating TODO-missed Methods Detection and Patching
- URL: http://arxiv.org/abs/2405.06225v1
- Date: Fri, 10 May 2024 03:38:28 GMT
- Title: Automating TODO-missed Methods Detection and Patching
- Authors: Zhipeng Gao, Yanqi Su, Xing Hu, Xin Xia,
- Abstract summary: We propose TDPatcher (TO-comment Patcher), to automatically patch comments to the-missed methods in software projects.
Our model has two main stages: offline learning and online inference.
We built our dataset by collecting and evaluating methods from the top-10,000 Python GitHub repositories.
- Score: 8.368184231403447
- License: http://arxiv.org/licenses/nonexclusive-distrib/1.0/
- Abstract: TODO comments are widely used by developers to remind themselves or others about incomplete tasks. In other words, TODO comments are usually associated with temporary or suboptimal solutions. In practice, all the equivalent suboptimal implementations should be updated (e.g., adding TODOs) simultaneously. However, due to various reasons (e.g., time constraints or carelessness), developers may forget or even are unaware of adding TODO comments to all necessary places, which results in the TODO-missed methods. These "hidden" suboptimal implementations in TODO-missed methods may hurt the software quality and maintainability in the long-term. Therefore, in this paper, we propose the novel task of TODO-missed methods detection and patching, and develop a novel model, namely TDPatcher (TODO-comment Patcher), to automatically patch TODO comments to the TODO-missed methods in software projects. Our model has two main stages: offline learning and online inference. During the offline learning stage, TDPatcher employs GraphCodeBERT and contrastive learning for encoding the TODO comment (natural language) and its suboptimal implementation (code fragment) into vector representations. For the online inference stage, we can identify the TODO-missed methods and further determine their patching position by leveraging the offline trained model. We built our dataset by collecting TODO-introduced methods from the top-10,000 Python GitHub repositories and evaluated TDPatcher on them. Extensive experimental results show the promising performance of our model over a set of benchmarks. We further conduct an in-the-wild evaluation which successfully detects 26 \textit{\major{TODO-missed} methods} from 50 GitHub repositories.
Related papers
- OpenTAD: A Unified Framework and Comprehensive Study of Temporal Action Detection [86.30994231610651]
Temporal action detection (TAD) is a fundamental video understanding task that aims to identify human actions and localize their temporal boundaries in videos.
We propose textbfOpenTAD, a unified TAD framework consolidating 16 different TAD methods and 9 standard datasets into a modular framework.
Minimal effort is required to replace one module with a different design, train a feature-based TAD model in end-to-end mode, or switch between the two.
arXiv Detail & Related papers (2025-02-27T18:32:27Z) - Improving Multi-turn Task Completion in Task-Oriented Dialog Systems via Prompt Chaining and Fine-Grained Feedback [2.246166820363412]
Task-oriented dialog (TOD) systems facilitate users in accomplishing complex, multi-turn tasks through natural language.
LLMs struggle to reliably handle multi-turn task completion.
We propose RealTOD, a novel framework that enhances TOD systems through prompt chaining and fine-grained feedback mechanisms.
arXiv Detail & Related papers (2025-02-18T21:36:19Z) - TDDBench: A Benchmark for Training data detection [42.49625153675721]
Training Data Detection (TDD) is a task aimed at determining whether a specific data instance is used to train a machine learning model.
There is no comprehensive benchmark to thoroughly evaluate the effectiveness of TDD methods.
We benchmark 21 different TDD methods across four detection paradigms and evaluate their performance from five perspectives.
arXiv Detail & Related papers (2024-11-05T05:48:48Z) - Train Till You Drop: Towards Stable and Robust Source-free Unsupervised 3D Domain Adaptation [62.889835139583965]
We tackle the problem of source-free unsupervised domain adaptation (SFUDA) for 3D semantic segmentation.
It amounts to performing domain adaptation on an unlabeled target domain without any access to source data.
A common issue with existing SFUDA approaches is that performance degrades after some training time.
arXiv Detail & Related papers (2024-09-06T17:13:14Z) - NExT: Teaching Large Language Models to Reason about Code Execution [50.93581376646064]
Large language models (LLMs) of code are typically trained on the surface textual form of programs.
We propose NExT, a method to teach LLMs to inspect the execution traces of programs and reason about their run-time behavior.
arXiv Detail & Related papers (2024-04-23T01:46:32Z) - Theoretically Achieving Continuous Representation of Oriented Bounding Boxes [64.15627958879053]
This paper endeavors to completely solve the issue of discontinuity in Oriented Bounding Box representation.
We propose a novel representation method called Continuous OBB (COBB) which can be readily integrated into existing detectors.
For fairness and transparency of experiments, we have developed a modularized benchmark based on the open-source deep learning framework Jittor's detection toolbox JDet for OOD evaluation.
arXiv Detail & Related papers (2024-02-29T09:27:40Z) - Semi-supervised Open-World Object Detection [74.95267079505145]
We introduce a more realistic formulation, named semi-supervised open-world detection (SS-OWOD)
We demonstrate that the performance of the state-of-the-art OWOD detector dramatically deteriorates in the proposed SS-OWOD setting.
Our experiments on 4 datasets including MS COCO, PASCAL, Objects365 and DOTA demonstrate the effectiveness of our approach.
arXiv Detail & Related papers (2024-02-25T07:12:51Z) - Donkii: Can Annotation Error Detection Methods Find Errors in
Instruction-Tuning Datasets? [29.072740239139087]
We present a first and novel benchmark for Error Detection (AED) on instruction tuning data: DONKII.
We find that all three datasets contain clear errors, which sometimes propagate directly into instruction-tuned LLMs.
Our results show that the choice of the right AED method and model size is indeed crucial and derive practical recommendations for how to use AED methods to clean instruction-tuning data.
arXiv Detail & Related papers (2023-09-04T15:34:02Z) - CONCORD: Clone-aware Contrastive Learning for Source Code [64.51161487524436]
Self-supervised pre-training has gained traction for learning generic code representations valuable for many downstream SE tasks.
We argue that it is also essential to factor in how developers code day-to-day for general-purpose representation learning.
In particular, we propose CONCORD, a self-supervised, contrastive learning strategy to place benign clones closer in the representation space while moving deviants further apart.
arXiv Detail & Related papers (2023-06-05T20:39:08Z) - Measuring Improvement of F$_1$-Scores in Detection of Self-Admitted
Technical Debt [5.750379648650073]
We improve SATD detection with a novel approach that leverages the Bidirectional Representations from Transformers (BERT) architecture.
We find that our trained BERT model improves over the best performance of all previous methods in 19 of the 20 projects in cross-project scenarios.
Future research will look into ways to diversify SATD datasets in order to maximize the latent power in large BERT models.
arXiv Detail & Related papers (2023-03-16T19:47:38Z) - Temporal Action Detection with Global Segmentation Mask Learning [134.26292288193298]
Existing temporal action detection (TAD) methods rely on generating an overwhelmingly large number of proposals per video.
We propose a proposal-free Temporal Action detection model with Global mask (TAGS)
Our core idea is to learn a global segmentation mask of each action instance jointly at the full video length.
arXiv Detail & Related papers (2022-07-14T00:46:51Z) - Revisiting Open World Object Detection [39.49589782316664]
We find that the only previous OWOD work constructively puts forward the OWOD definition.
We propose five fundamental benchmark principles to guide the OWOD benchmark construction.
Our method outperforms other state-of-the-art object detection approaches in terms of both existing and our new metrics.
arXiv Detail & Related papers (2022-01-03T04:40:59Z)
This list is automatically generated from the titles and abstracts of the papers in this site.
This site does not guarantee the quality of this site (including all information) and is not responsible for any consequences.