Does Python Smell Like Java? Tool Support for Design Defect Discovery in Python
Nicole Vavrov\'a (Universiteit van Amsterdam, Netherlands), Vadim, Zaytsev (Raincode Labs, Belgium)

TL;DR
This paper presents a tool for detecting design defects in Python code, comparing its findings with Java, and analyzing a large dataset of open source Python projects to understand code smell prevalence.
Contribution
It adapts and applies design defect detection techniques from Java to Python, creating a new tool and providing large-scale empirical analysis of Python code quality.
Findings
More than twice as many methods are too long in Python compared to Java.
Long parameter lists are seven times less common in Python than in Java.
Functional Decomposition, Spaghetti Code, and God Classes are rare or absent in Python.
Abstract
The context of this work is specification, detection and ultimately removal of detectable harmful patterns in source code that are associated with defects in design and implementation of software. In particular, we investigate five code smells and four antipatterns previously defined in papers and books. Our inquiry is about detecting those in source code written in Python programming language, which is substantially different from all prior research, most of which concerns Java or C-like languages. Our approach was that of software engineers: we have processed existing research literature on the topic, extracted both the abstract definitions of nine design defects and their concrete implementation specifications, implemented them all in a tool we have programmed and let it loose on a huge test set obtained from open source code from thousands of GitHub projects. When it comes to…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
