|
|
--- |
|
|
license: cc-by-4.0 |
|
|
tags: |
|
|
- code |
|
|
--- |
|
|
# AutoStub Training Dataset |
|
|
|
|
|
This dataset contains input-output pairs used for training the AutoStub system, which automatically generates symbolic stubs for external functions during symbolic execution. |
|
|
|
|
|
## Dataset Description |
|
|
|
|
|
The dataset consists of input-output pairs from Java standard libraries, focusing on primitive types and string operations. It was generated using a stratified sampling approach to ensure diverse inputs across different data types. |
|
|
|
|
|
### Dataset Structure |
|
|
|
|
|
The dataset is organized as a single CSV file with the following columns: |
|
|
|
|
|
- `method_name`: The name of the Java method |
|
|
- `sample_id`: Unique identifier for each sample (method_name + sample index) |
|
|
- `input`: Input values provided to the method (as string representation) |
|
|
- `input_types`: Types of input parameters |
|
|
- `output`: Output value returned by the method |
|
|
- `output_type`: Return type of the method |
|
|
|
|
|
### Method Coverage |
|
|
|
|
|
The dataset covers methods from the following Java classes: |
|
|
- `java.lang.Boolean` |
|
|
- `java.lang.Double` |
|
|
- `java.lang.Float` |
|
|
- `java.lang.String` |
|
|
- `java.lang.Byte` |
|
|
- `java.lang.Short` |
|
|
- `java.lang.Character` |
|
|
- `java.lang.Integer` |
|
|
- `java.lang.Long` |
|
|
- `java.lang.Math` |
|
|
- `java.lang.StrictMath` |
|
|
|
|
|
### Dataset Creation |
|
|
|
|
|
The dataset was created by: |
|
|
1. Identifying suitable methods in Java standard libraries |
|
|
2. Using reflection to dynamically invoke methods with random inputs |
|
|
3. Collecting input-output pairs for each method |
|
|
4. Applying stratified sampling to ensure diverse inputs |
|
|
|
|
|
## Usage |
|
|
|
|
|
### Loading the Dataset |
|
|
|
|
|
```python |
|
|
from datasets import load_dataset |
|
|
|
|
|
# Load the dataset |
|
|
dataset = load_dataset("Felix6326727/AutoStub") |
|
|
|
|
|
# Loop through the dataset and print the first 5 samples |
|
|
for i, sample in enumerate(dataset["train"]): |
|
|
if i >= 5: |
|
|
break |
|
|
|
|
|
print(f"Sample {i}:") |
|
|
print(f"Method Name: {sample['method_name']}") |
|
|
print(f"Input: {sample['input']}") |
|
|
print(f"Input Types: {sample['input_types']}") |
|
|
print(f"Output: {sample['output']}") |
|
|
print(f"Output Type: {sample['output_type']}") |
|
|
print() |
|
|
``` |
|
|
|
|
|
### Applications |
|
|
|
|
|
This dataset can be used to: |
|
|
- Train machine learning models to approximate Java method behavior |
|
|
- Evaluate the accuracy of symbolic stubs for symbolic execution |
|
|
- Study the behavior of Java standard library methods across diverse inputs |
|
|
|
|
|
## Citation |
|
|
|
|
|
If you use this dataset, please cite: |
|
|
|
|
|
```bibtex |
|
|
@inproceedings{maechtle2025autostub, |
|
|
title={AutoStub: Genetic Programming-Based Stub Creation for Symbolic Execution}, |
|
|
author={Felix M{"a}chtle, Nils Loose, Jan-Niclas Serr, Jonas Sander, Thomas Eisenbarth}, |
|
|
booktitle={Proceedings of the 18th ACM/IEEE International Workshop on Search-Based and Fuzz Testing, SBFT 2025}, |
|
|
year={2025} |
|
|
} |
|
|
``` |
|
|
|
|
|
## Source |
|
|
|
|
|
This dataset is derived from the [AutoStub](https://github.com/UzL-ITS/AutoStub) project. |