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 — Multi-Hunk-APR/secbench_multifixer at master · iSEngLab/Multi-Hunk-APR

Expand file tree

/

secbench_multifixer

/
Copy path

Directory actions

More options

More options

Directory actions

More options

More options

Latest commit

 

History

History
History
/

secbench_multifixer

/
Copy path

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
README.md
README.md
 
 
__init__.py
__init__.py
 
 
agent_analysis.py
agent_analysis.py
 
 
cli.py
cli.py
 
 
dataset.py
dataset.py
 
 
docker_backend.py
docker_backend.py
 
 
llm.py
llm.py
 
 
models.py
models.py
 
 
prompts.py
prompts.py
 
 
relations.py
relations.py
 
 
repair.py
repair.py
 
 
scheduler.py
scheduler.py
 
 

README.md

Outline

SEC-bench MultiFixer

This directory adapts the MultiFixer repair loop to the SEC-bench C++200 cve split.

The implementation intentionally skips the original paper's first two phases for this supplemental experiment:

  • no BugAnalyzer phase;
  • no context-construction phase beyond local oracle-location context;
  • oracle locations are extracted from developer patches, but only file/range metadata is used;
  • developer added lines are not placed in prompts.

Mechanism

The SEC-bench version makes the scheduling contribution explicit.

  1. dataset.py extracts oracle hunk locations from SEC-bench developer patches.
  2. docker_backend.py reads vulnerable source files from SEC-bench Docker images and runs the official evaluator.
  3. relations.py builds a hunk relation graph using lightweight C/C++ static analysis:
    • prerequisite
    • symmetric_fixing
    • change_propagation
    • shared_state
    • co_located
    • failure_relevance
    • conflict_risk
  4. An optional LLM pass validates or adds semantic relation edges.
  5. scheduler.py chooses the next hunk with a rule score over the relation graph; the LLM is only used as a top-k tie breaker.
  6. Multiple Proposers generate hunk replacements at different temperatures.
  7. Candidate selection first computes agreement/similarity/pattern metrics, then asks the Coordinator to choose using those metrics.
  8. After all hunks are repaired, replacements are synthesized into one git patch and refined against SEC-bench evaluator feedback.

Data

The 65 multi-hunk SEC-bench CVEs are stored locally in:

secbench_multifixer_data/secbench_cve200_multihunk65.csv
secbench_multifixer_data/secbench_cve200_multihunk65.jsonl

Summary:

65 / 200 standard patches are multi-hunk.
31 / 65 multi-hunk patches are also multi-file.

Usage On 5880

ssh 5880
source ~/miniconda3/etc/profile.d/conda.sh
conda activate secb
cd /path/to/Multi-Hunk-APR

List the 65 instances:

python -m secbench_multifixer.cli list

Analyze hunk relations only:

python -m secbench_multifixer.cli analyze \
  --instance-id njs.cve-2022-32414 \
  --output-dir result/secbench_multifixer_analyze

Run repair for one instance:

python -m secbench_multifixer.cli repair \
  --instance-id njs.cve-2022-32414 \
  --output-dir result/secbench_multifixer \
  --coordinator-model qwen3.7-max \
  --proposer-model qwen3.7-max \
  --refine-model qwen3.7-max \
  --proposer-num 3 \
  --max-steps 20 \
  --refine-iterations 20 \
  --python python

Use --no-relation-llm --no-scheduler-llm to run a static-only scheduler ablation.

You are visitor 01402792 — 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.