SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2410.14684 · ICLR · 2025

RepoGraph: Enhancing AI Software Engineering with Repository-level Code Graph

Jiawei Han, Wenhao Yu, Hongming Zhang, Dong Yu, Zhihan Zhang, Siru Ouyang, Kaixin Ma, Zilin Xiao, Mengzhao Jia

arXiv · PDF · Open in the Atlas

Code that ran

9 of 11 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; 8 failures of our instrument; 2 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/2410.14684.json · badge: /api/ran/2410.14684.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
ozyyshr/RepoGraph canonical (classifier label)
classifier basis: census
9 ran · 2 no recorded run
FunctionStatusWhere it lives
append_exit Ran
ran; our contract draft was wrong, not the code
ozyyshr/RepoGraph/SWE-agent/inspector/server.py
code served (permissive licence) · get_code("68f55024cd46b001")
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 dict. 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

torch.manual_seed(0)

# Construct a valid content dict for append_exit
content = {
    'history': [
        {'role': 'user', 'content': 'Hello'},
        {'role': 'model', 'content': 'Hi there'}
    ],
    'info': {
        'exit_status': 'submitted',
        'submission': 'This is the model patch submission'
    }
}

ARGS = {
    'content': content
}
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 dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not 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
append_patch Ran
ran; our contract draft was wrong, not the code
ozyyshr/RepoGraph/SWE-agent/inspector/server.py
code served (permissive licence) · get_code("832400f6fa870791")
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 dict. 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

# Construct valid arguments for append_patch function

# instance_id: a string identifier
instance_id = "instance_001"

# content: a dict with 'info' and 'history' keys
# The function checks if content['info']['exit_status'] is not None
# and appends to content['history']
content = {
    'info': {
        'exit_status': 0  # Non-None value to trigger the condition
    },
    'history': []
}

# patches: a dict mapping instance_id to patch content strings
patches = {
    "instance_001": "This is a patch content for the instance"
}

# patch_type: a string describing the type of patch
patch_type = "Security"

ARGS = {
    'instance_id': instance_id,
    'content': content,
    'patches': patches,
    'patch_type': patch_type
}
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 dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not 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
convert_experiments_to_rows Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
ozyyshr/RepoGraph/SWE-agent/evaluation/aggregate_results.py
code served (permissive licence) · get_code("5a33f78529e0932e")
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 tempfile
import json
import os
from pathlib import Path

# Create a temporary directory structure to mimic the expected folder hierarchy
temp_dir = tempfile.mkdtemp()

# Create nested directory structure: temp_dir -> exp_dir -> run_dir -> results
exp_dir = Path(temp_dir) / "experiment_1"
exp_dir.mkdir(exist_ok=True)

# Create a run directory with the expected naming convention
# Format: model__dataset__setup__t-temperature__p-top_p__c-cost__install-X__run-Y
run_dir = exp_dir / "gpt4__swe-bench-dev-test__default__t-0.5__p-0.9__c-1.5__install-1__run-1"
run_dir.mkdir(exist_ok=True)

# Create results.json with expected structure
results_data = {
    "report": {
        "# Not Generated": 0,
        "# Generated": 5,
        "# Applied": 4,
        "# Resolved": 3
    },
    "resolved": ["inst_001", "inst_002", "inst_003"],
    "counts": {
        "resolved": ["inst_001", "inst_002", "inst_003"]
    }
}

results_json_path = run_dir / "results.json"
with open(results_json_path, "w") as f:
    json.dump(results_data, f)

# Create trajectory files (.traj) with model stats
for i in range(5):
    traj_data = {
        "info": {
            "model_stats": {
                "instance_cost": 0.5 + i * 0.1
            }
        }
    }
    traj_file = run_dir / f"inst_{i:03d}.traj"
    with open(traj_file, "w") as f:
        json.dump(traj_data, f)

# Create another run directory to test multiple runs
run_dir_2 = exp_dir / "gpt4__swe-bench-dev-test__default__t-0.5__p-0.9__c-1.5__install-1__run-2"
run_dir_2.mkdir(exist_ok=True)

