Skip to main content
ConductScienceScienceDex
zenodoopen

Code and Comments Dataset

<p>The code and comment data are a compilation of code blocks and their related comments. Doxygen successfully ran on 106,304 different GitHub projects. A total of 16,115,540 code-comment pairs were obtained by running Doxygen on C, C++, Java, and Python projects. The source code in these pairs can be of various granularities: classes, methods, functions, and variables. These data provide an association between source code and a description of that code. The data directory contains one directory for each project downloaded from GitHub. These project directories are named with the GraphQL ID from GitHub&#39;s GraphQL API. In each of these GraphQL-ID labeled directories, there is a license.txt, a url.txt, and a derivatives directory. The license.txt contains the license for the original project, the url.txt contains a link to the original project on GitHub, and the derivatives directory contains the output of running Doxygen on the project. The Doxygen output is a json file, structured as a dictionary with a &quot;contents&quot; field, where the value of that field is a list of lists containing 3 elements each. The following is a mock example of that structure: {&quot;contents&quot;: [[path1, snippet1, comment1], [path2, snippet2, comment2], ...]}. The &quot;path&quot; is a filepath relative to the original project from which the code and comment were obtained. The &quot;snippet&quot; is the actual body of the source code. The &quot;comment&quot; is the corresponding comment. For convenience, there is also an initialize.py python script that iterates through all of the json files in the data directory and stores them in an SQLite database called &quot;all_data.db&quot;.</p>

ShareScore

24/100

Overall dataset sharing score

Score breakdown

These five areas show where the dataset supports — or may limit — practical reuse.

Stewardship
4
Harmonization
4
Access
16
Reuse readiness
0
Engagement
0

Dataset details

Repository
zenodo
Published
October 2, 2019
License
cc-zero
DOI
10.5281/zenodo.3472032

Scored with release 0.9.0

ScienceDex for faculty

Your academic CV and NIH biosketch

Make your CV in your school's format and your NIH biosketch from it, then download both as Word files.