SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2503.06680 · ACL · 2025

FEA-Bench: A Benchmark for Evaluating Repository-Level Code Generation for Feature Implementation

Wei Li, Shaoguang Mao, Yangyu Huang, Zhongxin Guo, Scarlett Li, Wen Luo, Houfeng Wang, Guangyue Peng, Xin Zhang ♠ † ‡

arXiv · PDF · Open in the Atlas

Code that ran

10 of 16 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; 1 honoured the contract we drafted, 0 violated it and 9 have no contract verdict; 0 failures of our instrument; 6 no recorded run), measured 2026-11-23; 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/2503.06680.json · badge: /api/ran/2503.06680.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
microsoft/FEA-Bench canonical (classifier label)
classifier basis not recorded on the link
10 ran · 6 no recorded run
FunctionStatusWhere it lives
add_lines Ran
ran on a synthesized input
microsoft/FEA-Bench/feabench/collect/make_instructions.py
code served (permissive licence) · get_code("ff2548d09259cc4f")
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 str. 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

# Construct a simple string content for testing
content = """Hello world
This is a test
Another line here"""

# Define ARGS dict with the parameter
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 str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str 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
add_lines_list Ran
ran on a synthesized input
microsoft/FEA-Bench/feabench/collect/make_instructions.py
code served (permissive licence) · get_code("15fc850decd38c0e")
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

def add_lines_list(content):
    content_with_lines = list()
    for ix, line in enumerate(content.split('\n'), start=1):
        content_with_lines.append(f'{ix} {line}')
    return content_with_lines

# The function takes a single parameter 'content' which is a string
# It splits by newlines and prepends line numbers to each line
content_value = "Hello world\nThis is a test\nThird line"

ARGS = {
    'content': content_value
}
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 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
calc_cost Ran
ran, honoured the contract we drafted
microsoft/FEA-Bench/feabench/prediction/prediction_openai.py
code served (permissive licence) · get_code("6a251b76292312e2")
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 float, 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.

import logging

logging.basicConfig(level=logging.INFO)

ARGS = {
    "model_name": "gpt-4o",
    "input_tokens": 150,
    "output_tokens": 75,
}
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 float, 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
cl100k Ran
ran on a synthesized input
microsoft/FEA-Bench/feabench/collect/make_instructions.py
code served (permissive licence) · get_code("9a7e9f7c41d4f4e3")
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 int; 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

# The function calls tokenizer.encode(text, disallowed_special=())
# So we need a tokenizer object with an encode method that accepts text and disallowed_special

class StandInTokenizer:
    def encode(self, text, disallowed_special=()):
        # Return a simple list of token ids
        return [100, 200, 300, 400]

torch.manual_seed(0)

ARGS = {
    "text": "hello world this is a test",
    "tokenizer": StandInTokenizer()
}
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 int — 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
find_matches Ran
ran on a synthesized input
microsoft/FEA-Bench/feabench/prediction/patch_process.py
code served (permissive licence) · get_code("9e041acdfbfb5dd6")
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 int; 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

def find_matches(file_lines, lines):
    aligned_idx = []
    for i in range(len(file_lines) - len(lines) + 1):
        slice = file_lines[i:i + len(lines)]
        if slice == lines:
            aligned_idx.append(i)
    return aligned_idx

# Construct arguments
file_lines = [
    "def hello():",
    "    print('world')",
    "    return 42",
    "def goodbye():",
    "    print('farewell')",
]

lines = [
    "    print('world')",
    "    return 42",
]

ARGS = {
    "file_lines": file_lines,
    "lines": lines,
}
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 int — 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
get_model_limits_huggingface Ran
ran on a synthesized input
microsoft/FEA-Bench/feabench/prediction/prediction_vllm.py
code served (permissive licence) · get_code("fdb9a6e7c7dfd837")
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 int, ndim 0, dtype family int, 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.

import logging
import os
from unittest.mock import MagicMock

# Set up logging
logging.basicConfig(level=logging.INFO)

# Set environment variable for MAX_SEQ_LEN if needed
os.environ['MAX_SEQ_LEN'] = '128000'

# Create a mock config object that AutoConfig.from_pretrained would return
class MockConfig:
    def __init__(self):
        self.max_position_embeddings = 4096
        self.max_seq_length = 2048

# Mock AutoConfig.from_pretrained to return our mock config
import transformers
original_from_pretrained = transformers.AutoConfig.from_pretrained

def mock_from_pretrained(model_name_or_path, trust_remote_code=True):
    return MockConfig()

transformers.AutoConfig.from_pretrained = mock_from_pretrained

