ºÝºÝߣ

ºÝºÝߣShare a Scribd company logo
A Decade of Comment Quality Assessment:
A Systematic Literature Review
Pooja Rani, Arianna Blasi, Natallia Stulova, Sebastiano
Panichella, Alessandra Gorla, Oscar Nierstrasz
Journal First
University of Zurich, Switzerland
ESEM 2023
2
How software developers spend their time?
Xia, X., Bao, L., Lo, D., Xing, Z., Hassan, A. E., & Li, S. (2017). Measuring program comprehension:
A large-scale
fi
eld study with professionals. IEEE Transactions on Software Engineering.
Comprehension
58%
Navigation
24%
Others
13%
Edition
5%
3
Comprehension
58%
Navigation
24%
Others
13%
Edition
5%
Code comments
/**
* A class representing a window on the screen.
*
* For example:
* <pre>
* Window win = new Window(parent);
* win.show();
* </pre>
*
* @author Sami Shaio
* @version 1.13, 06/08/06
* @see java.awt.BaseWindow
* @see java.awt.Button
*/
class Window extends BaseWindow {
¡­
}
4
/**
* A class representing a window on the screen.
*
* For example:
* <pre>
* Window win = new Window(parent);
* win.show();
* </pre>
*
* @author Sami Shaio
* @version 1.13, 06/08/06
* @see java.awt.BaseWindow
* @see java.awt.Button
*/
class Window extends BaseWindow {
¡­
}
Code comments
5
/**
* A class representing a window on the screen.
*
* For example:
* <pre>
* Window win = new Window(parent);
* win.show();
* </pre>
*
* @author Sami Shaio
* @version 1.13, 06/08/06
* @see java.awt.BaseWindow
* @see java.awt.Button
*/
class Window extends BaseWindow {
¡­
}
Code comments
6
/**
* A class representing a window on the screen.
*
* For example:
* <pre>
* Window win = new Window(parent);
* win.show();
* </pre>
*
* @author Sami Shaio
* @version 1.13, 06/08/06
* @see java.awt.BaseWindow
* @see java.awt.Button
*/
class Window extends BaseWindow {
¡­
}
Code comments
Trustworthy form of documentation
- McMillan et al. 2010
7
High-quality comments support developers in various activities
/**
* A class representing a window on the screen.
*
* For example:
* <pre>
* Window win = new Window(parent);
* win.show();
* </pre>
*
* @author Sami Shaio
* @version 1.13, 06/08/06
* @see java.awt.BaseWindow
* @see java.awt.Button
*/
class Window extends BaseWindow {
¡­
}
Code comments
Trustworthy form of documentation
- McMillan et al. 2010
- Dekel et al. 2009
8
/**
* A class representing a window on the screen.
*
* For example:
* <pre>
* Window win = new Window(parent);
* win.show();
* </pre>
*
* @author Sami Shaio
* @version 1.13, 06/08/06
* @see java.awt.BaseWindow
* @see java.awt.Button
*/
class Window extends BaseWindow {
¡­
}
Is this a high-
quality comment?
correct?
consistent?
enough?
Other quality attributes?
Code comments
9
Gillies et al. 2011
Quality is a multi-dimensional concept
10
How do researchers measure comment quality?
Systematic literature review
10 years timeline (2011-2020)
195 software engineering venues
332 proceedings
2353 candidate papers
47 relevant papers
11
How do researchers measure comment quality?
12
21 quality attributes
Quality attributes
13
Consistency
Completeness
Accuracy
Readability
Up-to-date-ness
Content relevance
Maintainability
Spelling and grammar
Quality attributes
Quality attributes
23
12
21 quality attributes
14
Some are frequently considered
Consistency
Completeness
Accuracy
Readability
Up-to-date-ness
Content relevance
Maintainability
Spelling and grammar
Quality attributes
Quality attributes
15
Some are rarely considered
Consistency
Completeness
Accuracy
Readability
Up-to-date-ness
Content relevance
Maintainability
Spelling and grammar
Conciseness
Usability
Correctness
Traceability
Accessibility
Coherence
Format
Information organization
Understandability
Documentation technoogy
Internatioalization
Author-related
Quality attributes
Quality attributes
16
Techniques Consistency
Completeness
Accuracy
Readability
Up-to-date-ness
Content relevance
Maintainability
Spelling and grammar
Conciseness
Usability
Correctness
Traceability
Accessibility
Coherence
Format
Information organization
Understandability
Documentation technoogy
Internatioalization
Author-related
Quality attributes
17
Techniques
Manual assessment
Consistency
ML-based
Heuristic-based
Completeness
Accuracy
Metric-based
Static analysis
NLP
Readability
Up-to-date-ness
Content relevance
DNN-based
Maintainability
Spelling and grammar
Conciseness
First order logic
Usability
Correctness
Traceability
Accessibility
Coherence
Format
Information organization
Understandability
Empirically
fNIRS
Documentation technoogy
Internatioalization
Author-related
Techniques
Quality attributes
18
Techniques
Manual assessment
Consistency
ML-based
Heuristic-based
Completeness
Accuracy
Metric-based
Static analysis
NLP
Readability
Up-to-date-ness
Content relevance
DNN-based
Maintainability
Spelling and grammar
Conciseness
First order logic
Usability
Correctness
Traceability
Accessibility
Coherence
Format
Information organization
Understandability
Empirically
fNIRS
Documentation technoogy
Internatioalization
Author-related
Techniques
Quality attributes
Manual assessment
Consistency
ML-based
Heuristic-based
Completeness
Accuracy
Metric-based
Static analysis
NLP
Readability
Up-to-date-ness
Content relevance
DNN-based
Maintainability
Spelling and grammar
Conciseness
First order logic
Usability
Correctness
Traceability
Accessibility
Coherence
Format
Information organization
Understandability
Empirically
fNIRS
Documentation technoogy
Internatioalization
Author-related
Techniques
Quality attributes
19
Techniques
Manual assessment is still the most
frequent technique to measure
quality attributes
Manual assessment
Consistency
ML-based
Heuristic-based
Completeness
Accuracy
Metric-based
Static analysis
NLP
Readability
Up-to-date-ness
Content relevance
DNN-based
Maintainability
Spelling and grammar
Conciseness
First order logic
Usability
Correctness
Traceability
Accessibility
Coherence
Format
Information organization
Understandability
Empirically
fNIRS
Documentation technoogy
Internatioalization
Author-related
Techniques
Quality attributes
20
Techniques
Deep learning-based techniques have
not been extensively explored for
comment analysis
Manual assessment
Consistency
ML-based
Heuristic-based
Completeness
Accuracy
Metric-based
Static analysis
NLP
Readability
Up-to-date-ness
Content relevance
DNN-based
Maintainability
Spelling and grammar
Conciseness
First order logic
Usability
Correctness
Traceability
Accessibility
Coherence
Format
Information organization
Understandability
Empirically
fNIRS
Documentation technoogy
Internatioalization
Author-related
Techniques
Quality attributes
21
Which of these quality attributes are
important to which developers?
Do code reviewers care more for accurate
comments than complete comments? When?
How to automatically measure these
quality attributes?
Can LLMs help writing better comments?
22
Is comments worth the efforts?
23
/**
* A class representing a window on the screen.
*
* For example:
* <pre>
* Window win = new Window(parent);
* win.show();
* </pre>
*
* @author Sami Shaio
* @version 1.13, 06/08/06
* @see java.awt.BaseWindow
* @see java.awt.Button
*/
class Window extends BaseWindow {
¡­
}
Task Design Implementation Maintenance
Summary
Usage
Pointer
Information Quality attributes
Accessibility
Readability
Author-related
Completeness
Consistency
Correctness
Audience User Developer
Future work
24
Replication: https://
zenodo.org/record/
4729054
Paper
pooja-rani-01985b68/
A Decade of Comment Quality Assessment: A Systematic Literature Review
More Curious?
/**
* A class representing a window on the screen.
*
* For example:
* <pre>
* Window win = new Window(parent);
* win.show();
* </pre>
*
* @author Sami Shaio
* @version 1.13, 06/08/06
* @see java.awt.BaseWindow
*/
class Window extends BaseWindow{
..
}
class OneHotCategorical(Distribution):
r"""
Creates a one-hot categorical distribution parameterized by :attr:`probs` or
:attr:`logits`.
Samples are one-hot coded vectors of size ``probs.size(-1)``.
.. note:: The `probs` argument must be non-negative, finite and have a non-zero sum,
and it will be normalized to sum to 1 along the last dimension. :attr:`probs`
will return this normalized value.
The `logits` argument will be interpreted as unnormalized log probabilities
and can therefore be any real number. It will likewise be normalized so that
the resulting probabilities sum to 1 along the last dimension. :attr:`logits`
will return this normalized value.
See also: :func:`torch.distributions.Categorical` for specifications of
:attr:`probs` and :attr:`logits`.
Example::
>>> m = OneHotCategorical(torch.tensor([ 0.25, 0.25, 0.25, 0.25 ]))
>>> m.sample() # equal probability of 0, 1, 2, 3
tensor([ 0., 0., 0., 1.])
Args:
probs (Tensor): event probabilities
logits (Tensor): event log probabilities (unnormalized)
"""
Smalltalk class comment
26
Comments of multi-languages
27
Methodology
1 2 3
4
6
5
28
1 2 3
4
6
5
Methodology
29
7
6
8 9
10
1 2 3
4 5
Methodology
11
47 papers
47 papers over years
30
0
2
4
6
8
10
2011 2012 2013 2014 2015 2016 2017 2018 2019 2020
#
Papers
31
consistency, completeness
Quality attributes
Techniques
Comment types
method comments, inline comments
heuristic-based, machine learning-based
Dimensions analyzed
Data availability
tool, dataset
32
/**
* A class representing a window on the screen.
*
* For example:
* <pre>
* Window win = new Window(parent);
* win.show();
* </pre>
*
* @author Sami Shaio
* @version 1.13, 06/08/06
* @see java.awt.BaseWindow
* @see java.awt.Button
*/
class Window extends BaseWindow {
¡­
}
Code comment metrics
Consistency:
Overlap between the terms used
in comment and code. Higher
value of CIC with higher
readability of that code.
Readability:
Flesch reading-ease test
33
Nearly 50% of the studies still lack in the replicability
dimension, as their respective dataset or tool is often
not publicly accessible.
Data availability
34
48%
19%
8%
4%
4%
2%
2%
6%
6%
2%
6%
4%
2%
4%
4%
2%
2%
8%
4%
2%
2%
Code comments
Method comments
API documentation
License comments
Inline comments
TODO Comments
Software documentation
Deprecation Comments
0% 20% 40% 60% 80%
Java
Python
C++
C
C#
Other
Comment types
35
48%
19%
8%
4%
4%
2%
2%
6%
6%
2%
6%
4%
2%
4%
4%
2%
2%
8%
4%
2%
2%
Code comments
Method comments
API documentation
License comments
Inline comments
TODO Comments
Software documentation
Deprecation Comments
0% 20% 40% 60% 80%
Java
Python
C++
C
C#
Other
52% of the studies
Comment types
36
48%
19%
8%
4%
4%
2%
2%
6%
6%
2%
6%
4%
2%
4%
4%
2%
2%
8%
4%
2%
2%
Code comments
Method comments
API documentation
License comments
Inline comments
TODO Comments
Software documentation
Deprecation Comments
0% 20% 40% 60% 80%
Java
Python
C++
C
C#
Other
48% of the studies
Comment types
37
Comment types
48%
19%
8%
4%
4%
2%
2%
6%
6%
2%
6%
4%
2%
4%
4%
2%
2%
8%
4%
2%
2%
Code comments
Method comments
API documentation
License comments
Inline comments
TODO Comments
Software documentation
Deprecation Comments
0% 20% 40% 60% 80%
Java
Python
C++
C
C#
Other
% of studies

