An Approach Based on Sum Product Networks for Code Smells Detection

From a software engineering perspective, a code smell refers to poor code structure. Many studies have shown that there is a significant negative relationship between code smells and code quality. Thus, many approaches have been proposed to detect and manage them. However, detecting code smells remains a challenging problem. This paper introduces a method (CSDSPN) based on a sum product network (SPN); a probabilistic deep architecture not yet evaluated in the context of code smell detection. SPNs are tractable density estimators that compactly represent a joint probability distribution. The main objective of this paper is to study the performance of a Sum-Product Network as a classifier for code smell detection. To fulfill this objective, the paper proposes an approach that utilizes a classifier based on an SPN trained on data from previous projects, to identify code smells in new source code. An empirical study was conducted to assess the effectiveness of the proposed method in detecting ’God Class,’ ’Long Method,’ and ’Feature Envy’ code smells using well-known datasets. The empirical study evaluated the proposed approach against against seven standard and advanced machine learning models. The results of the study demonstrate the potential of the proposed method in effectively detecting code smells.

Authors

Institutions

Publication Details

Journal
Journal of Communications Software and Systems
Published
2025-05-14
DOI
https://doi.org/10.24138/jcomss-2024-0106
Primary Topic
Advanced Text Analysis Techniques
Type
article
Field-Weighted Citation Impact
0.00
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

An Approach Based on Sum Product Networks for Code Smells Detection

Mostefai Abdelkader
Journal of Communications Software and Systems
Advanced Text Analysis Techniques
article

An Approach Based on Sum Product Networks for Code Smells Detection

Mostefai Abdelkader
article en

Abstract

From a software engineering perspective, a code smell refers to poor code structure. Many studies have shown that there is a significant negative relationship between code smells and code quality. Thus, many approaches have been proposed to detect and manage them. However, detecting code smells remains a challenging problem. This paper introduces a method (CSDSPN) based on a sum product network (SPN); a probabilistic deep architecture not yet evaluated in the context of code smell detection. SPNs are tractable density estimators that compactly represent a joint probability distribution. The main objective of this paper is to study the performance of a Sum-Product Network as a classifier for code smell detection. To fulfill this objective, the paper proposes an approach that utilizes a classifier based on an SPN trained on data from previous projects, to identify code smells in new source code. An empirical study was conducted to assess the effectiveness of the proposed method in detecting ’God Class,’ ’Long Method,’ and ’Feature Envy’ code smells using well-known datasets. The empirical study evaluated the proposed approach against against seven standard and advanced machine learning models. The results of the study demonstrate the potential of the proposed method in effectively detecting code smells.

Journal of Communications Software and SystemsVol. 21(2)
Université de Saida Dr.Moulay Tahar (DZ)
Openalex Percentile: Top 95%
Advanced Text Analysis Techniques
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.