Haoye Wang

Haoye Wang

Auto-generated profile, based on publicly available information

Haoye Wang

Hangzhou City University, School of Computer and Computing Science, Hangzhou, China

Research Focus & Metrics

Academic Career Length

3Years (2024-Present)

(Calculated once Scilit publication data is synced: current year − year of first publication + 1)

Representative Publications

View All Publications
28 June 2024 in ACM Transactions on Software Engineering and Methodology
Verified
Journal Article
Open access
HWHaoye Wang
Haoye Wang
ZGZhipeng Gao
Zhipeng Gao
TBTingting Bi
Tingting Bi
JGJohn Grundy
John Grundy
XWXinyu Wang
Xinyu Wang
XYXiaohu Yang
Xiaohu Yang
Software development is a collaborative process that involves various interactions among individuals and teams. TODO comments in source code play a critical role in managing and coordinating diverse tasks during this process. However, this study finds that a large proportion of open-source project TODO comments are left unresolved or take a long time to be resolved. About 46.7% of TODO comments in open-source repositories are of low-quality (e.g., TODOs that are ambiguous, lack information, or are useless to developers). This highlights the need for better TODO practices. In this study, we investigate four aspects regarding the quality of TODO comments in open-source projects: (1) the prevalence of low-quality TODO comments; (2) the key characteristics of high-quality TODO comments; (3) how are TODO comments of different quality managed in practice; and (4) the feasibility of automatically assessing TODO comment quality. Examining 2,863 TODO comments from Top100 GitHub Java repositories, we propose criteria to identify high-quality TODO comments and provide insights into their optimal composition. We discuss the lifecycle of TODO comments with varying quality. To assist developers, we construct deep learning-based methods that show promising performance in identifying the quality of TODO comments, potentially enhancing development efficiency and code quality.

24 May 2024 in IEEE Transactions on Software Engineering
Verified
Journal Article
Closed access
HWHaoye Wang
Haoye Wang
ZGZhipeng Gao
Zhipeng Gao
XHXing Hu
Xing Hu
DLDavid Lo
David Lo
JGJohn Grundy
John Grundy
XWXinyu Wang
Xinyu Wang
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 TDR eminder ( T O D O comment Reminder ) to address the task. With the help of TDR eminder , 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, TDR eminder leverages the trained model to compute the likelihood of a commit being a TODO-missed commit . We evaluate TDR eminder on datasets crawled from 10k popular Python and Java repositories in GitHub respectively. Our experimental results show that TDR eminder outperforms a set of benchmarks by a large margin in TODO-missed commits detection. Moreover, to better help developers use TDR eminder 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.

7 February 2026 in Empirical Software Engineering
Verified
Journal Article
Closed access
PDF file
CZChengming Zhang
Chengming Zhang
HWHaoye Wang
Haoye Wang
CXChuyang Xu
Chuyang Xu
JLJiakun Liu
Jiakun Liu
KLKui Liu
Kui Liu
ZLZhongxin Liu
Zhongxin Liu

27 October 2024
Verified
Conference Paper
Open access
JLJiawei Lu
Jiawei Lu
HWHaoye Wang
Haoye Wang
ZLZhongxin Liu
Zhongxin Liu
KLKeyu Liang
Keyu Liang
LBLingfeng Bao
Lingfeng Bao
XYXiaohu Yang
Xiaohu Yang
Recent studies proposed to leverage large language models (LLMs) with In-Context Learning (ICL) to handle code intelligence tasks without fine-tuning. ICL employs task instructions and a set of examples as demonstrations to guide the model in generating accurate answers without updating its parameters. While ICL has proven effective for code intelligence tasks, its performance heavily relies on the selected examples. Previous work has achieved some success in using BM25 to retrieve examples for code intelligence tasks. However, existing approaches lack the ability to understand the semantic and structural information of queries, resulting in less helpful demonstrations. Moreover, they do not adapt well to the complex and dynamic nature of user queries in diverse domains. In this paper, we introduce a novel approach named Instructive Code Retriever (ICR), which is designed to retrieve examples that enhance model inference across various code intelligence tasks and datasets. We enable ICR to learn the semantic and structural information of the corpus by a tree-based loss function. To better understand the correlation between queries and examples, we incorporate the feedback from LLMs to guide the training of the retriever. Experimental results demonstrate that our retriever significantly outperforms state-of-the-art approaches. We evaluate our model's effectiveness on various tasks, i.e., code summarization, program synthesis, and bug fixing. Compared to previous state-of-the-art algorithms, our method achieved improvements of 50.0% and 90.0% in terms of BLEU-4 for two code summarization datasets, 74.6% CodeBLEU on program synthesis dataset, and increases of 3.6 and 3.2 BLEU-4 on two bug fixing datasets.

29 July 2026 in Journal of Systems and Software
Verified
Journal Article
Closed access
ZYZhiquan Yang
Zhiquan Yang
HWHaoye Wang
Haoye Wang
YHYuhai Hu
Yuhai Hu
BGBin Gu
Bin Gu
QXQiang Xiong
Qiang Xiong
ZLZhongxin Liu
Zhongxin Liu

17 August 2024 in arXiv
Verified
Preprint
Open access
PDF file
YMYubo Mai
Yubo Mai
ZGZhipeng Gao
Zhipeng Gao
HWHaoye Wang
Haoye Wang
TBTingting Bi
Tingting Bi
XHXing Hu
Xing Hu
JSJianling Sun
Jianling Sun
Utilizing code snippets on Stack Overflow (SO) is a common practice among developers for problem-solving. Although SO code snippets serve as valuable resources, it is important to acknowledge their imperfections, reusing problematic code snippets can lead to the introduction of suboptimal or buggy code into software projects. SO comments often point out weaknesses of a post and provide valuable insights to improve the quality of answers, while SO comments are usually missed and/or ignored, leaving these problematic code snippets untouched. In this work, we first investigate the task of automatic SO posts updating based on their associated comments. We introduce a novel framework, named Soup (Stack Overflow Updator for Post) for this task. Soup addresses two key tasks: Valid Comment-Edit Prediction (VCP) and Automatic Post Updating (APU). Extensive experimental results show the promising performance of our model over a set of benchmarks. Moreover, we also performed an in-the-wild evaluation on Stack Overflow, we submitted 50 edits generated by our approach to Stack Overflow posts and 21 of them have been verified and accepted by SO maintainers, further proving the practical value of Soup.