RUS  ENG
Full version
JOURNALS // Proceedings of the Institute for System Programming of the RAS // Archive

Proceedings of ISP RAS, 2023 Volume 35, Issue 4, Pages 177–186 (Mi tisp808)

Evaluation of similarity of Javadoc comments

D. V. Koznova, E. I. Ledenevab, D. V. Luciva, P. I. Braslavskiic

a Saint Petersburg State University
b Company "Yandex"
c National Research University Higher School of Economics

Abstract: Code comments are an essential part of software documentation. Many software projects suffer 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: software documentation, Javadoc comments, similarity measure

DOI: 10.15514/ISPRAS-2023-35(4)-10



© Steklov Math. Inst. of RAS, 2024