More Related Content

Similar to A Decade of Comment Quality Assessment: A Systematic Literature Review (20)

CIS 406 Focus Dreams/newtonhelp.com
CIS 406 Focus Dreams/newtonhelp.comCIS 406 Focus Dreams/newtonhelp.com
CIS 406 Focus Dreams/newtonhelp.com
bellflower87
?
CIS 406 Imagine Your Future/newtonhelp.com? ?
CIS 406 Imagine Your Future/newtonhelp.com? ?CIS 406 Imagine Your Future/newtonhelp.com? ?
CIS 406 Imagine Your Future/newtonhelp.com? ?
bellflower47
?
CIS 406 Life of the Mind/newtonhelp.com? ?
CIS 406 Life of the Mind/newtonhelp.com? ?CIS 406 Life of the Mind/newtonhelp.com? ?
CIS 406 Life of the Mind/newtonhelp.com? ?
bellflower5
?
Cis 406 Extraordinary Success/newtonhelp.com
Cis 406 Extraordinary Success/newtonhelp.com  Cis 406 Extraordinary Success/newtonhelp.com
Cis 406 Extraordinary Success/newtonhelp.com
amaranthbeg148
?
Innovation Generation - The Mobile Meetup: Android Best Practices
Innovation Generation - The Mobile Meetup: Android Best PracticesInnovation Generation - The Mobile Meetup: Android Best Practices
Innovation Generation - The Mobile Meetup: Android Best Practices
Solstice Mobile Argentina
?
JavaScript Miller Columns
JavaScript Miller ColumnsJavaScript Miller Columns
JavaScript Miller Columns
Jonathan Fine
?
Introduction to Behavior Driven Development
Introduction to Behavior Driven Development Introduction to Behavior Driven Development
Introduction to Behavior Driven Development
Robin O'Brien
?
CIS 406 Entire Course NEW
CIS 406 Entire Course NEWCIS 406 Entire Course NEW
CIS 406 Entire Course NEW
shyamuopfive
?
Ensuring code quality
Ensuring code qualityEnsuring code quality
Ensuring code quality
MikhailVladimirov
?
HKG15-411: Browser Testing Framework for LHG
HKG15-411: Browser Testing Framework for LHGHKG15-411: Browser Testing Framework for LHG
HKG15-411: Browser Testing Framework for LHG
Linaro
?
We continue checking Microsoft projects: analysis of PowerShell
We continue checking Microsoft projects: analysis of PowerShellWe continue checking Microsoft projects: analysis of PowerShell
We continue checking Microsoft projects: analysis of PowerShell
PVS-Studio
?
Framework engineering JCO 2011
Framework engineering JCO 2011Framework engineering JCO 2011
Framework engineering JCO 2011
YoungSu Son
?
Full_Stack_Dule_1.NNNNNNNNNNNNNNNNNNNNNNNNNNNNNN[1].pptx
Full_Stack_Dule_1.NNNNNNNNNNNNNNNNNNNNNNNNNNNNNN[1].pptxFull_Stack_Dule_1.NNNNNNNNNNNNNNNNNNNNNNNNNNNNNN[1].pptx
Full_Stack_Dule_1.NNNNNNNNNNNNNNNNNNNNNNNNNNNNNN[1].pptx
KalyanGV2
?
Strayer cis 406 week 6 assignment 1 financial portfolio new
Strayer cis 406 week 6 assignment 1 financial portfolio newStrayer cis 406 week 6 assignment 1 financial portfolio new
Strayer cis 406 week 6 assignment 1 financial portfolio new
dixonbakerr
?
Comparing static analysis in Visual Studio 2012 (Visual C++ 2012) and PVS-Studio
Comparing static analysis in Visual Studio 2012 (Visual C++ 2012) and PVS-StudioComparing static analysis in Visual Studio 2012 (Visual C++ 2012) and PVS-Studio
Comparing static analysis in Visual Studio 2012 (Visual C++ 2012) and PVS-Studio
PVS-Studio
?
Chapter 2.1
Chapter 2.1Chapter 2.1
Chapter 2.1
sotlsoc
?
Strayer cis 406 week 6 assignment 1 financial portfolio new
Strayer cis 406 week 6 assignment 1 financial portfolio newStrayer cis 406 week 6 assignment 1 financial portfolio new
Strayer cis 406 week 6 assignment 1 financial portfolio new
lroselyn
?
Strayer cis 406 week 6 assignment 1 financial portfolio new
Strayer cis 406 week 6 assignment 1 financial portfolio newStrayer cis 406 week 6 assignment 1 financial portfolio new
Strayer cis 406 week 6 assignment 1 financial portfolio new
uopassignment
?
MSR Asia Summit
MSR Asia SummitMSR Asia Summit
MSR Asia Summit
Ptidej Team
?
Measuring Your Code
Measuring Your CodeMeasuring Your Code
Measuring Your Code
Nate Abele
?
CIS 406 Focus Dreams/newtonhelp.com
CIS 406 Focus Dreams/newtonhelp.comCIS 406 Focus Dreams/newtonhelp.com
CIS 406 Focus Dreams/newtonhelp.com
bellflower87
?
CIS 406 Imagine Your Future/newtonhelp.com? ?
CIS 406 Imagine Your Future/newtonhelp.com? ?CIS 406 Imagine Your Future/newtonhelp.com? ?
CIS 406 Imagine Your Future/newtonhelp.com? ?
bellflower47
?
CIS 406 Life of the Mind/newtonhelp.com? ?
CIS 406 Life of the Mind/newtonhelp.com? ?CIS 406 Life of the Mind/newtonhelp.com? ?
CIS 406 Life of the Mind/newtonhelp.com? ?
bellflower5
?
Cis 406 Extraordinary Success/newtonhelp.com
Cis 406 Extraordinary Success/newtonhelp.com  Cis 406 Extraordinary Success/newtonhelp.com
Cis 406 Extraordinary Success/newtonhelp.com
amaranthbeg148
?
Innovation Generation - The Mobile Meetup: Android Best Practices
Innovation Generation - The Mobile Meetup: Android Best PracticesInnovation Generation - The Mobile Meetup: Android Best Practices
Innovation Generation - The Mobile Meetup: Android Best Practices
Solstice Mobile Argentina
?
JavaScript Miller Columns
JavaScript Miller ColumnsJavaScript Miller Columns
JavaScript Miller Columns
Jonathan Fine
?
Introduction to Behavior Driven Development
Introduction to Behavior Driven Development Introduction to Behavior Driven Development
Introduction to Behavior Driven Development
Robin O'Brien
?
CIS 406 Entire Course NEW
CIS 406 Entire Course NEWCIS 406 Entire Course NEW
CIS 406 Entire Course NEW
shyamuopfive
?
HKG15-411: Browser Testing Framework for LHG
HKG15-411: Browser Testing Framework for LHGHKG15-411: Browser Testing Framework for LHG
HKG15-411: Browser Testing Framework for LHG
Linaro
?
We continue checking Microsoft projects: analysis of PowerShell
We continue checking Microsoft projects: analysis of PowerShellWe continue checking Microsoft projects: analysis of PowerShell
We continue checking Microsoft projects: analysis of PowerShell
PVS-Studio
?
Framework engineering JCO 2011
Framework engineering JCO 2011Framework engineering JCO 2011
Framework engineering JCO 2011
YoungSu Son
?
Full_Stack_Dule_1.NNNNNNNNNNNNNNNNNNNNNNNNNNNNNN[1].pptx
Full_Stack_Dule_1.NNNNNNNNNNNNNNNNNNNNNNNNNNNNNN[1].pptxFull_Stack_Dule_1.NNNNNNNNNNNNNNNNNNNNNNNNNNNNNN[1].pptx
Full_Stack_Dule_1.NNNNNNNNNNNNNNNNNNNNNNNNNNNNNN[1].pptx
KalyanGV2
?
Strayer cis 406 week 6 assignment 1 financial portfolio new
Strayer cis 406 week 6 assignment 1 financial portfolio newStrayer cis 406 week 6 assignment 1 financial portfolio new
Strayer cis 406 week 6 assignment 1 financial portfolio new
dixonbakerr
?
Comparing static analysis in Visual Studio 2012 (Visual C++ 2012) and PVS-Studio
Comparing static analysis in Visual Studio 2012 (Visual C++ 2012) and PVS-StudioComparing static analysis in Visual Studio 2012 (Visual C++ 2012) and PVS-Studio
Comparing static analysis in Visual Studio 2012 (Visual C++ 2012) and PVS-Studio
PVS-Studio
?
Chapter 2.1
Chapter 2.1Chapter 2.1
Chapter 2.1
sotlsoc
?
Strayer cis 406 week 6 assignment 1 financial portfolio new
Strayer cis 406 week 6 assignment 1 financial portfolio newStrayer cis 406 week 6 assignment 1 financial portfolio new
Strayer cis 406 week 6 assignment 1 financial portfolio new
lroselyn
?
Strayer cis 406 week 6 assignment 1 financial portfolio new
Strayer cis 406 week 6 assignment 1 financial portfolio newStrayer cis 406 week 6 assignment 1 financial portfolio new
Strayer cis 406 week 6 assignment 1 financial portfolio new
uopassignment
?
Measuring Your Code
Measuring Your CodeMeasuring Your Code
Measuring Your Code
Nate Abele
?

