|
|
--- |
|
|
dataset_info: |
|
|
features: |
|
|
- name: New-Identifiers-words-AVG |
|
|
dtype: float64 |
|
|
- name: New-Identifiers-words-MIN |
|
|
dtype: float64 |
|
|
- name: New-Abstractness-words-AVG |
|
|
dtype: float64 |
|
|
- name: New-Abstractness-words-MAX |
|
|
dtype: float64 |
|
|
- name: New-Abstractness-words-MIN |
|
|
dtype: float64 |
|
|
- name: New-Commented-words-AVG |
|
|
dtype: float64 |
|
|
- name: New-Commented-words-MAX |
|
|
dtype: float64 |
|
|
- name: New-Synonym-commented-words-AVG |
|
|
dtype: float64 |
|
|
- name: New-Synonym-commented-words-MAX |
|
|
dtype: float64 |
|
|
- name: New-Comments-readability |
|
|
dtype: float64 |
|
|
- name: New-Number-of-senses-AVG |
|
|
dtype: float64 |
|
|
- name: New-Number-of-senses-MAX |
|
|
dtype: float64 |
|
|
- name: [email protected] |
|
|
dtype: float64 |
|
|
- name: [email protected] |
|
|
dtype: float64 |
|
|
- name: New-Text-Coherence-AVG |
|
|
dtype: float64 |
|
|
- name: New-Text-Coherence-MIN |
|
|
dtype: float64 |
|
|
- name: New-Text-Coherence-MAX |
|
|
dtype: float64 |
|
|
- name: BW-Avg-Assignment |
|
|
dtype: float64 |
|
|
- name: BW-Avg-blank-lines |
|
|
dtype: float64 |
|
|
- name: BW-Avg-commas |
|
|
dtype: float64 |
|
|
- name: BW-Avg-comments |
|
|
dtype: float64 |
|
|
- name: BW-Avg-comparisons |
|
|
dtype: float64 |
|
|
- name: BW-Avg-Identifiers-Length |
|
|
dtype: float64 |
|
|
- name: BW-Avg-conditionals |
|
|
dtype: float64 |
|
|
- name: BW-Avg-indentation-length |
|
|
dtype: float64 |
|
|
- name: BW-Avg-keywords |
|
|
dtype: float64 |
|
|
- name: BW-Avg-line-length |
|
|
dtype: float64 |
|
|
- name: BW-Avg-loops |
|
|
dtype: float64 |
|
|
- name: BW-Avg-number-of-identifiers |
|
|
dtype: float64 |
|
|
- name: BW-Avg-numbers |
|
|
dtype: float64 |
|
|
- name: BW-Avg-operators |
|
|
dtype: float64 |
|
|
- name: BW-Avg-parenthesis |
|
|
dtype: float64 |
|
|
- name: BW-Avg-periods |
|
|
dtype: float64 |
|
|
- name: BW-Avg-spaces |
|
|
dtype: float64 |
|
|
- name: BW-Max-Identifiers-Length |
|
|
dtype: float64 |
|
|
- name: BW-Max-indentation |
|
|
dtype: float64 |
|
|
- name: BW-Max-keywords |
|
|
dtype: float64 |
|
|
- name: BW-Max-line-length |
|
|
dtype: float64 |
|
|
- name: BW-Max-number-of-identifiers |
|
|
dtype: float64 |
|
|
- name: BW-Max-numbers |
|
|
dtype: float64 |
|
|
- name: BW-Max-char |
|
|
dtype: float64 |
|
|
- name: BW-Max-words |
|
|
dtype: float64 |
|
|
- name: Posnett-entropy |
|
|
dtype: float64 |
|
|
- name: Posnett-volume |
|
|
dtype: float64 |
|
|
- name: Posnett-lines |
|
|
dtype: float64 |
|
|
- name: Dorn-DFT-Assignments |
|
|
dtype: float64 |
|
|
- name: Dorn-DFT-Commas |
|
|
dtype: float64 |
|
|
- name: Dorn-DFT-Comments |
|
|
dtype: float64 |
|
|
- name: Dorn-DFT-Comparisons |
|
|
dtype: float64 |
|
|
- name: Dorn-DFT-Conditionals |
|
|
dtype: float64 |
|
|
- name: Dorn-DFT-Indentations |
|
|
dtype: float64 |
|
|
- name: Dorn-DFT-Keywords |
|
|
dtype: float64 |
|
|
- name: Dorn-DFT-LineLengths |
|
|
dtype: float64 |
|
|
- name: Dorn-DFT-Loops |
|
|
dtype: float64 |
|
|
- name: Dorn-DFT-Identifiers |
|
|
dtype: float64 |
|
|
- name: Dorn-DFT-Numbers |
|
|
dtype: float64 |
|
|
- name: Dorn-DFT-Operators |
|
|
dtype: float64 |
|
|
- name: Dorn-DFT-Parenthesis |
|
|
dtype: float64 |
|
|
- name: Dorn-DFT-Periods |
|
|
dtype: float64 |
|
|
- name: Dorn-DFT-Spaces |
|
|
dtype: float64 |
|
|
- name: Dorn-Visual-X-Comments |
|
|
dtype: float64 |
|
|
- name: Dorn-Visual-Y-Comments |
|
|
dtype: float64 |
|
|
- name: Dorn-Visual-X-Identifiers |
|
|
dtype: float64 |
|
|
- name: Dorn-Visual-Y-Identifiers |
|
|
dtype: float64 |
|
|
- name: Dorn-Visual-X-Keywords |
|
|
dtype: float64 |
|
|
- name: Dorn-Visual-Y-Keywords |
|
|
dtype: float64 |
|
|
- name: Dorn-Visual-X-Numbers |
|
|
dtype: float64 |
|
|
- name: Dorn-Visual-Y-Numbers |
|
|
dtype: float64 |
|
|
- name: Dorn-Visual-X-Strings |
|
|
dtype: float64 |
|
|
- name: Dorn-Visual-Y-Strings |
|
|
dtype: float64 |
|
|
- name: Dorn-Visual-X-Literals |
|
|
dtype: float64 |
|
|
- name: Dorn-Visual-Y-Literals |
|
|
dtype: float64 |
|
|
- name: Dorn-Visual-X-Operators |
|
|
dtype: float64 |
|
|
- name: Dorn-Visual-Y-Operators |
|
|
dtype: float64 |
|
|
- name: Dorn-Areas-Comments |
|
|
dtype: float64 |
|
|
- name: Dorn-Areas-Identifiers |
|
|
dtype: float64 |
|
|
- name: Dorn-Areas-Keywords |
|
|
dtype: float64 |
|
|
- name: Dorn-Areas-Numbers |
|
|
dtype: float64 |
|
|
- name: Dorn-Areas-Strings |
|
|
dtype: float64 |
|
|
- name: Dorn-Areas-Literals |
|
|
dtype: float64 |
|
|
- name: Dorn-Areas-Operators |
|
|
dtype: float64 |
|
|
- name: Dorn-Areas-Identifiers/Comments |
|
|
dtype: float64 |
|
|
- name: Dorn-Areas-Keywords/Comments |
|
|
dtype: float64 |
|
|
- name: Dorn-Areas-Numbers/Comments |
|
|
dtype: float64 |
|
|
- name: Dorn-Areas-Strings/Comments |
|
|
dtype: float64 |
|
|
- name: Dorn-Areas-Literals/Comments |
|
|
dtype: float64 |
|
|
- name: Dorn-Areas-Operators/Comments |
|
|
dtype: float64 |
|
|
- name: Dorn-Areas-Keywords/Identifiers |
|
|
dtype: float64 |
|
|
- name: Dorn-Areas-Numbers/Identifiers |
|
|
dtype: float64 |
|
|
- name: Dorn-Areas-Strings/Identifiers |
|
|
dtype: float64 |
|
|
- name: Dorn-Areas-Literals/Identifiers |
|
|
dtype: float64 |
|
|
- name: Dorn-Areas-Operators/Identifiers |
|
|
dtype: float64 |
|
|
- name: Dorn-Areas-Numbers/Keywords |
|
|
dtype: float64 |
|
|
- name: Dorn-Areas-Strings/Keywords |
|
|
dtype: float64 |
|
|
- name: Dorn-Areas-Literals/Keywords |
|
|
dtype: float64 |
|
|
- name: Dorn-Areas-Operators/Keywords |
|
|
dtype: float64 |
|
|
- name: Dorn-Areas-Strings/Numbers |
|
|
dtype: float64 |
|
|
- name: Dorn-Areas-Literals/Numbers |
|
|
dtype: float64 |
|
|
- name: Dorn-Areas-Operators/Numbers |
|
|
dtype: float64 |
|
|
- name: Dorn-Areas-Literals/Strings |
|
|
dtype: float64 |
|
|
- name: Dorn-Areas-Operators/Strings |
|
|
dtype: float64 |
|
|
- name: Dorn-Areas-Operators/Literals |
|
|
dtype: float64 |
|
|
- name: Dorn-align-blocks |
|
|
dtype: float64 |
|
|
- name: Dorn-align-extent |
|
|
dtype: float64 |
|
|
- name: Readable |
|
|
dtype: binary |
|
|
- name: code_snippet |
|
|
dtype: string |
|
|
- name: language |
|
|
dtype: string |
|
|
- name: score |
|
|
list: float64 |
|
|
- name: mean_score |
|
|
dtype: float64 |
|
|
splits: |
|
|
- name: full |
|
|
num_bytes: 1279277 |
|
|
num_examples: 360 |
|
|
- name: train |
|
|
num_bytes: 1020838 |
|
|
num_examples: 288 |
|
|
- name: test |
|
|
num_bytes: 258376 |
|
|
num_examples: 72 |
|
|
download_size: 788748 |
|
|
dataset_size: 2558491 |
|
|
configs: |
|
|
- config_name: default |
|
|
data_files: |
|
|
- split: full |
|
|
path: data/full-* |
|
|
- split: train |
|
|
path: data/train-* |
|
|
- split: test |
|
|
path: data/test-* |
|
|
--- |
|
|
|
|
|
# Software Readability Dataset |
|
|
|
|
|
This repository contains the dataset used to build and evaluate the readability model presented in: |
|
|
|
|
|
> **A General Software Readability Model** |
|
|
> *Jonathan Dorn & Westley Weimer, University of Virginia* |
|
|
|
|
|
The dataset consists of human-annotated code snippets sampled from real open-source projects and labeled for perceived readability. It is the largest such dataset collected for software readability research to date. |
|
|
|
|
|
--- |
|
|
|
|
|
## ๐ฆ Dataset Summary |
|
|
|
|
|
| Property | Value | |
|
|
| --------------------- | ------------------------------------------------------------------ | |
|
|
| Total snippets | **360** | |
|
|
| Programming languages | **Java, Python, CUDA** | |
|
|
| Snippet lengths | ~10, ~30, ~50 lines | |
|
|
| Human annotations | **โ 5,468 annotators** | |
|
|
| Total ratings | **โ 76,741 readability votes** | |
|
|
| Rating scale | 1โ5 Likert (1 = very unreadable, 5 = very readable) | |
|
|
| Annotator background | students + industry (1,000+ with 5+ years professional experience) | |
|
|
| Source projects | 30 open-source repositories | |
|
|
|
|
|
The dataset was collected through an IRB-approved online survey. Each participant viewed 20 random snippets and rated their readability. Samples were drawn automatically and uniformly from repositories, without manual curation, to avoid bias. |
|
|
|
|
|
--- |
|
|
|
|
|
## ๐ง Tasks Supported |
|
|
|
|
|
This dataset supports several research directions: |
|
|
|
|
|
### ๐ฏ Core Tasks |
|
|
|
|
|
* readability prediction (regression or classification) |
|
|
* feature engineering for code comprehension |
|
|
* cross-language readability comparison |
|
|
|
|
|
|
|
|
## ๐ Languages & Projects |
|
|
|
|
|
Languages sampled: |
|
|
|
|
|
* **Java** (large, object-oriented) |
|
|
* **Python** (indentation-sensitive) |
|
|
* **CUDA** (GPU programming) |
|
|
|
|
|
Each sourced from 10 real open-source repos (30 total), including widely-used projects like: |
|
|
|
|
|
* Liferay Portal |
|
|
* SQuirreL SQL Client |
|
|
* Docutils |
|
|
* GPUMLib |
|
|
|
|
|
(see paper for full list) |
|
|
|
|
|
--- |
|
|
|
|
|
## ๐ Annotation Protocol |
|
|
|
|
|
* ratings used a 1โ5 Likert scale: |
|
|
|
|
|
* 1 โ very unreadable |
|
|
* 5 โ very readable |
|
|
* code was syntax-highlighted in survey |
|
|
* annotators could revise earlier answers |
|
|
* snippets were shown without needing to be syntactically complete |
|
|
* annotators provided experience metadata |
|
|
|
|
|
--- |
|
|
|
|
|
## ๐ค Citation |
|
|
|
|
|
If you use this dataset, please cite: |
|
|
|
|
|
``` |
|
|
@inproceedings{dorn2012readability, |
|
|
title={A general software readability model}, |
|
|
author={Dorn, Jonathan and Weimer, Westley}, |
|
|
booktitle={International Conference on Software Engineering}, |
|
|
year={2012} |
|
|
} |
|
|
``` |
|
|
|
|
|
## ๐ Acknowledgements |
|
|
|
|
|
Special thanks to the thousands of anonymous survey respondents, Udacity participants, and reddit programmers who contributed ratings. |
|
|
|
|
|
--- |
|
|
|
|
|
## Contact |
|
|
|
|
|
If you have questions or would like to extend the dataset, feel free to open an issue or discussion in the repo. |
|
|
|
|
|
--- |
|
|
|