REVIEW 4 major objections 3 minor 16 references
Towards Practical Defect-Focused Automated Code Review
T0 review · 4 major / 3 minor · reviewed 2026-08-07 · deepseek-v4-flash
Pith's one-line read Automated code review that works on whole merge requests, not isolated snippets, can recall roughly ten times more critical defects than prior comment-generation baselines.
desk verdict Genuinely new MR-level defect-focused evaluation, but the 10x claim is built on an unoperationalized recall metric. read the letter →
The pith
A machine-rendered reading of the paper's core claim, the machinery that carries it, and where it could break.
The reading
What carries the argument
The load-bearing machinery is a four-part pipeline. An AST-based code slicer expands the changed lines into context using four strategies, the strongest being Left Flow (backward trace of L-values) and Full Flow (L-values plus R-values and callee signatures). A multi-role LLM system then runs several Reviewer passes, each rating comments on three 1-to-7 questions: is it a nitpick, is it a fake problem, how critical is it. A Meta-Reviewer merges and sorts the comments, a Validator re-scores and prunes them against the original code, and a Translator formats the output. Comments carry inline line numbers so they can be attached to exact positions in the DevOps diff view. The mechanism that carries the advertised gain is the combination of these stages: slicing supplies the context that makes defect recall possible, while multi-role scoring and filtering convert raw LLM comments into a shorter, higher-precision list.
What would settle it
Take the 45 fault reports and the saved merge-request snapshots, run the best configuration, and have independent developers judge each comment against the recorded fault using a fixed, pre-registered matching rule; if their recall is far below the reported KBI, or if the same judge process credits generic LLM comments with similar recall, the headline 10x gain collapses.
Extended reading notes
Core claim
The central claim is that the limiting factor in automated code review is not the raw capability of the LLM but the surrounding structure: what code context it sees, how its comments are scored and filtered, and how many independent review passes are merged. On 45 historical fault-derived merge requests, one evaluated configuration reaches a Key Bug Inclusion rate of 42.22%, meaning it names the actual bug that caused a logged incident, against 2.22% for the best prior baseline, with an order-of-magnitude gain in the composite CPI index. The authors attribute this to flow-based code slicing, which traces the lifetime of variables touched by the diff, and to a Reviewer-Meta-Reviewer-Validator-Translator pipeline that filters nitpicks and hallucinations before comments reach developers. They further claim that the framework design is largely language-agnostic, so extending beyond C++ should mainly require a different static-analysis front end.
Load-bearing premise
The paper's central result depends on an unstated assumption: that the authors can objectively determine when a generated comment counts as recalling the key bug in a fault report, even though the matching procedure is never specified.
Editorial extensions
If this is right
- Automated review evaluation should move from BLEU and ROUGE similarity to outcome metrics like KBI, FAR, and CPI that ask whether the real defect was spotted.
- Providing the LLM with flow-traced context (Left Flow or Full Flow) rather than the raw diff or the enclosing function materially improves critical-bug recall.
- Because each slicing strategy has exclusive successes, combining or ensembling slices is a concrete route to recall beyond the reported numbers.
- Raising the number of reviewer passes improves recall but also raises false alarms, so a validator stage is required to keep the output usable; a strong validator paired with a smaller reviewer can match a large model.
- Inline line-number formatting in the prompt improves both comment quality and the success rate of attaching comments to the right lines, which is what makes the output usable in a real review interface.
Reading between the lines
- A test the paper leaves for future work is whether the same gain survives in languages without a mature static analyzer; the framework's language-agnostic claim implies it should, but the evidence is entirely C++.
- The paper's definition counts every non-key-bug comment as a false alarm, so its FAR figures are upper bounds; a more permissive 'useful but not critical' label would likely strengthen the practical case for deployment.
- The 1-to-7 scoring thresholds and Top-k cutoffs are set heuristically; a learned or adaptively tuned filter could shift the precision-recall balance further, especially for the validator's tendency to discard valid comments.
- A natural ensemble experiment, noting that each slicing strategy uniquely recalls some bugs, is to vote across slices: this could exceed the 42.22% KBI ceiling the paper reports without changing the underlying LLM.
Editorial analysis
A structured set of objections, weighed in public.
Referee Report
Summary. The paper proposes an end-to-end automated code-review pipeline for industrial C++ merge requests, consisting of code slicing for context extraction, a multi-role LLM framework (Reviewer, Meta-Reviewer, Validator, Translator), a redundancy/false-alarm filter, and inline line-number localization. The evaluation is performed on 45 fault-triggering merge requests reconstructed from historical fault reports in a large company, using metrics KBI, FAR, CPI, and LSR. The paper claims a 2x improvement over standard LLMs and a 10x gain over previous baselines on key-bug recall and composite performance.
Significance. If the results were fully substantiated, the paper would make a useful contribution: it shifts automated code-review evaluation from snippet-level text similarity to merge-request-level defect recall, it grounds evaluation in real industrial fault reports rather than synthetic defects, and it openly releases code. The proposed pipeline components (slicing, multi-role prompting, filtering, line localization) are sensible and could be adopted by practitioners. However, the headline claim rests on the KBI metric, whose numerator is never operationalized, and the empirical comparison lacks statistical controls and contains an internal inconsistency. These are load-bearing issues, so the significance is currently potential rather than demonstrated.
major comments (4)
- [Section 3.6 / Appendix M.1 (Eq. 1)] The central empirical claim depends on KBI, but KBI is never operationalized. Eq. (1) defines KBI as 'Number of recalled key issues / Total number of key issues,' yet the paper does not specify how a generated comment is judged to 'recall' a key issue: human annotation, LLM-as-judge, substring matching, issue-ID linkage, or some other rule. Since each of the 45 fault reports corresponds to one key issue, KBI is effectively a binary per-MR recall signal, and any lenient or generator-involved matching rule can inflate the numerator arbitrarily. The 10x gain over baselines reported in Section 5.1 is thus not verifiable from the paper as written. The Zenodo code release does not supply the missing protocol, because the evaluation harness is not described.
- [Section 4.4 / Section 5.1 (Table 2)] The baseline comparison is not apples-to-apples. Baselines are snippet-level models, but the paper does not state whether they were given the same repository context, the same line-number formatting, or the same filtering and ranking procedure; the only description is that their comments were evaluated 'based on whether they passed their respective quality estimation filters.' Moreover, no significance tests are reported for the 45-MR dataset, and Appendix R shows run-to-run KBI spreads as large as 11 percentage points (e.g., Original Diff 'All': 17.78–28.89). Without repeated runs and significance testing, the reported differences between the proposed framework and baselines may be within stochastic noise, so the '2x/10x' claim is not supported by the evidence presented.
- [Section 5.5 (Table 8) and RQ5 summary] The RQ5 summary states that providing line number information, 'especially inline,' significantly improves performance and localization success rate, but Table 8 contradicts this. In the 'All' setting, Relative achieves higher KBI (42.96 vs. 37.04), higher LSR (92.69 vs. 91.11), and a comparable or lower FAR1 than Inline. Only in the '+Meta Reviewer' setting does Inline outperform Relative on KBI, and LSR is not reported for that setting. The textual claim needs to be restricted to the setting that actually supports it, or the table and conclusions must be corrected.
- [Sections 3.4, 5.2, and Appendix S] Several pipeline parameters (the Q1/Q2 threshold of 4, Top-k truncation values, the number of reviewers, and the validator's secondary threshold) appear to have been selected on the same 45 fault merge requests used for the headline results. Appendix S shows substantial Top-k sensitivity: for Full Flow after the Validator stage, KBI drops from 35.56 at Top-10 to 13.33 at Top-5 while CPI1 changes from 12.01 to 20.97. No held-out set, cross-validation, or correction for multiple comparisons is described, so the reported best numbers should be treated as selected results rather than as an unbiased estimate of pipeline performance.
minor comments (3)
- [Section 1, Contributions] The phrase 'being the first to' is a strong novelty claim that is not substantiated by the related-work discussion; please either provide concrete evidence of precedence or soften the wording.
- [Section 7, Conclusion] The sentence 'Evalua- tions on real-world data demonstrated that we significantly outperforms existing methods' contains a subject-verb agreement error ('we significantly outperforms'); please correct it.
- [Appendix K, Table 9] The comparison with the CodeReviewer dataset would be clearer if the table also reported the number of merge requests or fault reports, since the paper emphasizes MR-level evaluation; as it stands, 'Ours (Merge-Request Level)' counts snippets (668) rather than MRs (45), which may confuse readers.
Circularity Check
No significant circularity: KBI/FAR/CPI are anchored to external fault-report labels; the main risks are an unspecified recall-matching protocol and in-sample configuration choices, which are evaluation-validity issues rather than derivation-by-construction.
full rationale
The paper's central derivation chain is: (1) code slicing extracts candidate contexts (Section 3.2); (2) multi-role LLMs generate comments (Section 3.3); (3) filtering selects comments (Section 3.4); (4) KBI/FAR/CPI compare those comments to key issues taken from historical fault reports (Sections 3.6, 4.2, Appendix K). The ground-truth key bugs are external to the model: "each fault must have caused a user-visible issue and been formally logged in the company's internal defect tracking system" (Appendix K). KBI's denominator is "Total number of key issues" from that external set, and FAR's definition ("all comments unrelated to key issues mentioned in the fault reports") also references external labels. So the headline improvement is not defined in terms of the model's own outputs or fitted values; it is an empirical comparison against baselines on the same external cases. The one self-citation that might look load-bearing, Lu et al. 2025 (DeepCRCEval) on the failure of BLEU/ROUGE, only motivates abandoning text-similarity metrics; the KBI metric itself is justified by developer interviews (Appendix D) and by adoption of the external CBI idea from McAleese et al. 2024, so it is not a self-citation chain. Non-circularity concerns should be flagged separately: Eq. (1) never specifies the operational rule for counting a comment as "recalled," so the numerator is under-defined; several pipeline choices (slicing mode, Top-k, validator on/off) are explored on the same 45-MR set, so the best row in Table 2 is partly in-sample; and Table 8's numbers conflict with the RQ5 summary (Relative LSR 92.69 vs Inline 91.11; Relative KBI 42.96 vs Inline 37.04). These are correctness and validity weaknesses, not cases where a prediction is equivalent to its inputs by construction. Appendix D also candidly notes that formal user studies have not yet been conducted, which further supports treating the evaluation concerns as external-validity limitations rather than circularity.
Assumptions & free parameters
free parameters (5)
- Q1/Q2 filter threshold =
4
- Top-k truncation =
k=5
- Number of reviewers =
3
- Slicing algorithm =
Left Flow (primary)
- FAR definition =
All non-key-bug comments count as false alarms
assumptions (5)
- domain assumption The 45 traced fault reports and generated 'ideal reference comments' correctly identify the key bug, its root cause, and the introducing MR.
- domain assumption Recalled key bugs can be matched to generated comments without an objective, disclosed procedure.
- domain assumption Cppcheck's AST produces slices that retain the context needed for defect detection.
- domain assumption The 45 C++ MRs from one company's recommendation service generalize to other codebases.
- domain assumption LLM outputs in Table 2 are representative despite single-run evaluation; three-run variability is reported only for a subset.
Cite this review
Pith. "Pith review of Towards Practical Defect-Focused Automated Code Review." pith.science (2026). https://pith.science/paper/AP4MUZDD
@misc{pith2026250517928,
author = {Pith},
title = {Pith review of: Towards Practical Defect-Focused Automated Code Review},
year = {2026},
howpublished = {\url{https://pith.science/paper/AP4MUZDD}},
note = {Machine review of arXiv:2505.17928}
}
read the original abstract
The complexity of code reviews has driven efforts to automate review comments, but prior approaches oversimplify this task by treating it as snippet-level code-to-text generation and relying on text similarity metrics like BLEU for evaluation. These methods overlook repository context, real-world merge request evaluation, and defect detection, limiting their practicality. To address these issues, we explore the full automation pipeline within the online recommendation service of a company with nearly 400 million daily active users, analyzing industry-grade C++ codebases comprising hundreds of thousands of lines of code. We identify four key challenges: 1) capturing relevant context, 2) improving key bug inclusion (KBI), 3) reducing false alarm rates (FAR), and 4) integrating human workflows. To tackle these, we propose 1) code slicing algorithms for context extraction, 2) a multi-role LLM framework for KBI, 3) a filtering mechanism for FAR reduction, and 4) a novel prompt design for better human interaction. Our approach, validated on real-world merge requests from historical fault reports, achieves a 2x improvement over standard LLMs and a 10x gain over previous baselines. While the presented results focus on C++, the underlying framework design leverages language-agnostic principles (e.g., AST-based analysis), suggesting potential for broader applicability.
Figures
Figures from the paper (2 more)
Reference graph
Works this paper leans on
-
[1]
The system first performs essential verification checks
MR Trigger and Initial Verification:When a developer submits an MR, a webhook notifies our automated review system. The system first performs essential verification checks. This includes confirming the submitting user’s permissions and ensuring that the changed files fall within the scope of automated review (e.g., correct programming language, project-sp...
-
[2]
Code Analysis and Comment Generation Launch:Once the MR is verified, the system retrieves the relevant code changes. The core analysis process is then launched: • Code Slicing:The modified code segments are processed by our code slicing algorithms (detailed in Section 3.2) to extract relevant contextual information necessary for effective review. • Multi-...
-
[3]
ISSN 2994-970X. doi: 10.1145/3728878. Licensed under Creative Commons Attribution 4.0 International License. 12 Towards Practical Defect-Focused Automated Code Review Yu, Y ., Rong, G., Shen, H., Zhang, H., Shao, D., Wang, M., Wei, Z., Xu, Y ., and Wang, J. Fine-tuning large language models to improve accuracy and comprehensibility of automated code revie...
-
[4]
Each comment is associated with the specific MR and the relevant commit
Seamless Injection into DevOps Platform and Developer Notification:This stage is critical for effective real-world integration: • DevOps System Integration:The filtered and validated comments are programmatically injected into the company’s internal DevOps platform using its provided APIs. Each comment is associated with the specific MR and the relevant c...
work page 2024
-
[6]
Comment Filtering and Refinement:The raw comments generated by the LLM roles undergo a rigorous filtering process using our Redundancy Comment Filter Mechanism (explained in Section 3.4). This multi-stage process (involving Q1-Q3 scoring, coarse filtering, meta-reviewer processing, and validator re-scoring) aims to eliminate nitpicks, false positives, and...
-
[8]
Re-evaluate:Guides the model to review its analysis, minimizing nitpicks and hallucinations. Three specific questions are posed to quantify nitpicks, hallucinations, and severity, inspired by (McAleese et al., 2024). 18 Towards Practical Defect-Focused Automated Code Review Algorithm 3GenerateNewSlice 1:functionGenerateNewSlice 2:Input:seed, cache, option...
work page 2024
-
[9]
System Introduction:Introduces the task of merging Reviewer comments and provides guidelines on the required format. 2.Analyze:Instructs the model to analyze Reviewer comments, focusing on patterns, discrepancies, and insights
-
[10]
Organize and Sort Final Comments:Guides the model to format the refined comments in a prioritized JSON list, calculating the overall scores and sorting by criticality. For the Validator: 1.System Introduction:Similar to the Reviewer, but with a focus on accuracy and relevance
Show all 16 references
-
[11]
3.Refine the Comment:Ensures the comment is refined for clarity and correctness
Validate the Comment:Guides the model to review and validate the existing comments, aiming to reduce false alarms. 3.Refine the Comment:Ensures the comment is refined for clarity and correctness. 4.Final Comment:Outputs the validated comment in a JSON format suitable for the d...
-
[12]
Translation and Formatting Requirements:Guides the model to translate items into the target language, ensuring proper formatting
-
[13]
and” logic to “or
Translated Comments:Outputs the translated comments in JSON format for direct integration into the development environment. I. Rationale for Offline Validation The primary goal of our review system is to recall as many historical faults as possible while minimizing irrelevant ...
2021
-
[14]
Our task involves many-to-many mappings between code and reviews, violating BLEU’s single-reference assumption
-
[15]
Code review requires reasoning and domain expertise; recent studies show that BLEU and ROUGE fail to reflect quality in such tasks
-
[16]
key bugs,
Real fault reports and LLM-generated comments differ significantly in style and expression, making surface-level textual similarity unreliable. Regarding vagueness: rather than evaluating linguistic style, we focus on outcome-based metrics that directly reflect the effectivene...
2024
-
[295]
Sommerville, I
IEEE, 2020. Sommerville, I. Software engineering 9th edition.ISBN-10, 137035152:18, 2011. Tao, W., Zhou, Y ., Wang, Y ., Zhang, H., Wang, H., and Zhang, W. Kadel: Knowledge-aware denoising learn- ing for commit message generation.ACM Transactions on Software Engineering and Me...
2020 arXiv
-
[2025]
Poster presentation
URL https://openreview.net/forum? id=L5godAOC2z. Poster presentation. 10 Towards Practical Defect-Focused Automated Code Review Kononenko, O., Baysal, O., and Godfrey, M. W. Code re- view quality: How developers see it. InProceedings of the 38th international conference on sof...
2016
Reviewed August 7, 2026 · model on record in the stance chip above.
Discussion (0). Continue with ORCID to comment.