SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2305.16615 · 2023

AIBugHunter: A Practical Tool for Predicting, Classifying and Repairing Software Vulnerabilities

arXiv · PDF · Open in the Atlas

Code that ran

5 of 5 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 5 have no contract verdict; 0 failures of our instrument; 0 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/2305.16615.json · badge: /api/ran/2305.16615.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
awsm-research/aibughunter canonical (classifier label)
classifier basis: census
5 ran · 0 no recorded run
FunctionStatusWhere it lives
compute_adjustment Ran
ran on a synthesized input
awsm-research/aibughunter/rq1_cwe_id_cls/bert_base/bert_base_main.py
code served (permissive licence) · get_code("081832dce3023c52")
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 Tensor, ndim 1, dtype family float, shape (4,) 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 numpy as np
import torch

torch.manual_seed(0)

# Create a small stand-in class for args that has a device attribute
class ArgsStandIn:
    def __init__(self, device):
        self.device = device

# Create the cwe_label_map
# Structure: {key: (index, something, frequency)}
# The function iterates through and collects v[2] (frequency) where v[0] == i
cwe_label_map = {
    'cwe_001': (0, 'name1', 0.4),
    'cwe_002': (1, 'name2', 0.3),
    'cwe_003': (2, 'name3', 0.2),
    'cwe_004': (0, 'name4', 0.1),
}

ARGS = {
    'tau': 1.0,
    'args': ArgsStandIn(device='cpu'),
    'cwe_label_map': cwe_label_map,
}
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 Tensor, ndim 1, dtype family float, shape (4,) — shape (4,) 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
convert_examples_to_features Ran
ran on a synthesized input
awsm-research/aibughunter/rq3_cvss_score_reg/bert/bert_base_main.py
code served (permissive licence) · get_code("dbb914994067a9fd")
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 InputFeatures. 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

class SimpleTokenizer:
    def __init__(self):
        self.cls_token = "[CLS]"
        self.sep_token = "[SEP]"
        self.pad_token_id = 0
        self.vocab = {
            "[CLS]": 101,
            "[SEP]": 102,
            "def": 1,
            "function": 2,
            "return": 3,
            "x": 4,
            "y": 5,
        }
    
    def tokenize(self, text):
        words = text.split()
        tokens = []
        for word in words:
            if word in self.vocab:
                tokens.append(word)
            else:
                tokens.append(word[:10])
        return tokens[:20]
    
    def convert_tokens_to_ids(self, tokens):
        ids = []
        for token in tokens:
            if token in self.vocab:
                ids.append(self.vocab[token])
            else:
                ids.append(1)
        return ids

class SimpleArgs:
    def __init__(self):
        self.block_size = 16

torch.manual_seed(0)

tokenizer = SimpleTokenizer()
args = SimpleArgs()

func = "def my_function(x, y): return x + y"
cvss_labels = [7.5, 8.2, 6.1]

ARGS = {
    "func": func,
    "cvss_labels": cvss_labels,
    "tokenizer": tokenizer,
    "args": args,
}
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 InputFeatures — a InputFeatures output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a InputFeatures 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_examples_to_features Ran
ran on a synthesized input
awsm-research/aibughunter/rq1_cwe_id_cls/bert_base/bert_base_main.py
code served (permissive licence) · get_code("711cd36f3f2b2e39")
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 InputFeatures. 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

class SimpleTokenizer:
    def __init__(self):
        self.cls_token = "[CLS]"
        self.sep_token = "[SEP]"
        self.pad_token_id = 0
        self.vocab = {
            "[CLS]": 101,
            "[SEP]": 102,
            "def": 1000,
            "func": 1001,
            "return": 1002,
            "x": 1003,
        }
    
    def tokenize(self, text):
        words = text.split()
        return words[:20]
    
    def convert_tokens_to_ids(self, tokens):
        return [self.vocab.get(token, 999) for token in tokens]

class SimpleArgs:
    def __init__(self):
        self.block_size = 16

torch.manual_seed(0)

tokenizer = SimpleTokenizer()
args = SimpleArgs()
func = "def example_function(x): return x + 1"
cwe_type_label = 5

ARGS = {
    "func": func,
    "cwe_type_label": cwe_type_label,
    "tokenizer": tokenizer,
    "args": args,
}
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 InputFeatures — a InputFeatures output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a InputFeatures 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
evaluate Ran
ran on a synthesized input
awsm-research/aibughunter/rq3_cvss_score_reg/bert/bert_base_main.py
code served (permissive licence) · get_code("3131dc6682c16cc0")
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 torch.nn as nn
from torch.utils.data import Dataset

