SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2309.00608 · 2023

Copiloting the Copilots: Fusing Large Language Models with Completion Engines for Automated Program Repair

arXiv · PDF · Open in the Atlas

Code that ran

7 of 7 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (0 of them constructed an object rather than computing a result; 0 honoured the contract we drafted, 1 violated it and 0 have no contract verdict; 6 failures of our instrument; 0 no recorded run), measured 2026-11-23; repository links from the Papers with Code archive attributed under CC BY-SA, no affiliation; bodies inline only under a permissive licence as GitHub detects it. Not a reproduction of the paper's results.

"Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results. This record, dated, as JSON: /api/ran/2309.00608.json · badge: /api/ran/2309.00608.svg

Each repository's role is a label: a classifier's output recorded on the link, or, where no role is recorded, what the Papers with Code archive marked. The line under it names its basis. Neither says who wrote the code.

RepositoryRoleRan
ise-uiuc/Repilot canonical (classifier label)
classifier basis: census
7 ran · 0 no recorded run
FunctionStatusWhere it lives
char_may_trigger_completion Ran
ran, violated the contract we drafted
ise-uiuc/Repilot/src/repilot/generation.py
code served (permissive licence) · get_code("a89140b43c639226")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned bool, ndim 0, dtype family float, shape () as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

# Setup code for char_may_trigger_completion

def char_may_trigger_completion(c: str) -> bool:
    assert len(c) == 1
    return c.isalnum() or c in ['.', '_', '$']

# The function takes a single character string parameter
# It checks if the character is alphanumeric or one of: . _ $

