Improving LLM-Based Go Code Review through Issue-List Generation and Context Augmentation

Fuente: arXiv
Saved in:
Bibliographic Details
Main Authors: Sun, Kexin, Guan, Yucong, Sun, Jiaqi, Kuang, Hongyu, Rong, Guoping, Shao, Dong, Zhang, He, Ma, Xiaoxing, Treude, Christoph
Format: Preprint
Published: 2026
Subjects:
Online Access:
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866917553672028160
author Sun, Kexin
Guan, Yucong
Sun, Jiaqi
Kuang, Hongyu
Rong, Guoping
Shao, Dong
Zhang, He
Ma, Xiaoxing
Treude, Christoph
author_facet Sun, Kexin
Guan, Yucong
Sun, Jiaqi
Kuang, Hongyu
Rong, Guoping
Shao, Dong
Zhang, He
Ma, Xiaoxing
Treude, Christoph
contents LLMs have shown strong potential for automating code review, yet their practical utility depends heavily on the design of generation and context strategies. In this paper, we investigate how to improve LLM-based code review through generation strategy and contextual augmentation. We first propose an issue-list review paradigm, in which LLMs enumerate all potential issues rather than reporting only the single most important one (i.e., primary-issue review). We then systematically compare three types of code context augmentation -- neighboring, LSP-based semantics, and IR-based similar co-change context -- and study how they influence issue discovery. Finally, we integrate candidates from no-context and context-enhanced generation to improve review coverage, and introduce refinement-guided pruning to keep the candidate list at a practical size. We evaluate our approach on 1,438 Go review instances using downstream code refinement as the main metric, i.e., how often the candidate list contains at least one comment inducing the same code change as the final human revision. For comparison, we evaluate comments by CodeReviewer, a model trained specifically for review comment generation, as well as ground-truth human review comments (as a practical upper bound), under the same refinement-based evaluation. The results show that our best configuration, combining issue-list review, neighboring and similar co-change context, and candidate integration, reaches 28.00% refinement exact match, a statistically significant gain of +10.85 percentage points over primary-issue review without any additional context (17.15%), substantially outperforming CodeReviewer (15.02%) and approaching the human-oracle ceiling of 36.09%. Our refinement-guided pruning reduces the average candidate count from 7.2 to 3.1 at top-5 while retaining nearly the full benefit, making the candidate list easier to inspect.
format Preprint
id arxiv_https___arxiv_org_abs_2606_01859
institution arXiv
publishDate 2026
record_format arxiv
spellingShingle Improving LLM-Based Go Code Review through Issue-List Generation and Context Augmentation
Sun, Kexin
Guan, Yucong
Sun, Jiaqi
Kuang, Hongyu
Rong, Guoping
Shao, Dong
Zhang, He
Ma, Xiaoxing
Treude, Christoph
Software Engineering
LLMs have shown strong potential for automating code review, yet their practical utility depends heavily on the design of generation and context strategies. In this paper, we investigate how to improve LLM-based code review through generation strategy and contextual augmentation. We first propose an issue-list review paradigm, in which LLMs enumerate all potential issues rather than reporting only the single most important one (i.e., primary-issue review). We then systematically compare three types of code context augmentation -- neighboring, LSP-based semantics, and IR-based similar co-change context -- and study how they influence issue discovery. Finally, we integrate candidates from no-context and context-enhanced generation to improve review coverage, and introduce refinement-guided pruning to keep the candidate list at a practical size. We evaluate our approach on 1,438 Go review instances using downstream code refinement as the main metric, i.e., how often the candidate list contains at least one comment inducing the same code change as the final human revision. For comparison, we evaluate comments by CodeReviewer, a model trained specifically for review comment generation, as well as ground-truth human review comments (as a practical upper bound), under the same refinement-based evaluation. The results show that our best configuration, combining issue-list review, neighboring and similar co-change context, and candidate integration, reaches 28.00% refinement exact match, a statistically significant gain of +10.85 percentage points over primary-issue review without any additional context (17.15%), substantially outperforming CodeReviewer (15.02%) and approaching the human-oracle ceiling of 36.09%. Our refinement-guided pruning reduces the average candidate count from 7.2 to 3.1 at top-5 while retaining nearly the full benefit, making the candidate list easier to inspect.
title Improving LLM-Based Go Code Review through Issue-List Generation and Context Augmentation
topic Software Engineering
url https://arxiv.org/abs/2606.01859