poojaruhal's picture
Update README.md
3d2bbff
metadata
annotations_creators:
  - expert-generated
language:
  - en
language_creators:
  - crowdsourced
license:
  - cc-by-nc-sa-4.0
multilinguality:
  - monolingual
pretty_name: |
  Code-comment-classification
size_categories:
  - 1K<n<10K
source_datasets:
  - original
tags:
  - '''source code comments'''
  - '''java class comments'''
  - '''python class comments'''
  - |-
    '
    smalltalk class comments'
task_categories:
  - text-classification
task_ids:
  - intent-classification
  - multi-label-classification

Dataset Card for Code Comment Classification

Table of Contents

Dataset Description

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" : "Absy.java",
  "comment":"* Azure Blob File System implementation of AbstractFileSystem. * This impl delegates to the old FileSystem",
  "summary":"Azure Blob File System implementation of AbstractFileSystem.",
  "expand":"This impl delegates to the old FileSystem",
  "rational":"",
  "deprecation":"",
  "usage":"",
  "exception":"",
  "todo":"",
  "incomplete":"",
  "commentedcode":"",
  "directive":"",
  "formatter":"",
  "license":"",
  "ownership":"",
  "pointer":"",
  "autogenerated":"",
  "noise":"",
  "warning":"",
  "recommendation":"",
  "precondition":"",
  "codingGuidelines":"",
  "extension":"",
  "subclassexplnation":"",
  "observation":"",
}

Data Fields

class: name of the class with the language extension.

comment: class comment of the class

categories: a category that sentence is classified to. It indicated a particular type of information.

Data Splits

10-fold cross validation

Dataset Creation

Curation Rationale

To identify the infomation embedded in the class comments across various projects and programming languages.

Source Data

Initial Data Collection and Normalization

It contains the dataset extracted from various open-source projects of three programming languages Java, Smalltalk, and Python.

  • Java

    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.

    • Eclipse.csv - Extracted class comments from the Eclipse project. The version of the project referred to extract class comments is available as Raw Dataset on Zenodo. More detail about the project is available on GitHub Eclipse.

    • Guava.csv - Extracted class comments from the Guava project. The version of the project referred to extract class comments is available as Raw Dataset on Zenodo. More detail about the project is available on GitHub Guava.

    • Guice.csv - Extracted class comments from the Guice project. The version of the project referred to extract class comments is available as Raw Dataset on Zenodo. More detail about the project is available on GitHub Guice.

    • Hadoop.csv - Extracted class comments from the Hadoop project. The version of the project referred to extract class comments is available as Raw Dataset on Zenodo. More detail about the project is available on GitHub Apache Hadoop

    • 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 on Zenodo. More detail about the project is available on GitHub Apache Spark

    • Vaadin.csv - Extracted class comments from the Vaadin project. The version of the project referred to extract class comments is available as Raw Dataset on Zenodo. More detail about the project is available on GitHub Vaadin

    • Parser_Details.md - Details of the parser used to parse class comments of Java Projects

  • Smalltalk/

        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.
    
    • GToolkit.csv - Extracted class comments from the GToolkit project. The version of the project referred to extract class comments is available as Raw Dataset on Zenodo.

    • Moose.csv - Extracted class comments from the Moose project. The version of the project referred to extract class comments is available as Raw Dataset on Zenodo.

    • PetitParser.csv - Extracted class comments from the PetitParser project. The version of the project referred to extract class comments is available as Raw Dataset on Zenodo.

    • Pillar.csv - Extracted class comments from the Pillar project. The version of the project referred to extract class comments is available as Raw Dataset on Zenodo.

    • PolyMath.csv - Extracted class comments from the PolyMath project. The version of the project referred to extract class comments is available as Raw Dataset on Zenodo.

    • Roassal2.csv -Extracted class comments from the Roassal2 project. The version of the project referred to extract class comments is available as Raw Dataset on Zenodo.

    • Seaside.csv - Extracted class comments from the Seaside project. The version of the project referred to extract class comments is available as Raw Dataset on Zenodo.

    • Parser_Details.md - Details of the parser used to parse class comments of Pharo Projects

  • Python/

        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.
    
    • Django.csv - Extracted class comments from the Django project. The version of the project referred to extract class comments is available as Raw Dataset on Zenodo. More detail about the project is available on GitHub Django

    • IPython.csv - Extracted class comments from the Ipython project. The version of the project referred to extract class comments is available as Raw Dataset on Zenodo. More detail about the project is available on GitHubIPython

    • Mailpile.csv - Extracted class comments from the Mailpile project. The version of the project referred to extract class comments is available as Raw Dataset on Zenodo. More detail about the project is available on GitHub Mailpile

    • Pandas.csv - Extracted class comments from the Pandas project. The version of the project referred to extract class comments is available as Raw Dataset on Zenodo. More detail about the project is available on GitHub pandas

    • Pipenv.csv - Extracted class comments from the Pipenv project. The version of the project referred to extract class comments is available as Raw Dataset on Zenodo. More detail about the project is available on GitHub Pipenv

    • Pytorch.csv - Extracted class comments from the Pytorch project. The version of the project referred to extract class comments is available as Raw Dataset on Zenodo. More detail about the project is available on GitHub PyTorch

    • Requests.csv - Extracted class comments from the Requests project. The version of the project referred to extract class comments is available as Raw Dataset on Zenodo. More detail about the project is available on GitHub Requests

    • Parser_Details.md - Details of the parser used to parse class comments of Python Projects

Annotations

Annotation process

Four 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. We 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. The details are given in the paper Rani et al., JSS, 2021

Who are the annotators?

Rani et al., JSS, 2021

Personal and Sensitive Information

Author information embedded in the text

Additional Information

Dataset Curators

[Pooja Rani, Ivan, Manuel]

Licensing Information

[license: cc-by-nc-sa-4.0]

Citation Information

@article{RANI2021111047,
title = {How to identify class comment types? A multi-language approach for class comment classification},
journal = {Journal of Systems and Software},
volume = {181},
pages = {111047},
year = {2021},
issn = {0164-1212},
doi = {https://doi.org/10.1016/j.jss.2021.111047},
url = {https://www.sciencedirect.com/science/article/pii/S0164121221001448},
author = {Pooja Rani and Sebastiano Panichella and Manuel Leuenberger and Andrea {Di Sorbo} and Oscar Nierstrasz},
keywords = {Natural language processing technique, Code comment analysis, Software documentation}
}