poojaruhal/Code-comment-classification
Dataset Card for Code Comment Classification Dataset Summary The dataset contains class comments extracted from various big and diverse open-source projects of three programming languages Java, Smalltalk, and Python. Supported Tasks and Leaderboards Single-label text classification and Multi-label text classification Languages Java, Python, Smalltalk Dataset Structure Data Instances { "class" :… See the full description on the dataset page: https://huggingface.co/datasets/poojaruhal/Code-comment-classification.
233
1---2annotations_creators:3- expert-generated4language:5- en6language_creators:7- crowdsourced8license:9- cc-by-nc-sa-4.010multilinguality:11- monolingual12pretty_name: 'Code-comment-classification13 14 '15size_categories:16- 1K<n<10K17source_datasets:18- original19tags:20- '''source code comments'''21- '''java class comments'''22- '''python class comments'''23- '''24 25 smalltalk class comments'''26task_categories:27- text-classification28task_ids:29- intent-classification30- multi-label-classification31---32 33# Dataset Card for Code Comment Classification34 35## Table of Contents36- [Table of Contents](#table-of-contents)37- [Dataset Description](#dataset-description)38 - [Dataset Summary](#dataset-summary)39 - [Supported Tasks and Leaderboards](#supported-tasks-and-leaderboards)40 - [Languages](#languages)41- [Dataset Structure](#dataset-structure)42 - [Data Instances](#data-instances)43 - [Data Fields](#data-fields)44 - [Data Splits](#data-splits)45- [Dataset Creation](#dataset-creation)46 - [Curation Rationale](#curation-rationale)47 - [Source Data](#source-data)48 - [Annotations](#annotations)49 - [Personal and Sensitive Information](#personal-and-sensitive-information)50- [Additional Information](#additional-information)51 - [Dataset Curators](#dataset-curators)52 - [Licensing Information](#licensing-information)53 - [Citation Information](#citation-information)54 55## Dataset Description56 57- **Homepage:** https://github.com/poojaruhal/RP-class-comment-classification58- **Repository:** https://github.com/poojaruhal/RP-class-comment-classification59- **Paper:** https://doi.org/10.1016/j.jss.2021.11104760- **Point of Contact:** https://poojaruhal.github.io61 62### Dataset Summary63The dataset contains class comments extracted from various big and diverse open-source projects of three programming languages Java, Smalltalk, and Python.64 65 66### Supported Tasks and Leaderboards67 68Single-label text classification and Multi-label text classification69 70### Languages71 72Java, Python, Smalltalk73 74## Dataset Structure75 76### Data Instances77```json78{79 "class" : "Absy.java",80 "comment":"* Azure Blob File System implementation of AbstractFileSystem. * This impl delegates to the old FileSystem",81 "summary":"Azure Blob File System implementation of AbstractFileSystem.",82 "expand":"This impl delegates to the old FileSystem",83 "rational":"",84 "deprecation":"",85 "usage":"",86 "exception":"",87 "todo":"",88 "incomplete":"",89 "commentedcode":"",90 "directive":"",91 "formatter":"",92 "license":"",93 "ownership":"",94 "pointer":"",95 "autogenerated":"",96 "noise":"",97 "warning":"",98 "recommendation":"",99 "precondition":"",100 "codingGuidelines":"",101 "extension":"",102 "subclassexplnation":"",103 "observation":"",104}105```106 107### Data Fields108 109class: name of the class with the language extension.110 111comment: class comment of the class112 113categories: a category that sentence is classified to. It indicated a particular type of information. 114 115### Data Splits116 11710-fold cross validation118 119## Dataset Creation120 121### Curation Rationale122 123To identify the infomation embedded in the class comments across various projects and programming languages.124 125### Source Data126 127#### Initial Data Collection and Normalization128 129It contains the dataset extracted from various open-source projects of three programming languages Java, Smalltalk, and Python.130- #### Java 131 Each file contains all the extracted class comments from one project. We have a total of six java projects. We chose a sample of 350 comments from all these files for our experiment.132 - [Eclipse.csv](https://github.com/poojaruhal/RP-class-comment-classification/tree/main/Dataset/RQ1/Java/) - Extracted class comments from the Eclipse project. The version of the project referred to extract class comments is available as [Raw Dataset](https://doi.org/10.5281/zenodo.4311839) on Zenodo. More detail about the project is available on GitHub [Eclipse](https://github.com/eclipse).133 134 - [Guava.csv](https://github.com/poojaruhal/RP-class-comment-classification/tree/main/Dataset/RQ1/Java/Guava.csv) - Extracted class comments from the Guava project. The version of the project referred to extract class comments is available as [Raw Dataset](https://doi.org/10.5281/zenodo.4311839) on Zenodo. More detail about the project is available on GitHub [Guava](https://github.com/google/guava).135 136 - [Guice.csv](/https://github.com/poojaruhal/RP-class-comment-classification/tree/main/Dataset/RQ1/Java/Guice.csv) - Extracted class comments from the Guice project. The version of the project referred to extract class comments is available as [Raw Dataset](https://doi.org/10.5281/zenodo.4311839) on Zenodo. More detail about the project is available on GitHub [Guice](https://github.com/google/guice).137 138 - [Hadoop.csv](https://github.com/poojaruhal/RP-class-comment-classification/tree/main/Dataset/RQ1/Java/Hadoop.csv) - Extracted class comments from the Hadoop project. The version of the project referred to extract class comments is available as [Raw Dataset](https://doi.org/10.5281/zenodo.4311839) on Zenodo. More detail about the project is available on GitHub [Apache Hadoop](https://github.com/apache/hadoop)139 140 - [Spark.csv](https://github.com/poojaruhal/RP-class-comment-classification/tree/main/Dataset/RQ1/Java/Spark.csv) - Extracted class comments from the Apache Spark project. The version of the project referred to extract class comments is available as [Raw Dataset](https://doi.org/10.5281/zenodo.4311839) on Zenodo. More detail about the project is available on GitHub [Apache Spark](https://github.com/apache/spark)141 142 - [Vaadin.csv](https://github.com/poojaruhal/RP-class-comment-classification/tree/main/Dataset/RQ1/Java/Vaadin.csv) - Extracted class comments from the Vaadin project. The version of the project referred to extract class comments is available as [Raw Dataset](https://doi.org/10.5281/zenodo.4311839) on Zenodo. More detail about the project is available on GitHub [Vaadin](https://github.com/vaadin/framework)143 144 - [Parser_Details.md](https://github.com/poojaruhal/RP-class-comment-classification/tree/main/Dataset/RQ1/Java/Parser_Details.md) - Details of the parser used to parse class comments of Java [ Projects](https://doi.org/10.5281/zenodo.4311839)145 146- #### Smalltalk/147 Each file contains all the extracted class comments from one project. We have a total of seven Pharo projects. We chose a sample of 350 comments from all these files for our experiment.148 - [GToolkit.csv](https://github.com/poojaruhal/RP-class-comment-classification/tree/main/Dataset/RQ1/Pharo/GToolkit.csv) - Extracted class comments from the GToolkit project. The version of the project referred to extract class comments is available as [Raw Dataset](https://doi.org/10.5281/zenodo.4311839) on Zenodo. 149 150 - [Moose.csv](https://github.com/poojaruhal/RP-class-comment-classification/tree/main/Dataset/RQ1/Pharo/Moose.csv) - Extracted class comments from the Moose project. The version of the project referred to extract class comments is available as [Raw Dataset](https://doi.org/10.5281/zenodo.4311839) on Zenodo. 151 152 - [PetitParser.csv](https://github.com/poojaruhal/RP-class-comment-classification/tree/main/Dataset/RQ1/Pharo/PetitParser.csv) - Extracted class comments from the PetitParser project. The version of the project referred to extract class comments is available as [Raw Dataset](https://doi.org/10.5281/zenodo.4311839) on Zenodo.153 154 - [Pillar.csv](https://github.com/poojaruhal/RP-class-comment-classification/tree/main/Dataset/RQ1/Pharo/Pillar.csv) - Extracted class comments from the Pillar project. The version of the project referred to extract class comments is available as [Raw Dataset](https://doi.org/10.5281/zenodo.4311839) on Zenodo.155 156 - [PolyMath.csv](https://github.com/poojaruhal/RP-class-comment-classification/tree/main/Dataset/RQ1/Pharo/PolyMath.csv) - Extracted class comments from the PolyMath project. The version of the project referred to extract class comments is available as [Raw Dataset](https://doi.org/10.5281/zenodo.4311839) on Zenodo.157 158 - [Roassal2.csv](https://github.com/poojaruhal/RP-class-comment-classification/tree/main/Dataset/RQ1/Pharo/Roassal2.csv) -Extracted class comments from the Roassal2 project. The version of the project referred to extract class comments is available as [Raw Dataset](https://doi.org/10.5281/zenodo.4311839) on Zenodo.159 160 - [Seaside.csv](https://github.com/poojaruhal/RP-class-comment-classification/tree/main/Dataset/RQ1/Pharo/Seaside.csv) - Extracted class comments from the Seaside project. The version of the project referred to extract class comments is available as [Raw Dataset](https://doi.org/10.5281/zenodo.4311839) on Zenodo.161 162 - [Parser_Details.md](https://github.com/poojaruhal/RP-class-comment-classification/tree/main/Dataset/RQ1/Pharo/Parser_Details.md) - Details of the parser used to parse class comments of Pharo [ Projects](https://doi.org/10.5281/zenodo.4311839)163 164- #### Python/165 Each file contains all the extracted class comments from one project. We have a total of seven Python projects. We chose a sample of 350 comments from all these files for our experiment.166 - [Django.csv](https://github.com/poojaruhal/RP-class-comment-classification/tree/main/Dataset/RQ1/Python/Django.csv) - Extracted class comments from the Django project. The version of the project referred to extract class comments is available as [Raw Dataset](https://doi.org/10.5281/zenodo.4311839) on Zenodo. More detail about the project is available on GitHub [Django](https://github.com/django)167 168 - [IPython.csv](https://github.com/poojaruhal/RP-class-comment-classification/tree/main/Dataset/RQ1/Python/IPython.csv) - Extracted class comments from the Ipython project. The version of the project referred to extract class comments is available as [Raw Dataset](https://doi.org/10.5281/zenodo.4311839) on Zenodo. More detail about the project is available on GitHub[IPython](https://github.com/ipython/ipython)169 170 - [Mailpile.csv](https://github.com/poojaruhal/RP-class-comment-classification/tree/main/Dataset/RQ1/Python/Mailpile.csv) - Extracted class comments from the Mailpile project. The version of the project referred to extract class comments is available as [Raw Dataset](https://doi.org/10.5281/zenodo.4311839) on Zenodo. More detail about the project is available on GitHub [Mailpile](https://github.com/mailpile/Mailpile)171 172 - [Pandas.csv](https://github.com/poojaruhal/RP-class-comment-classification/tree/main/Dataset/RQ1/Python/Pandas.csv) - Extracted class comments from the Pandas project. The version of the project referred to extract class comments is available as [Raw Dataset](https://doi.org/10.5281/zenodo.4311839) on Zenodo. More detail about the project is available on GitHub [pandas](https://github.com/pandas-dev/pandas)173 174 - [Pipenv.csv](https://github.com/poojaruhal/RP-class-comment-classification/tree/main/Dataset/RQ1/Python/Pipenv.csv) - Extracted class comments from the Pipenv project. The version of the project referred to extract class comments is available as [Raw Dataset](https://doi.org/10.5281/zenodo.4311839) on Zenodo. More detail about the project is available on GitHub [Pipenv](https://github.com/pypa/pipenv)175 176 - [Pytorch.csv](https://github.com/poojaruhal/RP-class-comment-classification/tree/main/Dataset/RQ1/Python/Pytorch.csv) - Extracted class comments from the Pytorch project. The version of the project referred to extract class comments is available as [Raw Dataset](https://doi.org/10.5281/zenodo.4311839) on Zenodo. More detail about the project is available on GitHub [PyTorch](https://github.com/pytorch/pytorch)177 178 - [Requests.csv](https://github.com/poojaruhal/RP-class-comment-classification/tree/main/Dataset/RQ1/Python/Requests.csv) - Extracted class comments from the Requests project. The version of the project referred to extract class comments is available as [Raw Dataset](https://doi.org/10.5281/zenodo.4311839) on Zenodo. More detail about the project is available on GitHub [Requests](https://github.com/psf/requests/)179 180 - [Parser_Details.md](https://github.com/poojaruhal/RP-class-comment-classification/tree/main/Dataset/RQ1/Python/Parser_Details.md) - Details of the parser used to parse class comments of Python [ Projects](https://doi.org/10.5281/zenodo.4311839)181 182 183### Annotations184 185#### Annotation process186Four evaluators (all authors of this paper (https://doi.org/10.1016/j.jss.2021.111047)), each having at least four years of programming experience, participated in the annonation process.187We partitioned Java, Python, and Smalltalk comments equally among all evaluators based on the distribution of the language's dataset to ensure the inclusion of comments from all projects and diversified lengths. Each classification is reviewed by three evaluators. 188The details are given in the paper [Rani et al., JSS, 2021](https://doi.org/10.1016/j.jss.2021.111047)189 190#### Who are the annotators?191 192[Rani et al., JSS, 2021](https://doi.org/10.1016/j.jss.2021.111047)193 194### Personal and Sensitive Information195 196Author information embedded in the text197 198## Additional Information199 200### Dataset Curators201 202[Pooja Rani, Ivan, Manuel]203 204### Licensing Information205 206[license: cc-by-nc-sa-4.0]207 208### Citation Information209 210```211@article{RANI2021111047,212title = {How to identify class comment types? A multi-language approach for class comment classification},213journal = {Journal of Systems and Software},214volume = {181},215pages = {111047},216year = {2021},217issn = {0164-1212},218doi = {https://doi.org/10.1016/j.jss.2021.111047},219url = {https://www.sciencedirect.com/science/article/pii/S0164121221001448},220author = {Pooja Rani and Sebastiano Panichella and Manuel Leuenberger and Andrea {Di Sorbo} and Oscar Nierstrasz},221keywords = {Natural language processing technique, Code comment analysis, Software documentation}222}223```224 225 226 227 228 229 