torch.manual_seed(0)

# Create a minimal model that matches the function's usage
class MinimalModel(nn.Module):
    def __init__(self):
        super().__init__()
        self.linear = nn.Linear(4, 1)
    
    def forward(self, input_ids, cvss_labels):
        # The function expects this to return a loss tensor with .item() method
        output = self.linear(input_ids.float())
        mse_loss = nn.functional.mse_loss(output, cvss_labels.float())
        return mse_loss

# Create a minimal dataset
class MinimalDataset(Dataset):
    def __init__(self, num_samples=4):
        self.num_samples = num_samples
    
    def __len__(self):
        return self.num_samples
    
    def __getitem__(self, idx):
        # Return (input_ids, cvss_labels) tuple
        input_ids = torch.randn(4)
        cvss_labels = torch.randn(1)
        return input_ids, cvss_labels

# Create a minimal args object
class Args:
    def __init__(self):
        self.eval_batch_size = 2
        self.n_gpu = 1
        self.device = 'cpu'

# Build all arguments
model = MinimalModel()
tokenizer = None  # Not used in the function
eval_dataset = MinimalDataset(num_samples=4)
args = Args()

ARGS = {
    'args': args,
    'model': model,
    'tokenizer': tokenizer,
    'eval_dataset': eval_dataset,
    'eval_when_training': False
}
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
evaluate Ran
ran on a synthesized input
awsm-research/aibughunter/rq1_cwe_id_cls/bert_base/bert_base_main.py
code served (permissive licence) · get_code("77ddbc18c8883859")
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 logging
import torch
import torch.nn as nn
from torch.utils.data import Dataset

torch.manual_seed(0)
logging.basicConfig(level=logging.INFO)

class SimpleModel(nn.Module):
    def __init__(self):
        super().__init__()
        self.linear = nn.Linear(4, 2)
    
    def forward(self, input_ids, cwe_type_labels):
        logits = self.linear(input_ids)
        loss_fn = nn.CrossEntropyLoss()
        loss = loss_fn(logits, cwe_type_labels)
        return loss

class SimpleDataset(Dataset):
    def __init__(self, size=2):
        self.size = size
    
    def __len__(self):
        return self.size
    
    def __getitem__(self, idx):
        input_ids = torch.randn(4)
        label = torch.randint(0, 2, (1,)).squeeze()
        return input_ids, label

class Args:
    def __init__(self):
        self.eval_batch_size = 2
        self.n_gpu = 1
        self.device = torch.device('cpu')

model = SimpleModel()
tokenizer = None
eval_dataset = SimpleDataset(size=4)
args = Args()

ARGS = {
    'args': args,
    'model': model,
    'tokenizer': tokenizer,
    'eval_dataset': eval_dataset,
    'eval_when_training': False
}
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

Also present in other papers' code

Of 5 samples lifted from this paper's linked repositories, 5 carry a function identity and 0 do not. Of the 5 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 5 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-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

Many ML-based approaches have been proposed to automatically detect, localize, and repair software vulnerabilities. While ML-based methods are more effective than program analysis-based vulnerability analysis tools, few have been integrated into modern IDEs, hindering practical adoption. To bridge this critical gap, we propose AIBugHunter, a novel ML-based software vulnerability analysis tool for C/C++ languages that is integrated into Visual Studio Code. AIBugHunter helps software developers to achieve real-time vulnerability detection, explanation, and repairs during programming. In particular, AIBugHunter scans through developers' source code to (1) locate vulnerabilities, (2) identify vulnerability types, (3) estimate vulnerability severity, and (4) suggest vulnerability repairs. In this article, we propose a novel multi-objective optimization (MOO)-based vulnerability classification approach and a transformer-based estimation approach to help AIBugHunter accurately identify vulnerability types and estimate severity. Our empirical experiments on a large dataset consisting of 188K+ C/C++ functions confirm that our proposed approaches are more accurate than other state-of-the-art baseline methods for vulnerability classification and estimation. Furthermore, we conduct qualitative evaluations including a survey study and a user study to obtain software practitioners' perceptions of our AIBugHunter tool and assess the impact that AIBugHunter may have on developers' productivity in security aspects. Our survey study shows that our AIBugHunter is perceived as useful where 90% of the participants consider adopting our AIBugHunter. Last but not least, our user study shows that our AIBugHunter could possibly enhance developers' productivity in combating cybersecurity issues during software development.

For agents

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

get_harvested_code_for_paper("2305.16615")
get_code_for_paper("2305.16615")
have("2305.16615")

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

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

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

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

Connect an agent — have() is free.