results_json_path_2 = run_dir_2 / "results.json"
with open(results_json_path_2, "w") as f:
    json.dump(results_data, f)

for i in range(5):
    traj_data = {
        "info": {
            "model_stats": {
                "instance_cost": 0.6 + i * 0.1
            }
        }
    }
    traj_file = run_dir_2 / f"inst_{i:03d}.traj"
    with open(traj_file, "w") as f:
        json.dump(traj_data, f)

ARGS = {
    "folder_name": temp_dir,
    "runs_max": 10
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
rich — 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
create_structure Ran
ran; our contract draft was wrong, not the code
ozyyshr/RepoGraph/repograph/utils.py
code served (permissive licence) · get_code("1f22c693e99cde22")
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 dict. 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 os
import tempfile
import shutil

# Create a temporary directory with Python files to parse
temp_dir = tempfile.mkdtemp()

# Create a sample Python file with classes and functions
sample_py_content = '''
class MyClass:
    def __init__(self):
        pass
    
    def method_one(self):
        return 42
    
    def method_two(self):
        return "hello"

class AnotherClass:
    def some_method(self):
        pass

def standalone_function():
    return "standalone"

def another_function(x, y):
    return x + y
'''

# Write the sample file
sample_file_path = os.path.join(temp_dir, 'sample.py')
with open(sample_file_path, 'w') as f:
    f.write(sample_py_content)

# Create a subdirectory with another Python file
subdir = os.path.join(temp_dir, 'subdir')
os.makedirs(subdir)

subdir_py_content = '''
class SubClass:
    def sub_method(self):
        pass

def sub_function():
    pass
'''

subdir_file_path = os.path.join(subdir, 'submodule.py')
with open(subdir_file_path, 'w') as f:
    f.write(subdir_py_content)

# Create a non-Python file to test handling
non_py_file = os.path.join(temp_dir, 'readme.txt')
with open(non_py_file, 'w') as f:
    f.write('This is a readme')

ARGS = {
    'directory_path': temp_dir
}
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 dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not 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
get_args Ran
ran; our contract draft was wrong, not the code
ozyyshr/RepoGraph/SWE-agent/run_replay.py
code served (permissive licence) · get_code("cf1f71a0c4207992")
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 tempfile
import os

torch.manual_seed(0)

# Create temporary files for the required arguments
with tempfile.TemporaryDirectory() as tmpdir:
    config_file_path = os.path.join(tmpdir, "config.yaml")
    with open(config_file_path, 'w') as f:
        f.write("# dummy config\n")
    
    traj_path = os.path.join(tmpdir, "trajectory.pkl")
    with open(traj_path, 'w') as f:
        f.write("# dummy trajectory\n")
    
    data_path = os.path.join(tmpdir, "data.pkl")
    with open(data_path, 'w') as f:
        f.write("# dummy data\n")
    
    # Define ARGS dictionary with actual file paths
    ARGS = {
        'args': [
            '--config_file', config_file_path,
            '--traj_path', traj_path,
            '--data_path', data_path,
            '--suffix', '_test_suffix'
        ]
    }
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
get_folders Ran
ran; our contract draft was wrong, not the code
ozyyshr/RepoGraph/SWE-agent/evaluation/aggregate_results.py
code served (permissive licence) · get_code("fffe5e07e907c1c1")
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 1, 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 tempfile
import os
from pathlib import Path

# Create a temporary directory structure for testing
temp_dir = tempfile.mkdtemp()

# Create some subdirectories
subdir1 = os.path.join(temp_dir, "folder1")
subdir2 = os.path.join(temp_dir, "folder2")
subdir3 = os.path.join(temp_dir, "folder3")

os.makedirs(subdir1, exist_ok=True)
os.makedirs(subdir2, exist_ok=True)
os.makedirs(subdir3, exist_ok=True)

# Create a file to ensure we only return directories
file_path = os.path.join(temp_dir, "file.txt")
with open(file_path, "w") as f:
    f.write("test")

ARGS = {
    "path": temp_dir
}
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 1, 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
parse_folder_name Ran
ran; our contract draft was wrong, not the code
ozyyshr/RepoGraph/SWE-agent/evaluation/aggregate_results.py
code served (permissive licence) · get_code("e84811899906e0d4")
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 1, 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 torch
import numpy as np

ARGS = {
    "folder_name": "experiment__model_v1__2024__lr_0.001__batch_32__seed_42__checkpoint_5"
}
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, ndim 1, 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
parse_python_file Ran
ran; our contract draft was wrong, not the code
ozyyshr/RepoGraph/repograph/utils.py
code served (permissive licence) · get_code("94dc3cbe589f0afa")
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 ast
import tempfile
import os

# Create a valid Python file content to parse
sample_python_code = '''
class MyClass:
    def __init__(self):
        self.value = 42
    
    def method_one(self):
        return self.value
    
    def method_two(self, x):
        return x * 2

def standalone_function():
    return "hello"

def another_function(a, b):
    return a + b
'''

# We can pass file_content directly to avoid file I/O
file_path = "dummy_file.py"
file_content = sample_python_code

ARGS = {
    "file_path": file_path,
    "file_content": file_content
}
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
string2bool Ran
ran, violated the contract we drafted
ozyyshr/RepoGraph/SWE-agent/make_demos/convert_traj_to_demo.py
code served (permissive licence) · get_code("233b4e2398b648a6")
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.

ARGS = {
    's': 'true'
}
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
append_results Not yet run
unverified (harvested, no recorded run)
ozyyshr/RepoGraph/SWE-agent/inspector/server.py
code served (permissive licence) · get_code("8b6946ae65eae8d8")
How it ran

no invocation recorded.

find_relative_path Not yet run
unverified (harvested, no recorded run)
ozyyshr/RepoGraph/SWE-agent/inspector/static.py
code served (permissive licence) · get_code("dad9596c8ede1a8f")
How it ran

no invocation recorded.

Also present in other papers' code

Of 11 samples lifted from this paper's linked repositories, 11 carry a function identity and 0 do not. Of the 11 distinct functions with an identity, 2 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 0 the same month, 2 later) and 9 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.

FunctionAlso present inEarliest-datedOthers named
parse_python_file 2 other papers
2 later
2412.01007 (2024-12)
CoRNStack: High-Quality Contrastive Data for Better Code Retrieval and Reranking
2502.19811 (2025-02)
Comet: Fine-grained Computation-communication Overlapping for Mixture-of-Experts
create_structure 1 other paper
1 later
2412.01007 (2024-12)
CoRNStack: High-Quality Contrastive Data for Better Code Retrieval and Reranking

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

Large Language Models (LLMs) excel in code generation yet struggle with modern AI software engineering tasks. Unlike traditional function-level or file-level coding tasks, AI software engineering requires not only basic coding proficiency but also advanced skills in managing and interacting with code repositories. However, existing methods often overlook the need for repository-level code understanding, which is crucial for accurately grasping the broader context and developing effective solutions. On this basis, we present REPOGRAPH, a plug-in module that manages a repository-level structure for modern AI software engineering solutions. REPOGRAPH offers the desired guidance and serves as a repositorywide navigation for AI software engineers. We evaluate REPOGRAPH on the SWE-bench by plugging it into four different methods of two lines of approaches, where REPOGRAPH substantially boosts the performance of all systems, leading to a new state-of-the-art among open-source frameworks. Our analyses also demonstrate the extensibility and flexibility of REPOGRAPH by testing on another repo-level coding benchmark, CrossCodeEval. Our code is available at https://github.com/ozyyshr/RepoGraph

For agents

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

get_harvested_code_for_paper("2410.14684")
get_code_for_paper("2410.14684")
have("2410.14684")

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

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

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

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

Connect an agent — have() is free.