Calculating Similarity of Javadoc Comments
- 1 February 2024
- journal article
- research article
- Published by Pleiades Publishing Ltd in Programming and Computer Software
- Vol. 50 (1) , 85-89
Abstract
Code comments are an essential part of software documentation. Many software projects suffer from the problem of low-quality comments that are often produced by copy-paste. In case of similar methods, classes, etc. copy-pasted comments with minor modifications are justified. However, in many cases this approach leads to degraded documentation quality and, subsequently, to problematic maintenance and development of the project. In this study, we address the problem of near-duplicate code comments detection, which can potentially improve software documentation. We have conducted a thorough evaluation of traditional string similarity metrics and modern machine learning methods. In our experiment, we use a collection of Javadoc comments from four industrial open-source Java projects. We have found out that LCS (Longest Common Subsequence) is the best similarity algorithm taking into account both quality (Precision 94%, Recall 74%) and performance.Keywords
This publication has 20 references indexed in Scilit:
- Deep Code-Comment Understanding and AssessmentIEEE Access, 2019
- A Large-Scale Empirical Study on Code-Comment Inconsistencies2019
- Detecting fragile comments2017
- Analyzing APIs Documentation and Code to Detect Directive Defects2017
- Documentation Reuse: Hot or Not? An Empirical Study2017
- Machine Learning and Conceptual Reasoning for Inconsistency DetectionIEEE Access, 2016
- Clone Detection in Reuse of Software Technical Documentation2016
- @tComment: Testing Javadoc Comments to Detect Comment-Code Inconsistencies2012
- Code DocumentationIEEE Software, 2010
- Introduction to Information Retrieval2008