Follow Your Nose -- Which Code Smells are Worth Chasing?
- URL: http://arxiv.org/abs/2103.01861v2
- Date: Mon, 15 Jan 2024 15:52:39 GMT
- Title: Follow Your Nose -- Which Code Smells are Worth Chasing?
- Abstract summary: We evaluate the influence of code smells on four metrics for quality, productivity, and bug detection efficiency.
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.
- Score: 0.3683202928838613
- License: http://creativecommons.org/licenses/by/4.0/
- 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. 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.
Related papers
- SmellBench: Towards Fine-Grained Evaluation of Code Agents on Refactoring Tasks [34.43588103259487]
SmellBench proactively injects code smells into clean code from real-world repositories.<n>It contains 294 cases spanning 7 popular smell types, 3 difficulty levels, 2 instruction settings across 7 real-world repositories.<n>Experiments show that the best combination - Qwenwen Code + Sonnet 4.5 - achieved only a 50.34 score of smell elimination.
arXiv Detail & Related papers (2026-06-04T01:49:07Z) - SmellBench: Evaluating LLM Agents on Architectural Code Smell Repair [1.6922906233636834]
Architectural code smells erode software maintainability and are costly to repair manually.<n>We present the first empirical evaluation of large language model agents on architectural code smell repair.<n>We contribute SmellBench, a task orchestration framework that incorporates smell-type-specific optimized prompts.
arXiv Detail & Related papers (2026-05-07T22:33:32Z) - The Influence of Code Smells in Efferent Neighbors on Class Stability [0.6079137591620588]
This study investigates whether the presence of code smells in a class's efferent neighbors affects its stability.<n>We mine one year of commit history from 100 top-starred GitHub projects.<n>We detect code smells and static dependencies, determine code smell interrelation and interaction, and model these factors as predictors of class stability.
arXiv Detail & Related papers (2026-02-13T14:15:51Z) - Beyond Strict Rules: Assessing the Effectiveness of Large Language Models for Code Smell Detection [0.5249836059995157]
Code smells are symptoms of potential code quality problems that may affect software maintainability.<n>This paper evaluates the effectiveness of four large language models (LLMs) for detecting nine code smells across 30 Java projects.
arXiv Detail & Related papers (2026-01-14T21:08:35Z) - New York Smells: A Large Multimodal Dataset for Olfaction [93.162210916881]
We present New York Smells, a large dataset of paired image and olfactory signals captured in the wild''<n>Our dataset contains 7,000 smell-image pairs from 3,500 distinct objects across indoor and outdoor environments.<n>Our benchmark has three tasks: cross-modal smell-to-image retrieval, recognizing scenes, objects, and materials from smell alone, and fine-grained discrimination between grass species.
arXiv Detail & Related papers (2025-11-25T17:44:50Z) - A Causal Perspective on Measuring, Explaining and Mitigating Smells in LLM-Generated Code [49.09545217453401]
Propensity Smelly Score (PSC) is a metric that estimates the likelihood of generating particular smell types.<n>We identify how generation strategy, model size, model architecture and prompt formulation shape the structural properties of generated code.<n> PSC helps developers interpret model behavior and assess code quality, providing evidence that smell propensity signals can support human judgement.
arXiv Detail & Related papers (2025-11-19T19:18:28Z) - Clean Code, Better Models: Enhancing LLM Performance with Smell-Cleaned Dataset [13.23492570818459]
This study takes the first systematic research to assess and improve dataset quality in terms of code smells.<n>We propose an LLM-based code smell cleaning tool, named SmellCC, which automatically removes code smells.
arXiv Detail & Related papers (2025-08-16T07:40:58Z) - A Novel Taxonomy and Classification Scheme for Code Smell Interactions [2.6597689982591044]
This study presents a novel taxonomy and a proposed classification scheme for the possible code smell interactions.
Experiments have been carried out using several popular machine learning (ML) models.
Results primarily show the presence of code smell interactions namely Inter-smell Detection within domain.
arXiv Detail & Related papers (2025-04-25T16:24:11Z) - How Propense Are Large Language Models at Producing Code Smells? A Benchmarking Study [45.126233498200534]
We introduce CodeSmellEval, a benchmark designed to evaluate the propensity of Large Language Models for generating code smells.
Our benchmark includes a novel metric: Propensity Smelly Score (PSC), and a curated dataset of method-level code smells: CodeSmellData.
To demonstrate the use of CodeSmellEval, we conducted a case study with two state-of-the-art LLMs, CodeLlama and Mistral.
arXiv Detail & Related papers (2024-12-25T21:56:35Z) - Characterizing JavaScript Security Code Smells [0.0]
Security code smells are coding patterns indicative of potential vulnerabilities or security weaknesses.
We present a set of 24 JavaScript security code smells, map them to a possible security awareness, and explain our detection mechanism.
arXiv Detail & Related papers (2024-11-28T20:07:31Z) - Understanding Code Understandability Improvements in Code Reviews [79.16476505761582]
We analyzed 2,401 code review comments from Java open-source projects on GitHub.
83.9% of suggestions for improvement were accepted and integrated, with fewer than 1% later reverted.
arXiv Detail & Related papers (2024-10-29T12:21:23Z) - xNose: A Test Smell Detector for C# [0.0]
Test smells, similar to code smells, can negatively impact both the test code and the production code being tested.
Despite extensive research on test smells in languages like Java, Scala, and Python, automated tools for detecting test smells in C# are lacking.
arXiv Detail & Related papers (2024-05-07T07:10:42Z) - Q-Learning to navigate turbulence without a map [47.28605705112213]
We consider the problem of olfactory searches in a turbulent environment.
We develop a reinforcement learning algorithm using a small set of interpretable olfactory states.
We show that two salient features of odor traces, discretized in few olfactory states, are sufficient to learn navigation in a realistic odor plume.
arXiv Detail & Related papers (2024-04-26T15:51:20Z) - Prompt Learning for Multi-Label Code Smell Detection: A Promising
Approach [6.74877139507271]
Code smells indicate the potential problems of software quality so that developers can identify opportunities by detecting code smells.
We propose textitPromptSmell, a novel approach based on prompt learning for detecting multi-label code smell.
arXiv Detail & Related papers (2024-02-16T01:50:46Z) - Copilot-in-the-Loop: Fixing Code Smells in Copilot-Generated Python Code using Copilot [2.3353795064263543]
Python experiences a decrease in readability and maintainability when code smells are present.
Recent advancements in Large Language Models have sparked growing interest in AI-enabled tools for both code generation and understanding.
GitHub Copilot is one such tool that has gained widespread usage.
Copilot Chat, released in September 2023, functions as an interactive tool aimed at facilitating natural language-powered coding.
arXiv Detail & Related papers (2024-01-25T13:39:54Z) - Rethinking Negative Pairs in Code Search [56.23857828689406]
We propose a simple yet effective Soft-InfoNCE loss that inserts weight terms into InfoNCE.
We analyze the effects of Soft-InfoNCE on controlling the distribution of learnt code representations and on deducing a more precise mutual information estimation.
arXiv Detail & Related papers (2023-10-12T06:32:42Z) - Zero-Shot Detection of Machine-Generated Codes [83.0342513054389]
This work proposes a training-free approach for the detection of LLMs-generated codes.
We find that existing training-based or zero-shot text detectors are ineffective in detecting code.
Our method exhibits robustness against revision attacks and generalizes well to Java codes.
arXiv Detail & Related papers (2023-10-08T10:08:21Z) - Augmenting Diffs With Runtime Information [53.22981451758425]
Collector-Sahab is a tool that augments code diffs with runtime difference information.
We run Collector-Sahab on 584 code diffs for Defects4J bugs and find it successfully augments the code diff for 95% (555/584) of them.
arXiv Detail & Related papers (2022-12-20T16:33:51Z) - DS-1000: A Natural and Reliable Benchmark for Data Science Code
Generation [70.96868419971756]
DS-1000 is a code generation benchmark with a thousand data science problems spanning seven Python libraries.
First, our problems reflect diverse, realistic, and practical use cases since we collected them from StackOverflow.
Second, our automatic evaluation is highly specific (reliable) -- across all Codex-predicted solutions that our evaluation accept, only 1.8% of them are incorrect.
arXiv Detail & Related papers (2022-11-18T17:20:27Z) - An Empirical Study on Predictability of Software Code Smell Using Deep
Learning Models [3.2973778921083357]
Code smell is a surface indication of something tainted but in terms of software writing practices.
Recent studies have observed that codes having code smells are often prone to a higher probability of change in the software development cycle.
We developed code smell prediction models with the help of features extracted from source code to predict eight types of code smell.
arXiv Detail & Related papers (2021-08-08T12:36:23Z) - Empirical Analysis on Effectiveness of NLP Methods for Predicting Code
Smell [3.2973778921083357]
A code smell is a surface indicator of an inherent problem in the system.
We use three Extreme learning machine kernels over 629 packages to identify eight code smells.
Our findings indicate that the radial basis functional kernel performs best out of the three kernel methods with a mean accuracy of 98.52.
arXiv Detail & Related papers (2021-08-08T12:10:20Z)
This list is automatically generated from the titles and abstracts of the papers in this site.
This site does not guarantee the quality of this site (including all information) and is not responsible for any consequences.