More from Pooja Rani (7)

Energy Patterns for Web: An Exploratory Study
Energy Patterns for Web: An Exploratory StudyEnergy Patterns for Web: An Exploratory Study
Energy Patterns for Web: An Exploratory Study
Pooja Rani
?
Can We Automatically Generate Class Comments in Pharo?
Can We Automatically Generate Class Comments in Pharo?Can We Automatically Generate Class Comments in Pharo?
Can We Automatically Generate Class Comments in Pharo?
Pooja Rani
?
What do class comments tell us?An investigation of comment evolution and prac...
What do class comments tell us?An investigation of comment evolution and prac...What do class comments tell us?An investigation of comment evolution and prac...
What do class comments tell us?An investigation of comment evolution and prac...
Pooja Rani
?
What Do Developers Discuss about Code Comments?
What Do Developers Discuss about Code Comments?What Do Developers Discuss about Code Comments?
What Do Developers Discuss about Code Comments?
Pooja Rani
?
Let linguistics guide software analysis
Let linguistics guide software analysisLet linguistics guide software analysis
Let linguistics guide software analysis
Pooja Rani
?
Comment soup with a pinch of types
Comment soup with a pinch of typesComment soup with a pinch of types
Comment soup with a pinch of types
Pooja Rani
?
Software Analysis using Natural Language Queries
Software Analysis using Natural Language QueriesSoftware Analysis using Natural Language Queries
Software Analysis using Natural Language Queries
Pooja Rani
?
Energy Patterns for Web: An Exploratory Study
Energy Patterns for Web: An Exploratory StudyEnergy Patterns for Web: An Exploratory Study
Energy Patterns for Web: An Exploratory Study
Pooja Rani
?
Can We Automatically Generate Class Comments in Pharo?
Can We Automatically Generate Class Comments in Pharo?Can We Automatically Generate Class Comments in Pharo?
Can We Automatically Generate Class Comments in Pharo?
Pooja Rani
?
What do class comments tell us?An investigation of comment evolution and prac...
What do class comments tell us?An investigation of comment evolution and prac...What do class comments tell us?An investigation of comment evolution and prac...
What do class comments tell us?An investigation of comment evolution and prac...
Pooja Rani
?
What Do Developers Discuss about Code Comments?
What Do Developers Discuss about Code Comments?What Do Developers Discuss about Code Comments?
What Do Developers Discuss about Code Comments?
Pooja Rani
?
Let linguistics guide software analysis
Let linguistics guide software analysisLet linguistics guide software analysis
Let linguistics guide software analysis
Pooja Rani
?
Comment soup with a pinch of types
Comment soup with a pinch of typesComment soup with a pinch of types
Comment soup with a pinch of types
Pooja Rani
?
Software Analysis using Natural Language Queries
Software Analysis using Natural Language QueriesSoftware Analysis using Natural Language Queries
Software Analysis using Natural Language Queries
Pooja Rani
?

