DefectReviewer: Towards Generating Defect-Focused Review Comment Based on Fine-Grained Defect Localization

Code review is critical to software quality assurance, with defect detection as a primary objective. While LLMs enable automated review comment generation, most approaches treat code review as a general-purpose task, favoring frequent but low-risk feedback. We propose DefectReviewer , a defect-focused review comment generation approach combining task-specific fine-tuning with fine-grained localization signals. The key insight is that while task-specific fine-tuning establishes the foundation for defect-focused review, grounding the model in where the defect is provides complementary guidance to narrow the reasoning space for what the defect is . DefectReviewer uses a Just-In-Time localization tool to identify defect lines, grounding review comment generation through structural prompting and fine-tuning. DefectReviewer is designed as a specialized, selectively applicable component that complements general-purpose reviewers. We evaluate DefectReviewer on a large-scale real-world dataset against six representative baseline methods. DefectReviewer consistently outperforms state-of-the-art baselines, improving BLEU and ROUGE-L by 17.0% and 24.2%, respectively. A dual-track semantic evaluation combining LLM judges with human expert validation confirms that DefectReviewer produces comments with higher defect relevance and readability. Additional analyses show that it can be applied to different generation architectures and that its performance changes moderately as the number of input defect lines varies, although the trend differs across architectures.

Authors

Institutions

Publication Details

Journal
ACM Transactions on Software Engineering and Methodology
Published
2026-10-14
DOI
https://doi.org/10.1145/3848515
Primary Topic
Software Engineering Research
Type
article
Field-Weighted Citation Impact
0.00
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

DefectReviewer: Towards Generating Defect-Focused Review Comment Based on Fine-Grained Defect Localization

accept1223, Yuxuan Zhang, Xiangping Chen, Ao Zeng et al.
ACM Transactions on Software Engineering and Methodology
Software Engineering Research
article

DefectReviewer: Towards Generating Defect-Focused Review Comment Based on Fine-Grained Defect Localization

accept1223, Yuxuan Zhang, Xiangping Chen, Ao Zeng, Zibin Zheng
article en

Abstract

Code review is critical to software quality assurance, with defect detection as a primary objective. While LLMs enable automated review comment generation, most approaches treat code review as a general-purpose task, favoring frequent but low-risk feedback. We propose DefectReviewer , a defect-focused review comment generation approach combining task-specific fine-tuning with fine-grained localization signals. The key insight is that while task-specific fine-tuning establishes the foundation for defect-focused review, grounding the model in where the defect is provides complementary guidance to narrow the reasoning space for what the defect is . DefectReviewer uses a Just-In-Time localization tool to identify defect lines, grounding review comment generation through structural prompting and fine-tuning. DefectReviewer is designed as a specialized, selectively applicable component that complements general-purpose reviewers. We evaluate DefectReviewer on a large-scale real-world dataset against six representative baseline methods. DefectReviewer consistently outperforms state-of-the-art baselines, improving BLEU and ROUGE-L by 17.0% and 24.2%, respectively. A dual-track semantic evaluation combining LLM judges with human expert validation confirms that DefectReviewer produces comments with higher defect relevance and readability. Additional analyses show that it can be applied to different generation architectures and that its performance changes moderately as the number of input defect lines varies, although the trend differs across architectures.

ACM Transactions on Software Engineering and Methodology
Sun Yat-sen University (CN)
Openalex Percentile: Top 65%
Software Engineering Research
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.