# Define arguments for the function
ARGS = {
    'model_name_or_path': 'gpt2',
    'max_limit': 128000
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
transformers — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type int, ndim 0, dtype family int, 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
is_test_file Ran
ran on a synthesized input
microsoft/FEA-Bench/feabench/collect/utils.py
code served (permissive licence) · get_code("cbd300cf44ebcf38")
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 = {
    'path': 'test_module.py'
}
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
parse_hunk_header Ran
ran on a synthesized input
microsoft/FEA-Bench/feabench/prediction/patch_process.py
code served (permissive licence) · get_code("050d848429c3c4b5")
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, ndim 1, dtype family int; 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 parse_hunk_header(hunk_header):
    """
    Parses a unified diff hunk header and extracts the start line numbers and lengths for both old and new files.
    
    Args:
        hunk_header (str): The hunk header line in the format '@@ -X,Y +A,B @@'
        
    Returns:
        tuple: A tuple containing four integers (old_start, old_length, new_start, new_length)
    """
    extract_by_split = hunk_header.strip().split('@@')
    pattern = '@@ -(?P<old_start>\\d+)(?:,(?P<old_length>\\d+))? \\+(?P<new_start>\\d+)(?:,(?P<new_length>\\d+))? @@'
    pure_header = '@@' + extract_by_split[1] + '@@'
    match = re.match(pattern, pure_header.strip())
    if not match:
        raise ValueError('Invalid hunk header format')
    old_start = int(match.group('old_start'))
    old_length = int(match.group('old_length')) if match.group('old_length') else 1
    new_start = int(match.group('new_start'))
    new_length = int(match.group('new_length')) if match.group('new_length') else 1
    return (old_start, old_length, new_start, new_length)


ARGS = {
    'hunk_header': '@@ -10,5 +12,7 @@'
}
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, ndim 1, dtype family int — a tuple 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
remove_comments_and_whitespace Ran
ran on a synthesized input
microsoft/FEA-Bench/feabench/get_dataset.py
code served (permissive licence) · get_code("744a9f4f56892e94")
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 str. 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 re

def remove_comments_and_whitespace(line):
    """Remove Python comments and trailing whitespace from a line of code."""
    cleaned_line = re.sub('#.*', '', line)
    return cleaned_line.rstrip()

ARGS = {
    "line": "x = 5  # this is a comment"
}
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 str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str 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
run_command Ran
ran on a synthesized input
microsoft/FEA-Bench/feabench/get_dataset.py
code served (permissive licence) · get_code("ae38c85f79ffb235")
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 CompletedProcess. 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 re
import subprocess
import json

# Set up arguments for run_command function
# The function takes a command (list of strings), optional cwd, and optional check flag

ARGS = {
    "command": ["echo", "hello", "world"],
    "cwd": None,
    "check": 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 CompletedProcess — a CompletedProcess output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a CompletedProcess 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
call_chat Not yet run
unverified (harvested, no recorded run)
microsoft/FEA-Bench/feabench/prediction/prediction_openai.py
code served (permissive licence) · get_code("7eea2e9c7d73b624")
How it ran

no invocation recorded.

get_default_branch Not yet run
unverified (harvested, no recorded run)
microsoft/FEA-Bench/feabench/get_dataset.py
code served (permissive licence) · get_code("211c8776b6934d53")
How it ran

no invocation recorded.

get_tokenizer_online Not yet run
unverified (harvested, no recorded run)
microsoft/FEA-Bench/feabench/prediction/tokenizer_online.py
code served (permissive licence) · get_code("3878579948b74212")
How it ran

no invocation recorded.

gpt_tokenize Not yet run
unverified (harvested, no recorded run)
microsoft/FEA-Bench/feabench/prediction/tokenizer_online.py
code served (permissive licence) · get_code("dd9b2adb8a5ef900")
How it ran

no invocation recorded.

parse_model_args Not yet run
unverified (harvested, no recorded run)
microsoft/FEA-Bench/feabench/run_prediction.py
code served (permissive licence) · get_code("266a34e05903a0dd")
How it ran

no invocation recorded.

process_datum_openai Not yet run
unverified (harvested, no recorded run)
microsoft/FEA-Bench/feabench/prediction/prediction_openai.py
code served (permissive licence) · get_code("85ea28b3cf26e6e6")
How it ran

no invocation recorded.

Also present in other papers' code

Of 16 samples lifted from this paper's linked repositories, 16 carry a function identity and 0 do not. Of the 16 distinct functions with an identity, 1 are also present in other papers whose code we hold (1 with at least one paper dated earlier, 0 the same month, 0 later) and 15 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
calc_cost 1 other paper
1 dated earlier
2410.03859 (2024-10)
SWE-bench Multimodal: Do AI Systems Generalize to Visual Software Domains?

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

Implementing new features in repository-level codebases is a crucial application of code generation models. However, current benchmarks lack a dedicated evaluation framework for this capability. To fill this gap, we introduce FEA-Bench, a benchmark designed to assess the ability of large language models (LLMs) to perform incremental development within code repositories. We collect pull requests from 83 GitHub repositories and use rule-based and intent-based filtering to construct task instances focused on new feature development. Each task instance containing code changes is paired with relevant unit test files to ensure that the solution can be verified. The feature implementation requires LLMs to simultaneously possess code completion capabilities for new components and code editing abilities for other relevant parts in the code repository, providing a more comprehensive evaluation method of LLMs' automated software engineering capabilities. Experimental results show that LLMs perform significantly worse in the FEA-Bench, highlighting considerable challenges in such repository-level incremental code development. Our code will soon be publicly available at https://github.com/microsoft/FEA-Bench.

For agents

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

get_harvested_code_for_paper("2503.06680")
get_code_for_paper("2503.06680")
have("2503.06680")

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

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

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

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

Connect an agent — have() is free.