Recently uploaded (20)

DAO UTokyo 2025 DLT mass adoption case studies IBM Tsuyoshi Hirayama (ƽɽÒã)
DAO UTokyo 2025 DLT mass adoption case studies IBM Tsuyoshi Hirayama (ƽɽÒã)DAO UTokyo 2025 DLT mass adoption case studies IBM Tsuyoshi Hirayama (ƽɽÒã)
DAO UTokyo 2025 DLT mass adoption case studies IBM Tsuyoshi Hirayama (ƽɽÒã)
Tsuyoshi Hirayama
?
FinTech - US Annual Funding Report - 2024.pptx
FinTech - US Annual Funding Report - 2024.pptxFinTech - US Annual Funding Report - 2024.pptx
FinTech - US Annual Funding Report - 2024.pptx
Tracxn
?
Endpoint Backup: 3 Reasons MSPs Ignore It
Endpoint Backup: 3 Reasons MSPs Ignore ItEndpoint Backup: 3 Reasons MSPs Ignore It
Endpoint Backup: 3 Reasons MSPs Ignore It
MSP360
?
MIND Revenue Release Quarter 4 2024 - Finacial Presentation
MIND Revenue Release Quarter 4 2024 - Finacial PresentationMIND Revenue Release Quarter 4 2024 - Finacial Presentation
MIND Revenue Release Quarter 4 2024 - Finacial Presentation
MIND CTI
?
Wondershare Filmora Crack 14.3.2.11147 Latest
Wondershare Filmora Crack 14.3.2.11147 LatestWondershare Filmora Crack 14.3.2.11147 Latest
Wondershare Filmora Crack 14.3.2.11147 Latest
udkg888
?
DealBook of Ukraine: 2025 edition | AVentures Capital
DealBook of Ukraine: 2025 edition | AVentures CapitalDealBook of Ukraine: 2025 edition | AVentures Capital
DealBook of Ukraine: 2025 edition | AVentures Capital
Yevgen Sysoyev
?
Gojek Clone Multi-Service Super App.pptx
Gojek Clone Multi-Service Super App.pptxGojek Clone Multi-Service Super App.pptx
Gojek Clone Multi-Service Super App.pptx
V3cube
?
UiPath Document Understanding - Generative AI and Active learning capabilities
UiPath Document Understanding - Generative AI and Active learning capabilitiesUiPath Document Understanding - Generative AI and Active learning capabilities
UiPath Document Understanding - Generative AI and Active learning capabilities
DianaGray10
?
Replacing RocksDB with ScyllaDB in Kafka Streams by Almog Gavra
Replacing RocksDB with ScyllaDB in Kafka Streams by Almog GavraReplacing RocksDB with ScyllaDB in Kafka Streams by Almog Gavra
Replacing RocksDB with ScyllaDB in Kafka Streams by Almog Gavra
ScyllaDB
?
Field Device Management Market Report 2030 - TechSci Research
Field Device Management Market Report 2030 - TechSci ResearchField Device Management Market Report 2030 - TechSci Research
Field Device Management Market Report 2030 - TechSci Research
Vipin Mishra
?
L01 Introduction to Nanoindentation - What is hardness
L01 Introduction to Nanoindentation - What is hardnessL01 Introduction to Nanoindentation - What is hardness
L01 Introduction to Nanoindentation - What is hardness
RostislavDaniel
?
EaseUS Partition Master Crack 2025 + Serial Key
EaseUS Partition Master Crack 2025 + Serial KeyEaseUS Partition Master Crack 2025 + Serial Key
EaseUS Partition Master Crack 2025 + Serial Key
kherorpacca127
?
What Makes "Deep Research"? A Dive into AI Agents
What Makes "Deep Research"? A Dive into AI AgentsWhat Makes "Deep Research"? A Dive into AI Agents
What Makes "Deep Research"? A Dive into AI Agents
Zilliz
?
Early Adopter's Guide to AI Moderation (Preview)
Early Adopter's Guide to AI Moderation (Preview)Early Adopter's Guide to AI Moderation (Preview)
Early Adopter's Guide to AI Moderation (Preview)
nick896721
?
30B Images and Counting: Scaling Canva's Content-Understanding Pipelines by K...
30B Images and Counting: Scaling Canva's Content-Understanding Pipelines by K...30B Images and Counting: Scaling Canva's Content-Understanding Pipelines by K...
30B Images and Counting: Scaling Canva's Content-Understanding Pipelines by K...
ScyllaDB
?
Q4 2024 Earnings and Investor Presentation
Q4 2024 Earnings and Investor PresentationQ4 2024 Earnings and Investor Presentation
Q4 2024 Earnings and Investor Presentation
Dropbox
?
1.1. Evolution-and-Scope-of-Business-Analytics.pptx
1.1. Evolution-and-Scope-of-Business-Analytics.pptx1.1. Evolution-and-Scope-of-Business-Analytics.pptx
1.1. Evolution-and-Scope-of-Business-Analytics.pptx
Jitendra Tomar
?
The Future of Repair: Transparent and Incremental by Botond De?nes
The Future of Repair: Transparent and Incremental by Botond De?nesThe Future of Repair: Transparent and Incremental by Botond De?nes
The Future of Repair: Transparent and Incremental by Botond De?nes
ScyllaDB
?
How Discord Indexes Trillions of Messages: Scaling Search Infrastructure by V...
How Discord Indexes Trillions of Messages: Scaling Search Infrastructure by V...How Discord Indexes Trillions of Messages: Scaling Search Infrastructure by V...
How Discord Indexes Trillions of Messages: Scaling Search Infrastructure by V...
ScyllaDB
?
World Information Architecture Day 2025 - UX at a Crossroads
World Information Architecture Day 2025 - UX at a CrossroadsWorld Information Architecture Day 2025 - UX at a Crossroads
World Information Architecture Day 2025 - UX at a Crossroads
Joshua Randall
?
DAO UTokyo 2025 DLT mass adoption case studies IBM Tsuyoshi Hirayama (ƽɽÒã)
DAO UTokyo 2025 DLT mass adoption case studies IBM Tsuyoshi Hirayama (ƽɽÒã)DAO UTokyo 2025 DLT mass adoption case studies IBM Tsuyoshi Hirayama (ƽɽÒã)
DAO UTokyo 2025 DLT mass adoption case studies IBM Tsuyoshi Hirayama (ƽɽÒã)
Tsuyoshi Hirayama
?
FinTech - US Annual Funding Report - 2024.pptx
FinTech - US Annual Funding Report - 2024.pptxFinTech - US Annual Funding Report - 2024.pptx
FinTech - US Annual Funding Report - 2024.pptx
Tracxn
?
Endpoint Backup: 3 Reasons MSPs Ignore It
Endpoint Backup: 3 Reasons MSPs Ignore ItEndpoint Backup: 3 Reasons MSPs Ignore It
Endpoint Backup: 3 Reasons MSPs Ignore It
MSP360
?
MIND Revenue Release Quarter 4 2024 - Finacial Presentation
MIND Revenue Release Quarter 4 2024 - Finacial PresentationMIND Revenue Release Quarter 4 2024 - Finacial Presentation
MIND Revenue Release Quarter 4 2024 - Finacial Presentation
MIND CTI
?
Wondershare Filmora Crack 14.3.2.11147 Latest
Wondershare Filmora Crack 14.3.2.11147 LatestWondershare Filmora Crack 14.3.2.11147 Latest
Wondershare Filmora Crack 14.3.2.11147 Latest
udkg888
?
DealBook of Ukraine: 2025 edition | AVentures Capital
DealBook of Ukraine: 2025 edition | AVentures CapitalDealBook of Ukraine: 2025 edition | AVentures Capital
DealBook of Ukraine: 2025 edition | AVentures Capital
Yevgen Sysoyev
?
Gojek Clone Multi-Service Super App.pptx
Gojek Clone Multi-Service Super App.pptxGojek Clone Multi-Service Super App.pptx
Gojek Clone Multi-Service Super App.pptx
V3cube
?
UiPath Document Understanding - Generative AI and Active learning capabilities
UiPath Document Understanding - Generative AI and Active learning capabilitiesUiPath Document Understanding - Generative AI and Active learning capabilities
UiPath Document Understanding - Generative AI and Active learning capabilities
DianaGray10
?
Replacing RocksDB with ScyllaDB in Kafka Streams by Almog Gavra
Replacing RocksDB with ScyllaDB in Kafka Streams by Almog GavraReplacing RocksDB with ScyllaDB in Kafka Streams by Almog Gavra
Replacing RocksDB with ScyllaDB in Kafka Streams by Almog Gavra
ScyllaDB
?
Field Device Management Market Report 2030 - TechSci Research
Field Device Management Market Report 2030 - TechSci ResearchField Device Management Market Report 2030 - TechSci Research
Field Device Management Market Report 2030 - TechSci Research
Vipin Mishra
?
L01 Introduction to Nanoindentation - What is hardness
L01 Introduction to Nanoindentation - What is hardnessL01 Introduction to Nanoindentation - What is hardness
L01 Introduction to Nanoindentation - What is hardness
RostislavDaniel
?
EaseUS Partition Master Crack 2025 + Serial Key
EaseUS Partition Master Crack 2025 + Serial KeyEaseUS Partition Master Crack 2025 + Serial Key
EaseUS Partition Master Crack 2025 + Serial Key
kherorpacca127
?
What Makes "Deep Research"? A Dive into AI Agents
What Makes "Deep Research"? A Dive into AI AgentsWhat Makes "Deep Research"? A Dive into AI Agents
What Makes "Deep Research"? A Dive into AI Agents
Zilliz
?
Early Adopter's Guide to AI Moderation (Preview)
Early Adopter's Guide to AI Moderation (Preview)Early Adopter's Guide to AI Moderation (Preview)
Early Adopter's Guide to AI Moderation (Preview)
nick896721
?
30B Images and Counting: Scaling Canva's Content-Understanding Pipelines by K...
30B Images and Counting: Scaling Canva's Content-Understanding Pipelines by K...30B Images and Counting: Scaling Canva's Content-Understanding Pipelines by K...
30B Images and Counting: Scaling Canva's Content-Understanding Pipelines by K...
ScyllaDB
?
Q4 2024 Earnings and Investor Presentation
Q4 2024 Earnings and Investor PresentationQ4 2024 Earnings and Investor Presentation
Q4 2024 Earnings and Investor Presentation
Dropbox
?
1.1. Evolution-and-Scope-of-Business-Analytics.pptx
1.1. Evolution-and-Scope-of-Business-Analytics.pptx1.1. Evolution-and-Scope-of-Business-Analytics.pptx
1.1. Evolution-and-Scope-of-Business-Analytics.pptx
Jitendra Tomar
?
The Future of Repair: Transparent and Incremental by Botond De?nes
The Future of Repair: Transparent and Incremental by Botond De?nesThe Future of Repair: Transparent and Incremental by Botond De?nes
The Future of Repair: Transparent and Incremental by Botond De?nes
ScyllaDB
?
How Discord Indexes Trillions of Messages: Scaling Search Infrastructure by V...
How Discord Indexes Trillions of Messages: Scaling Search Infrastructure by V...How Discord Indexes Trillions of Messages: Scaling Search Infrastructure by V...
How Discord Indexes Trillions of Messages: Scaling Search Infrastructure by V...
ScyllaDB
?
World Information Architecture Day 2025 - UX at a Crossroads
World Information Architecture Day 2025 - UX at a CrossroadsWorld Information Architecture Day 2025 - UX at a Crossroads
World Information Architecture Day 2025 - UX at a Crossroads
Joshua Randall
?

