Characterising the knowledge about primitive variables in java code comments

Primitive types are fundamental components available in any programming language, which serve as the building blocks of data manipulation. Understanding the role of these types in source code is essential to write software. Little work has been conducted on how often these variables are documented i...

Full description

Saved in:
Bibliographic Details
Main Authors: ALGHAMDI, Mahfouth, HAYASHI, Shinpei, KOBAYASHI, Takashi, TREUDE, Christoph
Format: text
Language:English
Published: Institutional Knowledge at Singapore Management University 2021
Subjects:
Online Access:https://ink.library.smu.edu.sg/sis_research/8849
https://ink.library.smu.edu.sg/context/sis_research/article/9852/viewcontent/msr21b.pdf
Tags: Add Tag
No Tags, Be the first to tag this record!
Institution: Singapore Management University
Language: English
id sg-smu-ink.sis_research-9852
record_format dspace
spelling sg-smu-ink.sis_research-98522024-06-13T09:16:49Z Characterising the knowledge about primitive variables in java code comments ALGHAMDI, Mahfouth HAYASHI, Shinpei KOBAYASHI, Takashi TREUDE, Christoph Primitive types are fundamental components available in any programming language, which serve as the building blocks of data manipulation. Understanding the role of these types in source code is essential to write software. Little work has been conducted on how often these variables are documented in code comments and what types of knowledge the comments provide about variables of primitive types. In this paper, we present an approach for detecting primitive variables and their description in comments using lexical matching and advanced matching. We evaluate our approaches by comparing the lexical and advanced matching performance in terms of recall, precision, and F-score, against 600 manually annotated variables from a sample of GitHub projects. The performance of our advanced approach based on F-score was superior compared to lexical matching, 0.986 and 0.942, respectively. We then create a taxonomy of the types of knowledge contained in these comments about variables of primitive types. Our study showed that developers usually documented the variables' identifiers of a numeric data type with their purpose (69.16%) and concept (72.75%) more than the variables' identifiers of type String which were less documented with purpose (61.14%) and concept (55.46%). Our findings characterise the current state of the practice of documenting primitive variables and point at areas that are often not well documented, such as the meaning of boolean variables or the purpose of fields and local variables. 2021-05-01T07:00:00Z text application/pdf https://ink.library.smu.edu.sg/sis_research/8849 info:doi/10.1109/MSR52588.2021.00058 https://ink.library.smu.edu.sg/context/sis_research/article/9852/viewcontent/msr21b.pdf http://creativecommons.org/licenses/by-nc-nd/4.0/ Research Collection School Of Computing and Information Systems eng Institutional Knowledge at Singapore Management University Documentation Knowledge Source code comments Variables Software Engineering
institution Singapore Management University
building SMU Libraries
continent Asia
country Singapore
Singapore
content_provider SMU Libraries
collection InK@SMU
language English
topic Documentation
Knowledge
Source code comments
Variables
Software Engineering
spellingShingle Documentation
Knowledge
Source code comments
Variables
Software Engineering
ALGHAMDI, Mahfouth
HAYASHI, Shinpei
KOBAYASHI, Takashi
TREUDE, Christoph
Characterising the knowledge about primitive variables in java code comments
description Primitive types are fundamental components available in any programming language, which serve as the building blocks of data manipulation. Understanding the role of these types in source code is essential to write software. Little work has been conducted on how often these variables are documented in code comments and what types of knowledge the comments provide about variables of primitive types. In this paper, we present an approach for detecting primitive variables and their description in comments using lexical matching and advanced matching. We evaluate our approaches by comparing the lexical and advanced matching performance in terms of recall, precision, and F-score, against 600 manually annotated variables from a sample of GitHub projects. The performance of our advanced approach based on F-score was superior compared to lexical matching, 0.986 and 0.942, respectively. We then create a taxonomy of the types of knowledge contained in these comments about variables of primitive types. Our study showed that developers usually documented the variables' identifiers of a numeric data type with their purpose (69.16%) and concept (72.75%) more than the variables' identifiers of type String which were less documented with purpose (61.14%) and concept (55.46%). Our findings characterise the current state of the practice of documenting primitive variables and point at areas that are often not well documented, such as the meaning of boolean variables or the purpose of fields and local variables.
format text
author ALGHAMDI, Mahfouth
HAYASHI, Shinpei
KOBAYASHI, Takashi
TREUDE, Christoph
author_facet ALGHAMDI, Mahfouth
HAYASHI, Shinpei
KOBAYASHI, Takashi
TREUDE, Christoph
author_sort ALGHAMDI, Mahfouth
title Characterising the knowledge about primitive variables in java code comments
title_short Characterising the knowledge about primitive variables in java code comments
title_full Characterising the knowledge about primitive variables in java code comments
title_fullStr Characterising the knowledge about primitive variables in java code comments
title_full_unstemmed Characterising the knowledge about primitive variables in java code comments
title_sort characterising the knowledge about primitive variables in java code comments
publisher Institutional Knowledge at Singapore Management University
publishDate 2021
url https://ink.library.smu.edu.sg/sis_research/8849
https://ink.library.smu.edu.sg/context/sis_research/article/9852/viewcontent/msr21b.pdf
_version_ 1814047593524625408