File size: 2,855 Bytes
b8e25dd
 
 
 
 
a202ec3
 
 
 
 
 
b8e25dd
a202ec3
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
b8e25dd
 
 
 
 
 
 
 
 
 
 
 
 
 
a202ec3
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
b8e25dd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
---
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.