fbnhnsl's picture
Update README.md
cfc2747 verified
metadata
task_categories:
  - text-generation
  - fill-mask
language:
  - en
tags:
  - code
pretty_name: FIM transformed Solidity constructs.
size_categories:
  - 10K<n<100K
license: mit

This dataset consists of 22,118 Solidity constructs, namely functions, mappings, structs, modifiers, errors, enums, events, imports, constructors, SPDX-License-Identifiers, using statements and contract definitions with imports and pragmas. It is splitted into 18,118 training examples, 2,000 validation examples and 2,000 test examples. The entries in the JSON-file are "file_name", "size_bytes", "code", "fim_transformed", and "secure". The entry "fim_transformed" (fill-in-the-middle transformed) is 0 for non-FIM transformed examples and 1 for FIM transformed examples. The entry "secure" is 0 for vulnerable examples, 1 for secure examples and 2 for examples for which no special security token is specified.

The dataset was created using the fbnhnsl/Preprocessed_Solidity_Dataset_V1 dataset, but three additional steps were applied:

  • "Constructs Extraction": Constructs such as functions, modifiers and enums were extracted from each file.
  • "FIM Transformation": Some of the constructs were FIM transformed (7,499 functions, 1,446 Constructors, 643 Modifiers, 2,698 Imports). The FIM ratio used was 0.4.
  • "Token Insertion": Special Tokens were inserted into each file that mark the end of a sequence (<|endoftext|>), secure code (<|secure_function|>, <|secure_constructor|>) and FIM code (<|fim_begin|>, <|fim_hole|>, <|fim_end|>)

If you wish to use this dataset, you can cite it as follows:

@misc{hensel2025fim_solidity_dataset,
  title = {FIM transformed Solidity constructs},
  author={Fabian Hensel},
  year={2025}
}