Towards Understanding the Distribution and Evolution of Code Smells: An Empirical Study on Java and Python Projects (S)

Code smells are usually associated with poor coding practices, design issues, and potential bugs.Studies on code smells are important.However, existing studies lack research on the distribution and evolution of code smells in different programming languages.To fill this gap, we collected 9 Java projects and 9 Python projects from GitHub and analyzed them with existing tools.We found that Java's code smell rate (the percentage of the number of code smells in total lines of code) of 11.11% is higher than Python's code smell rate of 1.31%."Magic Number", "Long Statement", and "Unutilized Abstraction" are the top three code smells in Java, while "Design Smells", "Common Weakness Enumeration", and "Unused Code" are the top three code smells in Python.The code smell aggregation level (the percentage of code smells in the top five modules in the total number of code smells) in Java is 44.07%while in Python is 59.18%, indicating that both languages are likely to accumulate code smells in certain modules.During the project's progress, the code smell rate remained steady in both languages, while the aggregation level showed a downward trend.Our findings can help developers understand common code smells and their trends in projects, thus guiding them to improve software quality.

Authors

Institutions

Publication Details

Journal
Proceedings/Proceedings of the ... International Conference on Software Engineering and Knowledge Engineering
Published
2024-10-28
DOI
https://doi.org/10.18293/seke2024-079
Primary Topic
Software Engineering Research
Type
article
Field-Weighted Citation Impact
0.00

Funders

Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

Towards Understanding the Distribution and Evolution of Code Smells: An Empirical Study on Java and Python Projects (S)

Qing Mi, T Zhang, Yuhe Wang, Keke Cai
Proceedings/Proceedings of the ... International Conference on Software Engineering and Knowledge Engineering
Software Engineering Research
article

Towards Understanding the Distribution and Evolution of Code Smells: An Empirical Study on Java and Python Projects (S)

Qing Mi, T Zhang, Yuhe Wang, Keke Cai
article en

Abstract

Code smells are usually associated with poor coding practices, design issues, and potential bugs.Studies on code smells are important.However, existing studies lack research on the distribution and evolution of code smells in different programming languages.To fill this gap, we collected 9 Java projects and 9 Python projects from GitHub and analyzed them with existing tools.We found that Java's code smell rate (the percentage of the number of code smells in total lines of code) of 11.11% is higher than Python's code smell rate of 1.31%."Magic Number", "Long Statement", and "Unutilized Abstraction" are the top three code smells in Java, while "Design Smells", "Common Weakness Enumeration", and "Unused Code" are the top three code smells in Python.The code smell aggregation level (the percentage of code smells in the top five modules in the total number of code smells) in Java is 44.07%while in Python is 59.18%, indicating that both languages are likely to accumulate code smells in certain modules.During the project's progress, the code smell rate remained steady in both languages, while the aggregation level showed a downward trend.Our findings can help developers understand common code smells and their trends in projects, thus guiding them to improve software quality.

Proceedings/Proceedings of the ... International Conference on Software Engineering and Knowledge EngineeringVol. 2024
Beijing University of Technology (CN), University of Science and Technology Beijing (CN)
Beijing University of Technology
Openalex Percentile: Top 60%
Software Engineering Research
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.