PyExamine A Comprehensive, UnOpinionated Smell Detection Tool for Python

📅 2025-01-30
📈 Citations: 0
Influential: 0
📄 PDF
🤖 AI Summary
Rising Python code complexity impedes software quality assurance, while existing detection tools suffer from insufficient comprehensiveness and specificity. Method: We propose a multi-level code smell detection framework tailored for Python, introducing the first unbiased, tri-level联动 (architecture–structure–code) analytical paradigm. It deeply integrates Python-specific semantics and enables unified modeling and highly customizable evaluation across 49 quality metrics. Our approach synergistically combines static analysis, abstract syntax tree (AST) parsing, control- and data-flow modeling, multi-granularity rule engines, and Python-specific pattern matching. Results: Evaluated on seven benchmark projects, the framework achieves an average accuracy of 87.1% (layer-wise: 80.6%, 89.3%, 91.4%). Empirical analysis across 183 open-source projects validates both observed smell distribution patterns and high recall performance.

Technology Category

Application Category

📝 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.
Problem

Research questions and friction points this paper is trying to address.

Python code complexity
code quality assurance
tool limitations
Innovation

Methods, ideas, or system contributions that make the work stand out.

Python Code Inspection
Comprehensive Error Detection
Customizable Adjustment
🔎 Similar Papers
No similar papers found.
K
Karthik Shivashankar
Department of Informatics, University of Oslo, Norway
Antonio Martini
Antonio Martini
Professor at University of Oslo
Agilesoftware architecturetechnical debtAI for software development