Datasets:
language:
- en
license: cc-by-4.0
size_categories:
- 10K<n<100K
task_categories:
- text-classification
pretty_name: Java Code Readability Mined & Modified
tags:
- readability
- code
- source code
- code readability
- Java
features:
- name: code_snippet
dtype: string
- name: score
dtype: float
dataset_info:
features:
- name: name
dtype: string
- name: code_snippet
dtype: string
- name: score
dtype: float64
splits:
- name: train
num_bytes: 48684700
num_examples: 69276
download_size: 21595103
dataset_size: 48684700
configs:
- config_name: default
data_files:
- split: train
path: data/train-*
Java Code Readability Merged & Modified
This dataset contains 69276 Java code snippets along with a readability score, mined from Github and automatically processed and labelled.
You can download the dataset using Hugging Face:
from datasets import load_dataset
ds = load_dataset("se2p/code-readability-krod")
The snippets are not split into train and test (and validation) set. Thus, the whole dataset is in the train set:
ds = ds['train']
ds_as_list = ds.to_list() # Convert the dataset to whatever format suits you best
The dataset is structured as follows:
{
"code_snippet": ..., # Java source code snippet
"score": ... # Readability score
"name": ... # The name of the code snippet refering to its origin
}
The main goal of this repository is to train code readability classifiers for Java source code.
Dataset Details
Dataset Description
- Curated by: Krodinger Lukas
- Shared by: Krodinger Lukas
- Language(s) (NLP): Java
- License: Unknown
Uses
The dataset can be used for training Java code readability classifiers.
Dataset Structure
Each entry of the dataset consists of a code_snippet and a score (and a name). The code_snippet (string) is the code snippet that was downloaded from GitHub. Each snippet has a readability score assigned. The score is based on a five point Likert scale, with 1 being very unreadable and 5 being very readable.
Dataset Creation
Curation Rationale
To advance code readability classification, the creation of datasets in this research field is of high importance. We provide a new dataset generated with a new approach. Previous datasets for code readability classification are mostly generated by humans manually annotating the readability of code. Those datasets are relatively small, with combined size of only 421 samples. As our approach allows automation, we can provide a different scale of code snippets. We share this dataset on Hugging Face to share access and make the ease of usage easy.
Source Data
The initial source of code snippets are from 100 public GitHub which can be found at the end of this file.
Data Collection and Processing
The Data Collection and Preprocessing for this Hugging Face dataset involved two main steps. First, GitHub repositories known for high code quality were mined and labeled as highly readable. The extracted methods are labeled with a score of 3.68. Second, the code was intentionally modified to reduce readability. The resulting code was labelled with a score of 3.26. This resulted in an automatically generated training dataset for source code readability classification.
Who are the source data producers?
The source data producers are the people that wrote the used open source Java projects.
Personal and Sensitive Information
The ratings of the code snippets are automatically assigned. Thus, no personal or sensitive information is contained in this dataset.
Bias, Risks, and Limitations
The assigned labels are not accurate as they are only an average estimate based on a survey. The average score for the mined code snippets of the survey was 3.68. The average score for the modified code snippets of the survey was 3.26.
Recommendations
The dataset should be used to train Java code readability classifiers. We recommend fine-tuning and evaluation on manually labeled data.
Dataset Card Authors
Lukas Krodinger, Chair of Software Engineering II, University of Passau.
Dataset Card Contact
Feel free to contact me via E-Mail if you have any questions or remarks.
Appendix
Origin Repositories
- Backbase/stream-services - cf2cddc9515e9fc594f1b3bb0f2c2aadc2890c99
- jcabi/jcabi-maven-plugin - d53c49094014afd97ae181d267aa209842053883
- alfasoftware/morf - 6d44a8a4d660e3a393fdeaff14059972959e9ab2
- apache/nifi-maven - 25a21a83acc9f4c25f8624aa4d0cf2dcd5a0b9f5
- codice/imaging-nitf - fcafa31b4f9663dd9efd6b9162657538a45d6ef2
- TestingResearchIllinois/starts - 487a8005b1ec24825b18a2a149216b23fda268f8
- orangesignal/orangesignal-csv - 60432ca09f2fd3884f75246d4b51eb44666e8e8f
- vesoft-inc/nebula-flink-connector - 24a751463f2db0c045a83aec2408e3301aa5b146
- jwhitbeck/java-rdb-parser - 499cbab24caef7de29cf4e654967f11ff7fde432
- tinkerpop/tinkubator - a2f6cc94fb53c0045c42f9bd1e9020e3f19e92a6
- eclipse-sirius/sirius-web - 5f4f3d1909762ff16a654d16a345dd02bc98ac51
- mohamed-taman/JavaSE8-Features - eba5360c0c9ff47895ec043c64a0d0bfaa80ba1a
- CloudSlang/cs-actions - ae3b6f210b951897935438433a7f0bbdeeb70a33
- k8ssandra/management-api-for-apache-cassandra - 9795d838e7c965c50a0a6a0d687c93db70344255
- elventear/quartz-scheduler - fad901a332a47004e367972d4c4e014c61843e85
- vmzakharov/mutate-test-kata - 5bdef12f2de49b5e8db916763a319dc2a787f42e
- apache/maven-checkstyle-plugin - 56157e4c1d8c3dc25ee69a0dd35a92007ae126a6
- ObeoNetwork/InformationSystem - 7a73de597529685318b4ebb8f3ed34f8273fc5e8
- gordonad/enterprise-spring-best-practices - 496874ee53406142abd974006313b315b64f853b
- PacktPublishing/TypeScript-Microservices - 91aa8e66696971354245c826bc5d23f885e8c27a
- apache/incubator-hugegraph-toolchain - e8fd3e0a6c10d34b4bf5e92495f493c913d7895e
- NLthijs48/AreaShop - 557d11dfb477b1bc67ca3fb2995fe97b9732f9dd
- jenkinsci/plot-plugin - 7e7504adc1f710a384af9961ea3940ab2ed11657
- Hipparchus-Math/hipparchus - f1948e10f100a5380c869c76b4f0e8f5f1004b68
- apache/tiles - 2601bcd2d8c7c5f1dde663830093c426ffff3da4
- radargun/radargun - ca4982116d0d92cccd6f947afa6424f2b51a67fc
- vzakharchenko/keycloak-radius-plugin - 986b84991db0a947c42a6928dfe21c8591dda52a
- xwiki/xwiki-commons - 2123f979e42020e0fbfd2633c7af64e4b56a89f2
- ddf-project/DDF - e4e68315dcec1ed8b287bf1ee73baa88e7e41eba
- apache/rocketmq-connect - 8dcf2b37f247e2261512df8e00df7f875d4190d0
- apache/maven-release - 9e0713b83d99723ebeb3e8347f3f69c69c585ed0
- aklivity/zilla - 94a3362b972f6d27c296b9aa69c2bb8cbbda558a
- heshanera/HealthPlus - 61bcaf20a0e1ae6c7d9f267ecdc3f9cf2b8e8b5d
- apache/xmlgraphics-fop - 2d0e0424a1e7b5c544427e9923a1efdc15be152d
- adorsys/open-banking-gateway - 81ae59db8c48b6d266eeb9a500bf4abe6a296e63
- timothymiko/narrate-android - de2ae0668ac0cc88c0fa06489709141fbf741935
- Asqatasun/Asqatasun - af9064357e881786cc7cc72e782662908bd91c5b
- javadelight/delight-nashorn-sandbox - 51bb26934b48ac0bacad8b9751393e86d6dbe31e
- aws-powertools/powertools-lambda-java - 628a2ca93223df2b2962d1bc122f32a6f572b382
- victools/jsonschema-generator - 85d1bc1db05a3dab2a22a05466f97f399dcf8ea2
- elBukkit/MagicPlugin - 1edc4fec2f4d98c5dbf25c89840899e2b52fb90f
- yegor256/qulice - cdd3fe15b49dccfa42a5bd2f6ab0cad94d7927d7
- apache/syncope - 4eb29a8ebdc506ddaaaf61eb8f159791fb34c3f2
- nmyphp/tbschedule - 65c3a671a2e76aca7db7251c438c55d7516366ba
- spring-projects-experimental/spring-boot-migrator - a3a55917094056e332c23a7762c6625352d6c04b
- kokorin/Jaffree - b503d1fb3e5ac54f6dc1f315321cb8d696818d9c
- davidmoten/geo - 54a0f51a8c457a0bb1dd4bf6758e65f66e501673
- openmessaging/benchmark - d0c0277fec37379a466e41e2917f0765901d6f9c
- opencast/opencast - 80a38af951c970be5bbd051e784e04a0770e37d9
- apache/streampipes - 34b33bdcf7afe75cbe5090517ca61b7ee0ad8555
- nielsbasjes/yauaa - e7d0d18a3cb2a7a0bfa625fe1158410d3755d8c0
- mulesoft/mule - c72aeaec2b9ca92bac4e89d03ed331c472e7214e
- awslabs/aws-saas-boost - a36032b1c99f1bc745c1433dcf3f8798b70261cb
- hazelcast/hazelcast-code-samples - e4eca08e35853d677bb993560d506c8f9fc1b8ac
- jmrozanec/cron-utils - d31697ec4c30d4f43a1b528e5781d1d00ea1c967
- xwiki/xwiki-platform - e8b78226eb0f36ea02dacdb3f14105badda5612d
- dremio/dremio-oss - be47367c523e4eded35df4e8fff725f53160558e
- hibernate/hibernate-validator - 6e73c5f45d81a74b4f51754a80c629ef5ffc42cb
- android-cn/android-open-project-demo - 2ed4800f62c1a3683a0e16ec56957619acbcc57a
- vaadin/framework - c4d78a6dad72ea2fe95b8023ef3a5ba73c135277
- apache/tika - 8a6493b49323ff9838fb6744ea6f2a1b770f3c82
- aws/aws-sdk-java-v2 - 1cae596d881f7f1da7914da92d5f2d400277829f
- confluentinc/kafka-rest - 55a50c4f76183903f14cce14245edc4fc85942a9
- apache/rocketmq-spring - 33a4186f6ab19cc3b1bd3305450476fe35141c3d
- eclipse/eclipse-collections - a7fa499844523bc79cbf0883bacf62db5d818332
- confluentinc/schema-registry - 8390e1268f08e9759ec26c55a8ba2bd299179626
- confluentinc/kafka-streams-examples - d218996f8e58693dd311c63120d018ce05892e84
- apache/activemq - 58867f7c3cef580134cb4e32e2f9086552c1876a
- spring-cloud/spring-cloud-kubernetes - ef6d06f3373abcc5ffc7c391b10fd7083b2678ab
- roboguice/roboguice - d96250c41149e13a159d26a532365c3f7034c07e
- cucumber/cucumber-jvm - 1a6c5a6052ce1354cb34731c75a29991b9d06818
- oracle/opengrok - 1f70700b151ddf9f5f852982a6bad0be2279ebab
- spring-io/initializr - 3641ed46a72997a5b727179775a0812fafd48b16
- querydsl/querydsl - cd608f04ed7534b1b62a78a28beb141071d149b6
- dromara/hmily - 52dc6ba3a44f9ade8d49bcc6ad49485ef9879c49
- jetty/jetty.project - b77a8054a2f3d883ad99df2eb9a954b0b25eb8d3
- graphhopper/graphhopper - 09c1013185bfb6388661cbcfef7cbb34ea138f57
- JodaOrg/joda-time - 1b5c2a0899c9fcf705d0892946deab00c4619a97
- apache/ignite - b7a8f021f8caf22ad51977be0323dc4085d095e3
- apache/hudi - 4c3a1db146bc5f81545f5d17020175ea9797fcd9
- hazelcast/hazelcast - ed063c769f450eb3a9aac1b0463309e4ebd643b9
- mapstruct/mapstruct - 2bb2aefed8957861bf297b8f953b40e8753a8c75
- apache/hbase - dba900f778614b392e5e83522cdda72487558f48
- NanoHttpd/nanohttpd - efb2ebf85a2b06f7c508aba9eaad5377e3a01e81
- apache/zeppelin - 56da029ffe413c55ba34f46e4e4b91b8d20d9ce2
- Alluxio/alluxio - f7eed03eaeae3bdf59407a6f7f78346df4f0bb1f
- apache/storm - c0d7b475da99c28043b137e892d58aedde4eb840
- apache/shardingsphere-elasticjob - 0b3a6eb993ee1abcb8ae81efa6ccaeb9b494ea5c
- apache/doris - 5bdfaf64479e73ac319ca95562711cb1898e2f05
- codecentric/spring-boot-admin - 4515db94c0e6398892523780778b76c156e0f08b
- Activiti/Activiti - b0fbe2b1c6ce204161f3536fc3caf1039a395471
- apache/pulsar - e1d06b5f54f08c09debab7a9a513b7c173c1779b
- apache/zookeeper - 75d0a0a850352743e584f78321cf7c51417f46f8
- apache/hadoop - d72cdf7205c9e5310e832b2faa2e5b103f0804e0
- OpenAPITools/openapi-generator - 8669646d998691b67f9c665e890349bf1c790edc
- jenkinsci/jenkins - f9f542bffd9f38189f3c1393475b473f1f0e035e
- seata/seata - 2122c6d53ae9cabcab4c53946b4a1b999e0aef76
- apache/flink - 00785b00b84dadae4c8b33a35ca9a5ac48e4a4c6
- alibaba/druid - 0be591b0c43ed57078a13dc0c7b7108b9ee0b388
- alibaba/nacos - 93cc842c903487a2df6bd8f10cbd1027c67a7891
- zxing/zxing - 9c89873cfa148e961da3b0a1f9537fd9b5356564
- jeecgboot/jeecg-boot - b3e4a73a342445f1ed1555c8f927b04a8d6b27d0
- apache/dubbo - e63d275eb61db8eaac00f7474e6e76e19ac805d0
- eugenp/tutorials - bf7bf5dacf8cff97021ab1b11020103104132d11
- iluwatar/java-design-patterns - 163c3017bb356937d876cd9a05905c012f3b0af6