ARGS = {
    'c': 'a'
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type bool, ndim 0, dtype family float, shape () — shape () as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
match_calling_function Ran
ran; our contract draft was wrong, not the code
ise-uiuc/Repilot/src/repilot/template.py
code served (permissive licence) · get_code("164175bb44f84216")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned list, ndim 2, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import re

def match_calling_function(code):
    ret = []
    matches = re.finditer('[^)(\\s]+\\([^)(]+\\)', code)
    for match in matches:
        matched_code = match.group()
        sc = code.split(matched_code)
        if len(sc) != 2:
            continue
        matched_code.split('(')
        ret.append((sc[0], '(' + ''.join(matched_code.split('(')[1:]) + sc[1]))
    return ret

# The function takes a single parameter: code (a string)
# It uses re.finditer to find regex matches in the code string
# It processes the matched patterns and splits the code string

ARGS = {
    "code": "foo(bar) some_text func(arg1) end_text"
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type list, ndim 2, dtype family float — a list output has no array shape of its own; none is stated
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
match_conditional_expression Ran
ran; our contract draft was wrong, not the code
ise-uiuc/Repilot/src/repilot/template.py
code served (permissive licence) · get_code("fe5517e31bea5992")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned list, ndim 2, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import re

def match_conditional_expression(code):
    ret = []
    if re.match('if\\s?\\(.+\\)\\s?{$', code):
        s_code = code.split(')')
        pre_code = ')'.join(s_code[:-1])
        post_code = ')' + s_code[-1]
        ret.append((pre_code + ' &&', post_code))
        ret.append((pre_code + ' ||', post_code))
    return ret

# The function takes a string parameter 'code' and uses re.match() on it
# It checks if the code matches the pattern 'if\s?\(.+\)\s?{$'
# Then it splits by ')' and reconstructs strings

ARGS = {
    'code': 'if (x > 5) {'
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type list, ndim 2, dtype family float — a list output has no array shape of its own; none is stated
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
match_function_api_call Ran
ran; our contract draft was wrong, not the code
ise-uiuc/Repilot/src/repilot/template.py
code served (permissive licence) · get_code("a7239965ae6c0780")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned list, ndim 2, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import re

def match_function_api_call(code):
    ret: list = []
    matches = re.finditer('\\([^)(]+\\)', code)
    for match in matches:
        matched_code = match.group()
        sc = code.split(matched_code)
        if len(sc) != 2:
            continue
        t_prefix = sc[0] + '('
        t_suffix = ')' + sc[1]
        if t_prefix not in [v[0] for v in ret] and t_suffix not in [v[1] for v in ret]:
            ret.append((t_prefix, t_suffix))
    return ret

# Construct valid test code strings for the function
code_1 = "print(hello) world"
code_2 = "func(arg1) suffix and func(arg2) more"
code_3 = "call(x) text call(y) text"
code_4 = "function(123) end"
code_5 = ""

ARGS = {
    "code": code_1
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type list, ndim 2, dtype family float — a list output has no array shape of its own; none is stated
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
take_while Ran
ran; our contract draft was wrong, not the code
ise-uiuc/Repilot/src/repilot/utils.py
code served (permissive licence) · get_code("ff2facb100494948")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned tuple. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import itertools
from typing import Callable, Iterable, Iterator

torch.manual_seed(0)

# Define a simple predicate function that returns True for numbers less than 5
def pred(x: int) -> bool:
    return x < 5

# Define an iterable - a list of integers
iterable = [1, 2, 3, 4, 5, 6, 7, 8]

ARGS = {
    "pred": pred,
    "iterable": iterable
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple — a tuple output has no array shape of its own; none is stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
take_while_two Ran
ran; our contract draft was wrong, not the code
ise-uiuc/Repilot/src/repilot/utils.py
code served (permissive licence) · get_code("529ab9928631fcbf")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned tuple. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import itertools
from typing import Callable, Iterable, Iterator, TypeVar

T = TypeVar('T')

def take_while_two(pred_first: Callable[[T], bool], pred: Callable[[T, T], bool], iterable: Iterable[T]) -> tuple[list[T], Iterator[T]]:
    """take_while that looks at two elements at a time"""
    iterator = iter(iterable)
    try:
        first_elem = next(iterator)
        if not pred_first(first_elem):
            return ([], itertools.chain([first_elem], iterator))
    except StopIteration:
        return ([], iter([]))
    elements: list[T] = [first_elem]
    return_iter = iterator
    for elem in iterator:
        if pred(first_elem, elem):
            elements.append(elem)
            first_elem = elem
        else:
            return_iter = itertools.chain([elem], iterator)
            break
    return (elements, return_iter)

# Setup code to construct valid arguments
def pred_first(x: int) -> bool:
    """Checks if first element is less than 100"""
    return x < 100

def pred(x: int, y: int) -> bool:
    """Checks if two consecutive elements are in ascending order"""
    return x < y

# Create an iterable of integers
iterable = [1, 2, 3, 5, 4, 6, 7]

ARGS = {
    'pred_first': pred_first,
    'pred': pred,
    'iterable': iterable,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple — a tuple output has no array shape of its own; none is stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
transpose Ran
ran; our contract draft was wrong, not the code
ise-uiuc/Repilot/src/repilot/evaluation.py
code served (permissive licence) · get_code("0d279f41ed1fdeef")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned list. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import numpy as np
from itertools import groupby, zip_longest
from typing import TypeVar

torch.manual_seed(0)

Datapoint = TypeVar('Datapoint')
Project = str
RunnerId = str

# Construct sample data matching the function signature
# data_grouped_by_project: list[tuple[RunnerId, list[tuple[Project, dict[str, Datapoint]]]]]

# Create some sample datapoints (can be any type)
datapoint_1 = 42
datapoint_2 = 3.14
datapoint_3 = "result_a"
datapoint_4 = "result_b"

# Build the nested structure from inside out
# For runner "runner_1": project "proj_A" -> dict with datapoint
project_data_1 = [
    ("proj_A", {"metric_1": datapoint_1, "metric_2": datapoint_2}),
    ("proj_B", {"metric_1": datapoint_3, "metric_2": datapoint_4})
]

# For runner "runner_2": different projects and datapoints
project_data_2 = [
    ("proj_A", {"metric_1": 100, "metric_2": 200}),
    ("proj_C", {"metric_1": "x", "metric_2": "y"})
]

# Construct the full argument
data_grouped_by_project = [
    ("runner_1", project_data_1),
    ("runner_2", project_data_2)
]

ARGS = {
    "data_grouped_by_project": data_grouped_by_project
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type list — a list output has no array shape of its own; none is stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block

Also present in other papers' code

Of 7 samples lifted from this paper's linked repositories, 7 carry a function identity and 0 do not. Of the 7 distinct functions with an identity, 0 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 0 the same month, 0 later) and 7 are only here among the 52,977 papers whose code Syntology holds (as of 2026-09-26).

Only here means: among the 52,977 papers whose code Syntology holds (51,887 with lifted samples, 1,090 through their assemblies only), as of 2026-09-26, no other paper's lifted samples or current assembly bricks contain an identical function body after normalisation.

Presence, not direction: an identical function body in two papers' repositories does not say who wrote it, which came from which, or that either paper's method rests on it. Matching is exact after normalisation, so a renamed or edited function is not matched. Dates are when papers appeared, not when code was written. Only .py files the harvester lifted are covered; notebooks are not read. A new-style arXiv id YYMM.NNNN dates a paper to the month 20YY-MM; otherwise Paper.year dates it to the year; otherwise it is undated. Dates are when the paper appeared, not when the code was written. Read 2026-11-23.

Repositories linked to this paper

Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.

Abstract

During Automated Program Repair (APR), it can be challenging to synthesize correct patches for real-world systems in general-purpose programming languages. Recent Large Language Models (LLMs) have been shown to be helpful "copilots" in assisting developers with various coding tasks, and have also been directly applied for patch synthesis. However, most LLMs treat programs as sequences of tokens, meaning that they are ignorant of the underlying semantics constraints of the target programming language. This results in plenty of statically invalid generated patches, impeding the practicality of the technique. Therefore, we propose Repilot, a general code generation framework to further copilot the AI "copilots" (i.e., LLMs) by synthesizing more valid patches during the repair process. Our key insight is that many LLMs produce outputs autoregressively (i.e., token by token), resembling human writing programs, which can be significantly boosted and guided through a Completion Engine. Repilot synergistically synthesizes a candidate patch through the interaction between an LLM and a Completion Engine, which 1) prunes away infeasible tokens suggested by the LLM and 2) proactively completes the token based on the suggestions provided by the Completion Engine. Our evaluation on a subset of the widely-used Defects4j 1.2 and 2.0 datasets shows that Repilot outperforms state-of-the-art techniques by fixing 27% and 47% more bugs, respectively. Moreover, Repilot produces more valid and correct patches than the base LLM with the same budget. While we focus on leveraging Repilot for APR in this work, the overall approach is also generalizable to other code generation tasks.

For agents

The same record, over MCP at https://syntology.ai/mcp:

get_harvested_code_for_paper("2309.00608")
get_code_for_paper("2309.00608")
have("2309.00608")

The run record, dated, one paper per request, free:

curl https://syntology.ai/api/ran/2309.00608.json

A badge for a README (the split and the date, never a ratio):

[![Syntology run record](https://syntology.ai/api/ran/2309.00608.svg)](https://syntology.ai/paper/2309.00608)

Connect an agent — have() is free.