CodeComClassify: Automating Code Comments Classification using BERT-Based Language Models

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).

Authors

Institutions

Publication Details

Published
2025-04-27
DOI
https://doi.org/10.1109/nlbse66842.2025.00017
Citations
2
Primary Topic
Topic Modeling
Type
article
Field-Weighted Citation Impact
4.96
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

CodeComClassify: Automating Code Comments Classification using BERT-Based Language Models

Muhammad Haroon, Momin Khan, Syed Mahfuzul Aziz, Khubaib Amjad Alam et al.
2 citations
Topic Modeling
4.96
article

CodeComClassify: Automating Code Comments Classification using BERT-Based Language Models

Muhammad Haroon, Momin Khan, Syed Mahfuzul Aziz, Khubaib Amjad Alam, Wajid Ali, Zahoor Ahmad, Nadeem Abbas
article en
2 citations

Abstract

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).

Al Ain University (AE), National University of Computer and Emerging Sciences (PK), Linnaeus University (SE)
Openalex Percentile: Top 5%
Topic Modeling
4.96
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.