Follow Your Nose -- Which Code Smells are Worth Chasing?

Idan Amit, Nili Ben Ezra, Dror G. Feitelson
3/2/2021
7 citations
cs.SEcs.LG

Official code: evidencebp/analysis_utils (2 stars, Python, last commit 2026-05-04). 2 more implementations below.

Abstract

The common use case of code smells assumes causality: Identify a smell, remove it, and by doing so improve the code. We empirically investigate their fitness to this use.

Show full abstract

We present a list of properties that code smells should have if they indeed cause lower quality. We evaluated the smells in 31,687 Java files from 677 GitHub repositories, all the repositories with 200+ commits in 2019. We measured the influence of smells on four metrics for quality, productivity, and bug detection efficiency. Out of 151 code smells computed by the CheckStyle smell detector, less than 20% were found to be potentially causal, and only a handful are rather robust. The strongest smells deal with simplicity, defensive programming, and abstraction. Files without the potentially causal smells are 50% more likely to be of high quality. Unfortunately, most smells are not removed, and developers tend to remove the easy ones and not the effective ones.

View on arXivView PDF

Code Implementations(3)

Code implementations of this paper
RepositoryTypeStarsLanguageLicenseLast commit
evidencebp/analysis_utilsOfficial2Python–2026-05-04
evidencebp/follow-your-noseOfficial1HTML–2023-05-23
evidencebp/generalOfficial1––2024-02-05
21PythonApr 10, 20207 months ago
analysismachine-learningsoftware-engineering
11HTML, ShellMar 1, 20213 years ago
evidencebp/generalOfficial100%
10Jul 5, 20202 years ago

Similar Papers

Cite this paper

@article{amit2021follow,
  title  = {Follow Your Nose -- Which Code Smells are Worth Chasing?},
  author = {Idan Amit and Nili Ben Ezra and Dror G. Feitelson},
  year   = {2021},
  eprint = {2103.01861},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2103.01861}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2103.01861.svg)](https://codeofpaper.com/paper/2103.01861)

Discussion