SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2206.08474 · 2022

XLCoST: A Benchmark Dataset for Cross-lingual Code Intelligence

arXiv · PDF · Open in the Atlas

Code that ran

6 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, 0 violated it and 4 have no contract verdict; 2 failures of our instrument; 1 no recorded run), measured 2026-11-22; 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/2206.08474.json · badge: /api/ran/2206.08474.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
reddy-lab-code-research/xlcost canonical (classifier label)
classifier basis not recorded on the link
6 ran · 1 no recorded run
FunctionStatusWhere it lives
calculate_scores Ran
ran on a synthesized input
reddy-lab-code-research/xlcost/code/codesearch/code2codesearch/evaluator/evaluator.py
code served (permissive licence) · get_code("c50ca9641c87e95d")
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 numpy as np

# Analyze the function:
# - answers: dict where keys are URLs/identifiers, values are strings with '/' separators
# - predictions: dict where keys are URLs/identifiers, values are lists of strings with '/' separators
# - The function calculates Mean Reciprocal Rank (MRR) based on matching prefixes

# Create sample data
answers = {
    'url1': 'category_a/document_1',
    'url2': 'category_b/document_2',
    'url3': 'category_c/document_3',
}

predictions = {
    'url1': [
        'category_x/doc_x',
        'category_a/doc_y',  # matches prefix 'category_a', rank 1 (0-indexed), contributes 1/2
        'category_a/doc_z',
    ],
    'url2': [
        'category_b/doc_a',  # matches prefix 'category_b', rank 0, contributes 1/1
        'category_x/doc_b',
    ],
    'url3': [
        'category_x/doc_c',
        'category_y/doc_d',
        'category_z/doc_e',  # no match for category_c, contributes 0
    ],
}

ARGS = {
    'answers': answers,
    'predictions': predictions,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — 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
calculate_scores Ran
ran on a synthesized input
reddy-lab-code-research/xlcost/code/codesearch/nl2codesearch/evaluator/evaluator.py
code served (permissive licence) · get_code("7f2ade7249aa5a35")
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 numpy as np

# The function expects:
# - answers: a dict mapping keys to answer values
# - predictions: a dict mapping keys to lists of predicted indices

ARGS = {
    'answers': {
        'url_1': 2,
        'url_2': 0,
        'url_3': 1,
    },
    'predictions': {
        'url_1': [1, 2, 3],
        'url_2': [0, 1, 2],
        'url_3': [3, 1, 0],
    }
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — 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
compute_bleu Ran
ran; our contract draft was wrong, not the code
reddy-lab-code-research/xlcost/code/translation/code/bleu.py
pointer only (licence: Apache-2.0); the stored copy get_code serves, from WangXFng/RDRec, is pointer only (licence: NONE) · get_code("49289a7f94c227bd")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (Apache-2.0), but get_code serves the stored copy, first harvested from WangXFng/RDRec, and GitHub detected no licence in that repository when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

make_weights Ran
ran on a synthesized input
reddy-lab-code-research/xlcost/code/translation/evaluator/CodeBLEU/calc_code_bleu.py
code served (permissive licence) · get_code("bb29054e8efd01ff")
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

torch.manual_seed(0)

# Analyzing the function:
# - reference_tokens: iterable of tokens (strings or hashable objects)
# - key_word_list: iterable of tokens to check membership in
# The function creates a dict mapping tokens to weights (1 if in key_word_list, else 0.2)

reference_tokens = ['the', 'quick', 'brown', 'fox', 'jumps', 'over', 'lazy', 'dog']
key_word_list = ['the', 'quick', 'fox']

ARGS = {
    'reference_tokens': reference_tokens,
    'key_word_list': key_word_list,
}
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
pad_sequence Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
reddy-lab-code-research/xlcost/code/translation/evaluator/CodeBLEU/utils.py
pointer only (licence: Apache-2.0); the stored copy get_code serves, from alex-haochenli/reco, is pointer only (licence: NONE) · get_code("cd90fe437a24c233")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (Apache-2.0), but get_code serves the stored copy, first harvested from alex-haochenli/reco, and GitHub detected no licence in that repository when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

read_answers Ran
ran on a synthesized input
reddy-lab-code-research/xlcost/code/codesearch/code2codesearch/evaluator/evaluator.py
code served (permissive licence) · get_code("607162abb37ecf72")
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 tempfile
import json
import os

# Create a temporary file with test data in the expected format
temp_file = tempfile.NamedTemporaryFile(mode='w', delete=False, suffix='.jsonl')
test_data = [
    {'url': 'https://example.com/page1', 'idx': 0},
    {'url': 'https://example.com/page2', 'idx': 1},
    {'url': 'https://example.com/page3', 'idx': 42},
]
for item in test_data:
    temp_file.write(json.dumps(item) + '\n')
temp_file.close()

ARGS = {
    'filename': temp_file.name
}
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
read_predictions Not yet run
unverified (harvested, no recorded run)
reddy-lab-code-research/xlcost/code/codesearch/code2codesearch/evaluator/evaluator.py
code served (permissive licence) · get_code("bd511beb7477ff28")
How it ran

no invocation recorded.

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, 3 are also present in other papers whose code we hold (2 with at least one paper dated earlier, 1 the same month, 3 later) and 4 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
compute_bleu 10 other papers
2 dated earlier, 1 the same month, 7 later
1909.09436 (2019-09)
CodeSearchNet Challenge: Evaluating the State of Semantic Code Search
aaai_6453 (2020 (year only))
Improving Knowledge-Aware Dialogue Generation via Knowledge Base Question Answering
2206.05239 (2022-06)
StructCoder: Structure-Aware Transformer for Code Generation
and 7 more not named here
pad_sequence 10 other papers
4 dated earlier, 6 later
1909.09436 (2019-09)
CodeSearchNet Challenge: Evaluating the State of Semantic Code Search
1911.04700 (2019-11)
A Pre-training Based Personalized Dialogue Generation Model with Persona-sparse Data
2009.10297 (2020-09)
CodeBLEU: a Method for Automatic Evaluation of Code Synthesis
and 7 more not named here
make_weights 1 other paper
1 later
2025.findings-acl.1183 (2025 (year only))
TRITONBENCH: Benchmarking Large Language Model Capabilities for Generating Triton Operators

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-22.

Repositories linked to this paper

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

Abstract

Recent advances in machine learning have significantly improved the understanding of source code data and achieved good performance on a number of downstream tasks. Open source repositories like GitHub enable this process with rich unlabeled code data. However, the lack of high quality labeled data has largely hindered the progress of several code related tasks, such as program translation, summarization, synthesis, and code search. This paper introduces XLCoST, Cross-Lingual Code SnippeT dataset, a new benchmark dataset for cross-lingual code intelligence. Our dataset contains fine-grained parallel data from 8 languages (7 commonly used programming languages and English), and supports 10 cross-lingual code tasks. To the best of our knowledge, it is the largest parallel dataset for source code both in terms of size and the number of languages. We also provide the performance of several state-of-the-art baseline models for each task. We believe this new dataset can be a valuable asset for the research community and facilitate the development and validation of new methods for cross-lingual code intelligence.

For agents

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

get_harvested_code_for_paper("2206.08474")
get_code_for_paper("2206.08474")
have("2206.08474")

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

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

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

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

Connect an agent — have() is free.