SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2601.19383 · 2026

High-quality data augmentation for code comment classification

Thomas Borsani, Original Data, Classifier Module, Andrea Rosani, Giuseppe Di

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, 1 violated it and 0 have no contract verdict; 5 failures of our instrument; 1 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/2601.19383.json · badge: /api/ran/2601.19383.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
ThomBors/NLBSE2026 canonical (classifier label)
classifier basis: census
6 ran · 1 no recorded run
FunctionStatusWhere it lives
filter_dataset_by_quality Ran
ran; our contract draft was wrong, not the code
ThomBors/NLBSE2026/src/oversampling.py
code served (permissive licence) · get_code("3617e861a24dc811")
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 Dataset. 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 datasets import Dataset

torch.manual_seed(0)

# Create a mock dataset with both real and synthetic examples
data = [
    {
        'text': 'example 1',
        'synthetic': False,
        'similarity_score': 0.5
    },
    {
        'text': 'example 2',
        'synthetic': True,
        'similarity_score': 0.95
    },
    {
        'text': 'example 3',
        'synthetic': True,
        'similarity_score': 0.3
    },
    {
        'text': 'example 4',
        'synthetic': False,
        'similarity_score': 0.2
    },
    {
        'text': 'example 5',
        'synthetic': True,
        'similarity_score': 0.8
    },
]

# Create a Hugging Face Dataset
ds = Dataset.from_dict({
    'text': [item['text'] for item in data],
    'synthetic': [item['synthetic'] for item in data],
    'similarity_score': [item['similarity_score'] for item in data],
})

ARGS = {
    'ds': ds,
    'threshold': 0.7,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
datasets, numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Dataset — a Dataset output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Dataset output the recorded ndim 1 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
filter_high_quality_synthetic Ran
ran, violated the contract we drafted
ThomBors/NLBSE2026/src/oversampling.py
code served (permissive licence) · get_code("8a6e180f653a9f39")
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.

import torch
import numpy as np

# Example 1: Real data (should always pass filter)
example_real = {
    'synthetic': False,
    'similarity_score': 0.5
}

# Example 2: Synthetic data with high similarity score (should pass filter)
example_synthetic_high = {
    'synthetic': True,
    'similarity_score': 0.95
}

# Example 3: Synthetic data with low similarity score (should fail filter)
example_synthetic_low = {
    'synthetic': True,
    'similarity_score': 0.3
}

# We'll test with a high-quality synthetic example and a reasonable threshold
threshold = 0.8

ARGS = {
    'example': example_synthetic_high,
    'threshold': threshold
}
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 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
group_texts Ran
ran; our contract draft was wrong, not the code
ThomBors/NLBSE2026/src/utils.py
code served (permissive licence) · get_code("12e2ffa4e0472b06")
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)

# Analyze the function:
# - Takes 'examples' dict with keys that map to lists of lists (concatenated then chunked)
# - Takes 'chunk_size' int parameter (default 64)
# - The function concatenates lists, chunks them, and creates labels from input_ids
# - So examples should have at least 'input_ids' key, possibly others like 'attention_mask'

examples = {
    'input_ids': [
        [101, 2054, 2003, 102],
        [101, 1045, 2572, 102],
    ],
    'attention_mask': [
        [1, 1, 1, 1],
        [1, 1, 1, 1],
    ]
}

ARGS = {
    'examples': examples,
    'chunk_size': 2
}
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
mask_one_token Ran
ran; our contract draft was wrong, not the code
ThomBors/NLBSE2026/src/augment.py
code served (permissive licence) · get_code("6a7f626229b775dc")
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 random
import torch

class MockTokenizer:
    def __init__(self):
        self.cls_token_id = 101
        self.sep_token_id = 102
        self.pad_token_id = 0
        self.mask_token_id = 103

# Create input_ids as a list with some regular tokens and some special tokens
input_ids = [101, 5, 10, 15, 102, 0]  # [CLS], regular tokens, [SEP], [PAD]

tokenizer = MockTokenizer()

ARGS = {
    "input_ids": input_ids,
    "tokenizer": tokenizer
}
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
predict_masked_token Ran
ran; our contract draft was wrong, not the code
ThomBors/NLBSE2026/src/augment.py
code served (permissive licence) · get_code("b5a89edc6322a3ca")
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
import torch.nn as nn

torch.manual_seed(0)

# Create a minimal model that has the structure expected
class MinimalMaskedModel(nn.Module):
    def __init__(self, vocab_size=100, hidden_dim=4):
        super().__init__()
        self.linear = nn.Linear(hidden_dim, vocab_size)
    
    def forward(self, input_ids):
        # Create a simple output structure with logits
        batch_size, seq_len = input_ids.shape
        # Return an object with logits attribute
        hidden = torch.randn(batch_size, seq_len, 4)
        logits = self.linear(hidden)
        
        class Output:
            pass
        
        output = Output()
        output.logits = logits
        return output

# Create a minimal tokenizer stand-in
class MinimalTokenizer:
    def __init__(self):
        self.mask_token_id = 103
        self.vocab = {i: f"token_{i}" for i in range(100)}
    
    def convert_ids_to_tokens(self, token_id):
        return self.vocab.get(token_id, "unk")

# Build arguments
model = MinimalMaskedModel(vocab_size=100, hidden_dim=4)
tokenizer = MinimalTokenizer()

# Create input_ids with a mask token at position 1
input_ids = [101, 103, 102]  # [CLS], [MASK], [SEP]

ARGS = {
    "model": model,
    "tokenizer": tokenizer,
    "input_ids": input_ids,
}
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
split_list_into_columns Ran
ran; our contract draft was wrong, not the code
ThomBors/NLBSE2026/src/utils.py
code served (permissive licence) · get_code("e2ce94e0e52893d4")
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

ARGS = {
    'row': {
        'labels': ['summary', 'Ownership', 'Expand', 'usage', 'Pointer', 'deprecation', 'rational']
    },
    'lang': 'java'
}
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
tokenize_function Not yet run
unverified (harvested, no recorded run)
ThomBors/NLBSE2026/src/utils.py
code served (permissive licence) · get_code("96aa26edf0c56f70")
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, 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

Code comments serve a crucial role in software development for documenting functionality, clarifying design choices, and assisting with issue tracking. They capture developers' insights about the surrounding source code, serving as an essential resource for both human comprehension and automated analysis. Nevertheless, since comments are in natural language, they present challenges for machine-based code understanding. To address this, recent studies have applied natural language processing (NLP) and deep learning techniques to classify comments according to developers' intentions. However, existing datasets for this task suffer from size limitations and class imbalance, as they rely on manual annotations and may not accurately represent the distribution of comments in real-world codebases. To overcome this issue, we introduce new synthetic oversampling and augmentation techniques based on high-quality data generation to enhance the NLBSE'26 challenge datasets. Our Synthetic Quality Oversampling Technique and Augmentation Technique (Q-SYNTH) yield promising results, improving the base classifier by 2.56%. The source code is publicly available at https://github.com/ThomBors/NLBSE2026. • Computing methodologies → Supervised learning.

For agents

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

get_harvested_code_for_paper("2601.19383")
get_code_for_paper("2601.19383")
have("2601.19383")

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

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

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

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

Connect an agent — have() is free.