GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - iSEngLab/Multi-Hunk-APR: [ASE 2026] MultiFixer: A Coordinator-Proposer Based Multi-Agent Framework For Fixing Multi-Hunk Bugs

BranchesTags
Open more actions menu

Latest commit

 

History

90 Commits
90 Commits

Folders and files

NameName
Last commit message
Last commit date
.idea
.idea
 
 
artifacts
artifacts
 
 
baseline
baseline
 
 
context
context
 
 
d4j_patch
d4j_patch
 
 
data
data
 
 
log
log
 
 
paper
paper
 
 
patcheval_baseline
patcheval_baseline
 
 
patcheval_multifixer
patcheval_multifixer
 
 
patcheval_multifixer_data
patcheval_multifixer_data
 
 
script
script
 
 
secbench_baseline
secbench_baseline
 
 
secbench_multifixer
secbench_multifixer
 
 
secbench_multifixer_data
secbench_multifixer_data
 
 
vul4j_patch
vul4j_patch
 
 
.gitignore
.gitignore
 
 
FileParser.zip
FileParser.zip
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
baseline.py
baseline.py
 
 
bug.py
bug.py
 
 
common_config.py
common_config.py
 
 
construct_vul_context.py
construct_vul_context.py
 
 
context.py
context.py
 
 
d4j.py
d4j.py
 
 
draw.py
draw.py
 
 
draw_multi_hunk_repair.py
draw_multi_hunk_repair.py
 
 
gpt.py
gpt.py
 
 
multi_step_apr.py
multi_step_apr.py
 
 
prompt.py
prompt.py
 
 
requirements.txt
requirements.txt
 
 
single_step_apr.py
single_step_apr.py
 
 
tools.py
tools.py
 
 
unique_multi_hunk_repair.py
unique_multi_hunk_repair.py
 
 
utils.py
utils.py
 
 
vul4j.py
vul4j.py
 
 

Repository files navigation

Multi-Hunk-APR

MultiFixer is a Coordinator-Proposer based multi-agent framework for fixing multi-hunk bugs.

Overview

Overview of MultiFixer

Workflow

Defect Cause Analysis (Phase 1)

  • Repository-level static analysis
    Conducted on both source code and test classes, with fine-grained inspection at the class, method, and class variable levels using static analysis tools (e.g., JavaParser).

  • Agent + Tool interaction
    The BugAnalyzer agent autonomously investigates the root cause of the bug by iteratively invoking domain-specific tools (e.g., retrieve method body, get class hierarchy) based on analysis results. This mimics how developers navigate code in an IDE.


Repair Context Construction (Phase 2)

The repair context is composed of five key components:

  • File/class/line-level contextual code
    Surrounding code at multiple granularities to provide dependency and control-flow information.

  • Buggy hunk code
    The exact location of erroneous code, serving as the primary repair target.

  • Failing test case code
    Relevant test cases that expose the defect, used to guide fix generation.

  • Test failure report
    Error messages and stack traces from test execution, providing diagnostic clues.

  • Bug analysis output (from Phase 1)
    Includes root cause summary and relevant code snippets identified by BugAnalyzer, enriching the semantic understanding of the bug.

Together, these form a comprehensive, multi-granular repair context.


Repair Process Based on the Proposer-Coordinator Architecture (Phase 3)

  • Proposer
    A group of agents responsible for generating candidate patches for a given hunk. Multiple proposers run in parallel with diverse configurations (e.g., temperature, model variants) to enhance patch diversity.

  • Coordinator

    • Selects the next hunk to repair based on dependencies and prior repair outcomes.
    • Evaluates all candidate patches generated by the Proposers and selects the most promising one.
  • Hunk-level iterative repair workflow

    1. The Coordinator selects the next hunk to repair.
    2. All Proposers generate patch candidates for the selected hunk.
    3. The Coordinator evaluates and selects the optimal patch.
    4. Repeat until all hunks are fixed or the maximum iteration limit is reached.

This "propose-then-select" paradigm leverages the generation-recognition asymmetry to improve repair accuracy.


Iterative Patch Refinement (Phase 4)

After patch generation, two-stage refinement ensures correctness:

  • Syntax Refinement
    If the patch fails to compile, the model uses compiler error messages to iteratively correct syntactic issues (e.g., missing braces, incorrect indentation).

  • Test Refinement
    If tests still fail after successful compilation, the model analyzes test failure reports and refines the patch semantically (e.g., fixing logic errors).

Refinement proceeds iteratively until the patch passes all tests or reaches the maximum number of iterations.

Experiment

  1. Perform static analysis on the buggy project.
java -jar artifacts/FileParser-1.0-SNAPSHOT-jar-with-dependencies.jar $PROJECT_DIR
  1. Bug analysis
# for multi-hunk bugs
bash script/multi_hunk_bug_analysis.sh 
# for single-hunk bugs
bash script/single_hunk_bug_analysis.sh 
# for vulnerabilities
bash script/vul_analysis.sh
  1. Repair bugs
# for multi-hunk bugs
bash script/multi_hunk_repair.sh
# for single-hunk bugs
bash script/single_hunk_repair.sh 
# for vulnerabilities
bash script/vul_repair.sh

Results

Overall performance of MultiFixer on Defects4J

Method Patch Size D4J-v1.2: SL SH SM MM SF MF PF D4J-v2.0: SL SH SM MM SF MF PF Total: CF PF
ThinkRepair ≤125 52 78 98 0 98 0 - 47 81 107 0 107 0 - 205 -
ChatRepair ≤500 57 79 114 0 114 0 - 48 48 48 0 48 0 - 162 -
RepairAgent 117 52 67 86 4 88 2 96 48 61 71 3 73 1 90 164 186
PReMM 15 53 70 121 26 140 7 184 52 129 141 19 152 8 191 307 375
MultiFixer ≤30 49 74 120 28 141 7 182 56 98 144 34 158 20 230 326 412

Abbreviations:

  • SL: Single Line, SH: Single Hunk, SM: Single Method
  • MM: Multiple Methods, SF: Single File, MF: Multiple Files
  • CF: Correct Fix (Total), PF: Plausible Fix

Overall performance of MultiFixer on VUL4J

Method MultiFixer FSV-Codex FSV-finetuned NTR VRPILOT APR4Vul ChatRepair
CF (RCR) 24 (30.37%) 10.9 (13.79%) 9 (11.39%) 14 (17.72%) 14 (17.72%) 16 (20.25%) 15 (18.98%)

Abbreviations:

  • CF: Correct Fix
  • RCR: Repair Success Rate = CF / Total Bugs (79)

About

[ASE 2026] MultiFixer: A Coordinator-Proposer Based Multi-Agent Framework For Fixing Multi-Hunk Bugs

arxiv.org/abs/2607.26591

Topics

automated-program-repairlarge-language-modelsmulti-agentpatch-generationsoftware-engineering

Resources

Readme
Apache-2.0 license
Activity
Custom properties

Stars

2 stars

Watchers

0 watching

Forks

0 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.