Table of Contents
Fetching ...

PyExamine A Comprehensive, UnOpinionated Smell Detection Tool for Python

Karthik Shivashankar, Antonio Martini

TL;DR

PyExamine addresses the challenge of detecting code smells in Python by offering a unified, multi-level analysis framework that covers architectural, structural, and code-level smells across 49 metrics. It uses a modular, YAML-configured architecture to enable Python-specific detection and high configurability, with an extensive replication package for reproducibility. The evaluation on seven repositories shows strong recall and precision across smell types, and a large-scale prevalence study on 183 projects reveals widespread smells and framework-specific patterns. The work demonstrates practical value for developers and teams seeking holistic code quality insights and supports future enhancements like IDE integrations and trend analyses.

Abstract

The growth of Python adoption across diverse domains has led to increasingly complex codebases, presenting challenges in maintaining code quality. While numerous tools attempt to address these challenges, they often fall short in providing comprehensive analysis capabilities or fail to consider Python-specific contexts. PyExamine addresses these critical limitations through an approach to code smell detection that operates across multiple levels of analysis. PyExamine architecture enables detailed examination of code quality through three distinct but interconnected layers: architectural patterns, structural relationships, and code-level implementations. This approach allows for the detection and analysis of 49 distinct metrics, providing developers with an understanding of their codebase's health. The metrics span across all levels of code organization, from high-level architectural concerns to granular implementation details. Through evaluation on 7 diverse projects, PyExamine achieved detection accuracy rates: 91.4\% for code-level smells, 89.3\% for structural smells, and 80.6\% for architectural smells. These results were further validated through extensive user feedback and expert evaluations, confirming PyExamine's capability to identify potential issues across all levels of code organization with high recall accuracy. In additional to this, we have also used PyExamine to analysis the prevalence of different type of smells, across 183 diverse Python projects ranging from small utilities to large-scale enterprise applications. PyExamine's distinctive combination of comprehensive analysis, Python-specific detection, and high customizability makes it a valuable asset for both individual developers and large teams seeking to enhance their code quality practices.

PyExamine A Comprehensive, UnOpinionated Smell Detection Tool for Python

TL;DR

PyExamine addresses the challenge of detecting code smells in Python by offering a unified, multi-level analysis framework that covers architectural, structural, and code-level smells across 49 metrics. It uses a modular, YAML-configured architecture to enable Python-specific detection and high configurability, with an extensive replication package for reproducibility. The evaluation on seven repositories shows strong recall and precision across smell types, and a large-scale prevalence study on 183 projects reveals widespread smells and framework-specific patterns. The work demonstrates practical value for developers and teams seeking holistic code quality insights and supports future enhancements like IDE integrations and trend analyses.

Abstract

The growth of Python adoption across diverse domains has led to increasingly complex codebases, presenting challenges in maintaining code quality. While numerous tools attempt to address these challenges, they often fall short in providing comprehensive analysis capabilities or fail to consider Python-specific contexts. PyExamine addresses these critical limitations through an approach to code smell detection that operates across multiple levels of analysis. PyExamine architecture enables detailed examination of code quality through three distinct but interconnected layers: architectural patterns, structural relationships, and code-level implementations. This approach allows for the detection and analysis of 49 distinct metrics, providing developers with an understanding of their codebase's health. The metrics span across all levels of code organization, from high-level architectural concerns to granular implementation details. Through evaluation on 7 diverse projects, PyExamine achieved detection accuracy rates: 91.4\% for code-level smells, 89.3\% for structural smells, and 80.6\% for architectural smells. These results were further validated through extensive user feedback and expert evaluations, confirming PyExamine's capability to identify potential issues across all levels of code organization with high recall accuracy. In additional to this, we have also used PyExamine to analysis the prevalence of different type of smells, across 183 diverse Python projects ranging from small utilities to large-scale enterprise applications. PyExamine's distinctive combination of comprehensive analysis, Python-specific detection, and high customizability makes it a valuable asset for both individual developers and large teams seeking to enhance their code quality practices.

Paper Structure

This paper contains 33 sections, 1 figure, 11 tables.

Figures (1)

  • Figure 1: Main Component of PyExamine