A Decade of Comment Quality Assessment: A Systematic Literature Review

  • 1. A Decade of Comment Quality Assessment: A Systematic Literature Review Pooja Rani, Arianna Blasi, Natallia Stulova, Sebastiano Panichella, Alessandra Gorla, Oscar Nierstrasz Journal First University of Zurich, Switzerland ESEM 2023
  • 2. 2 How software developers spend their time? Xia, X., Bao, L., Lo, D., Xing, Z., Hassan, A. E., & Li, S. (2017). Measuring program comprehension: A large-scale fi eld study with professionals. IEEE Transactions on Software Engineering. Comprehension 58% Navigation 24% Others 13% Edition 5%
  • 3. 3 Comprehension 58% Navigation 24% Others 13% Edition 5% Code comments /** * A class representing a window on the screen. * * For example: * <pre> * Window win = new Window(parent); * win.show(); * </pre> * * @author Sami Shaio * @version 1.13, 06/08/06 * @see java.awt.BaseWindow * @see java.awt.Button */ class Window extends BaseWindow { ¡­ }
  • 4. 4 /** * A class representing a window on the screen. * * For example: * <pre> * Window win = new Window(parent); * win.show(); * </pre> * * @author Sami Shaio * @version 1.13, 06/08/06 * @see java.awt.BaseWindow * @see java.awt.Button */ class Window extends BaseWindow { ¡­ } Code comments
  • 5. 5 /** * A class representing a window on the screen. * * For example: * <pre> * Window win = new Window(parent); * win.show(); * </pre> * * @author Sami Shaio * @version 1.13, 06/08/06 * @see java.awt.BaseWindow * @see java.awt.Button */ class Window extends BaseWindow { ¡­ } Code comments
  • 6. 6 /** * A class representing a window on the screen. * * For example: * <pre> * Window win = new Window(parent); * win.show(); * </pre> * * @author Sami Shaio * @version 1.13, 06/08/06 * @see java.awt.BaseWindow * @see java.awt.Button */ class Window extends BaseWindow { ¡­ } Code comments Trustworthy form of documentation - McMillan et al. 2010
  • 7. 7 High-quality comments support developers in various activities /** * A class representing a window on the screen. * * For example: * <pre> * Window win = new Window(parent); * win.show(); * </pre> * * @author Sami Shaio * @version 1.13, 06/08/06 * @see java.awt.BaseWindow * @see java.awt.Button */ class Window extends BaseWindow { ¡­ } Code comments Trustworthy form of documentation - McMillan et al. 2010 - Dekel et al. 2009
  • 8. 8 /** * A class representing a window on the screen. * * For example: * <pre> * Window win = new Window(parent); * win.show(); * </pre> * * @author Sami Shaio * @version 1.13, 06/08/06 * @see java.awt.BaseWindow * @see java.awt.Button */ class Window extends BaseWindow { ¡­ } Is this a high- quality comment? correct? consistent? enough? Other quality attributes? Code comments
  • 9. 9 Gillies et al. 2011 Quality is a multi-dimensional concept
  • 10. 10 How do researchers measure comment quality?
  • 11. Systematic literature review 10 years timeline (2011-2020) 195 software engineering venues 332 proceedings 2353 candidate papers 47 relevant papers 11 How do researchers measure comment quality?
  • 13. 13 Consistency Completeness Accuracy Readability Up-to-date-ness Content relevance Maintainability Spelling and grammar Quality attributes Quality attributes 23 12 21 quality attributes
  • 14. 14 Some are frequently considered Consistency Completeness Accuracy Readability Up-to-date-ness Content relevance Maintainability Spelling and grammar Quality attributes Quality attributes
  • 15. 15 Some are rarely considered Consistency Completeness Accuracy Readability Up-to-date-ness Content relevance Maintainability Spelling and grammar Conciseness Usability Correctness Traceability Accessibility Coherence Format Information organization Understandability Documentation technoogy Internatioalization Author-related Quality attributes Quality attributes
  • 16. 16 Techniques Consistency Completeness Accuracy Readability Up-to-date-ness Content relevance Maintainability Spelling and grammar Conciseness Usability Correctness Traceability Accessibility Coherence Format Information organization Understandability Documentation technoogy Internatioalization Author-related Quality attributes
  • 17. 17 Techniques Manual assessment Consistency ML-based Heuristic-based Completeness Accuracy Metric-based Static analysis NLP Readability Up-to-date-ness Content relevance DNN-based Maintainability Spelling and grammar Conciseness First order logic Usability Correctness Traceability Accessibility Coherence Format Information organization Understandability Empirically fNIRS Documentation technoogy Internatioalization Author-related Techniques Quality attributes
  • 18. 18 Techniques Manual assessment Consistency ML-based Heuristic-based Completeness Accuracy Metric-based Static analysis NLP Readability Up-to-date-ness Content relevance DNN-based Maintainability Spelling and grammar Conciseness First order logic Usability Correctness Traceability Accessibility Coherence Format Information organization Understandability Empirically fNIRS Documentation technoogy Internatioalization Author-related Techniques Quality attributes
  • 19. Manual assessment Consistency ML-based Heuristic-based Completeness Accuracy Metric-based Static analysis NLP Readability Up-to-date-ness Content relevance DNN-based Maintainability Spelling and grammar Conciseness First order logic Usability Correctness Traceability Accessibility Coherence Format Information organization Understandability Empirically fNIRS Documentation technoogy Internatioalization Author-related Techniques Quality attributes 19 Techniques Manual assessment is still the most frequent technique to measure quality attributes
  • 20. Manual assessment Consistency ML-based Heuristic-based Completeness Accuracy Metric-based Static analysis NLP Readability Up-to-date-ness Content relevance DNN-based Maintainability Spelling and grammar Conciseness First order logic Usability Correctness Traceability Accessibility Coherence Format Information organization Understandability Empirically fNIRS Documentation technoogy Internatioalization Author-related Techniques Quality attributes 20 Techniques Deep learning-based techniques have not been extensively explored for comment analysis
  • 21. Manual assessment Consistency ML-based Heuristic-based Completeness Accuracy Metric-based Static analysis NLP Readability Up-to-date-ness Content relevance DNN-based Maintainability Spelling and grammar Conciseness First order logic Usability Correctness Traceability Accessibility Coherence Format Information organization Understandability Empirically fNIRS Documentation technoogy Internatioalization Author-related Techniques Quality attributes 21 Which of these quality attributes are important to which developers? Do code reviewers care more for accurate comments than complete comments? When? How to automatically measure these quality attributes? Can LLMs help writing better comments?
  • 22. 22 Is comments worth the efforts?
  • 23. 23 /** * A class representing a window on the screen. * * For example: * <pre> * Window win = new Window(parent); * win.show(); * </pre> * * @author Sami Shaio * @version 1.13, 06/08/06 * @see java.awt.BaseWindow * @see java.awt.Button */ class Window extends BaseWindow { ¡­ } Task Design Implementation Maintenance Summary Usage Pointer Information Quality attributes Accessibility Readability Author-related Completeness Consistency Correctness Audience User Developer Future work
  • 24. 24 Replication: https:// zenodo.org/record/ 4729054 Paper pooja-rani-01985b68/ A Decade of Comment Quality Assessment: A Systematic Literature Review
  • 26. /** * A class representing a window on the screen. * * For example: * <pre> * Window win = new Window(parent); * win.show(); * </pre> * * @author Sami Shaio * @version 1.13, 06/08/06 * @see java.awt.BaseWindow */ class Window extends BaseWindow{ .. } class OneHotCategorical(Distribution): r""" Creates a one-hot categorical distribution parameterized by :attr:`probs` or :attr:`logits`. Samples are one-hot coded vectors of size ``probs.size(-1)``. .. note:: The `probs` argument must be non-negative, finite and have a non-zero sum, and it will be normalized to sum to 1 along the last dimension. :attr:`probs` will return this normalized value. The `logits` argument will be interpreted as unnormalized log probabilities and can therefore be any real number. It will likewise be normalized so that the resulting probabilities sum to 1 along the last dimension. :attr:`logits` will return this normalized value. See also: :func:`torch.distributions.Categorical` for specifications of :attr:`probs` and :attr:`logits`. Example:: >>> m = OneHotCategorical(torch.tensor([ 0.25, 0.25, 0.25, 0.25 ])) >>> m.sample() # equal probability of 0, 1, 2, 3 tensor([ 0., 0., 0., 1.]) Args: probs (Tensor): event probabilities logits (Tensor): event log probabilities (unnormalized) """ Smalltalk class comment 26 Comments of multi-languages
  • 29. 29 7 6 8 9 10 1 2 3 4 5 Methodology 11 47 papers
  • 30. 47 papers over years 30 0 2 4 6 8 10 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 # Papers
  • 31. 31 consistency, completeness Quality attributes Techniques Comment types method comments, inline comments heuristic-based, machine learning-based Dimensions analyzed Data availability tool, dataset
  • 32. 32 /** * A class representing a window on the screen. * * For example: * <pre> * Window win = new Window(parent); * win.show(); * </pre> * * @author Sami Shaio * @version 1.13, 06/08/06 * @see java.awt.BaseWindow * @see java.awt.Button */ class Window extends BaseWindow { ¡­ } Code comment metrics Consistency: Overlap between the terms used in comment and code. Higher value of CIC with higher readability of that code. Readability: Flesch reading-ease test
  • 33. 33 Nearly 50% of the studies still lack in the replicability dimension, as their respective dataset or tool is often not publicly accessible. Data availability
  • 34. 34 48% 19% 8% 4% 4% 2% 2% 6% 6% 2% 6% 4% 2% 4% 4% 2% 2% 8% 4% 2% 2% Code comments Method comments API documentation License comments Inline comments TODO Comments Software documentation Deprecation Comments 0% 20% 40% 60% 80% Java Python C++ C C# Other Comment types
  • 35. 35 48% 19% 8% 4% 4% 2% 2% 6% 6% 2% 6% 4% 2% 4% 4% 2% 2% 8% 4% 2% 2% Code comments Method comments API documentation License comments Inline comments TODO Comments Software documentation Deprecation Comments 0% 20% 40% 60% 80% Java Python C++ C C# Other 52% of the studies Comment types
  • 36. 36 48% 19% 8% 4% 4% 2% 2% 6% 6% 2% 6% 4% 2% 4% 4% 2% 2% 8% 4% 2% 2% Code comments Method comments API documentation License comments Inline comments TODO Comments Software documentation Deprecation Comments 0% 20% 40% 60% 80% Java Python C++ C C# Other 48% of the studies Comment types
  • 37. 37 Comment types 48% 19% 8% 4% 4% 2% 2% 6% 6% 2% 6% 4% 2% 4% 4% 2% 2% 8% 4% 2% 2% Code comments Method comments API documentation License comments Inline comments TODO Comments Software documentation Deprecation Comments 0% 20% 40% 60% 80% Java Python C++ C C# Other % of studies