CodeComClassify: Automating Code Comments Classification using BERT-Based Language ModelsShow others and affiliations
2025 (English)In: 2025 IEEE/ACM International Workshop on Natural Language-Based Software Engineering (NLBSE), Institute of Electrical and Electronics Engineers (IEEE), 2025, p. 49-53Conference paper, Published paper (Refereed)
Abstract [en]
Code comments are pivotal in enhancing code read-ability, maintainability, and team work in software development. As volume of code comments escalates in large software projects, it becomes impractical to manage and understand code comments, which prompts the need of exploring automated approaches for reliable handling of code comments. This paper introduces CodeComClassify, an automated code comments classification approach which is built on the Transformer-based pretrained model, distilbert-base-uncased model. CodeComClassify proficiently classifies code comments into 19 distinct categories across three languages: Java (7 categories), Python (5 categories), and Pharo (7 categories). The workflow involves cleaning and preprocessing datasets provided by NLBSE’24 Tool Competition, hyperparameter tuning, fine tuning pretrained Transformer model, distilbert-base-uncased, and training a custom multi-label model for each language. Multi-label models for Java, Python, and Pharo are trained and evaluated on 10,555, 2,555 and 1,765 class-level code comments, respectively, extracted from 20 open source projects. The results indicate that distilbert-base-uncased model demonstrates a promising level of performance by achieving a 81% average F1-score (weighted average).
Place, publisher, year, edition, pages
Institute of Electrical and Electronics Engineers (IEEE), 2025. p. 49-53
Keywords [en]
Classification (of information), Codes (symbols), Computational linguistics, High level languages, Open source software, Open systems, Python, Software design, Automated approach, Automated code, BERT, Classification approach, Code comment, Language model, Multi-labels, Software project, Source code analysis, Team work, Java programming language
National Category
Computer Sciences
Identifiers
URN: urn:nbn:se:lnu:diva-150654DOI: 10.1109/NLBSE66842.2025.00017Scopus ID: 2-s2.0-105009456798OAI: oai:DiVA.org:lnu-150654DiVA, id: diva2:2114972
Conference
2025 IEEE/ACM International Workshop on Natural Language-Based Software Engineering (NLBSE), Ottawa, Canada, April 27-28, 2025
2026-11-032026-11-032026-11-03Bibliographically approved