Synthetic C Code Mutation Dataset
Synthetic C Code Dataset for Source Code Authorship and Stylometric Analysis This dataset contains a structured collection of synthetically mutated C source code files generated from 20 C programs covering diverse algorithmic domains. The dataset was produced by an automated mutatio
Synthetic C Code Dataset for Source Code Authorship and Stylometric Analysis
This dataset contains a structured collection of synthetically mutated C source code files generated from 20 C programs covering diverse algorithmic domains.
The dataset was produced by an automated mutation pipeline developed as part of a bachelor’s thesis at the Slovak University of Technology. The pipeline transforms each original C program into 100 semantically equivalent but syntactically distinct variants by applying randomized combinations of AST-level and text-level mutations.
The goal of this dataset is to provide a reproducible corpus suitable for empirical research on:
– source code authorship identification
– programmer stylometry
– plagiarism detection and code similarity analysis
– machine learning on source code
– evaluation of code analysis tools
The 20 input programs cover the following algorithmic domains:
arduino_simulator, binary_tree, compression, crypto_utils, expression_parser, fractal_generator, graph_alg, hash_table, image_processing, linked_list, matrix, network_simulator, physics_simulation, process_scheduler, signal_processing, sorting, stack_queue, strings, terminal_graphics, text_adventure
The mutation pipeline applies combinations of the following transformations:
AST-level mutations (applied via abstract syntax tree manipulation):
– Variable renaming (var_0, var_1, …)
– Function renaming
– Commutative expression swapping
– Function definition reordering
– Dead code insertion
– Loop transformation (for <-> while)
– Conditional transformation (if <-> switch)
Text-level mutations (applied on generated source text):
– Indentation style changes
– Brace style changes
– Identifier case conversion (snake_case <-> camelCase)
– Comment stripping, preservation, or format conversion (// <-> /* */)
– Removal of braces from single-statement if bodies
Each variant is guaranteed to be syntactically valid C code (verified by GCC -fsyntax-only). Each mutation combination applied to a variant is unique within the dataset.
The dataset structure is organized as follows:
output_variants/
c_files/
id_01/ … id_100/
<program_name>.c (one file per input program per variant)
json_files/
id_01/ … id_100/
id_XX.json (mutation metadata for each variant)
Each JSON metadata file records:
– variant id
– list of mutations applied
– mutation count
The dataset contains:
– 20 original C programs
– 100 variants per program
– 2000 total generated C files
– 100 JSON metadata files
All generated files compile without errors under GCC.
The dataset is i
📤 Share this page
Found this useful? Share it with your network.
Files are hosted on the source repository. Click download to access the full dataset.