On the Interplay of Smells Large Class, Complex Class and Duplicate Code

Bad smells have been defined to describe potential problems in code, possibly pointing out refactoring opportunities. Several empirical studies have highlighted that smells have a negative impact on comprehension and maintainability. Consequently, several approaches have been proposed to detect and restructure them. However, studies on the inter-relationship of occurrence of different types of smells in source code are still lacking, especially those focused on the quantification of this inter-relationship. In this work, we aim at understand and quantify the possible the inter-relation of smells Large Class - LC, Complex Class - CC and Duplicate Code - DC. In particular, we investigate patterns of LC and CC regarding the presence or absence of duplicate code. We conduct a quantitative study on five open source projects, and also a qualitative analysis to measure and understand the association of specific smells. As one of the main results, we highlight that there are "occurrence patterns" among these smells, for example: either in Complex Class or in the co-occurrence of Large Class and Complex Class, clones tend to be more prevalent in highly complex classes than less complex classes. The found patterns could be used to improve the performance of detection tools or even help in refactoring tasks.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
04/28/2023

Does Code Smell Frequency Have a Relationship with Fault-proneness?

Fault-proneness is an indication of programming errors that decreases so...
research
03/27/2021

An empirical study into the relationship between class features and test smells

While a substantial body of prior research has investigated the form and...
research
08/25/2023

Investigating the Impact of Vocabulary Difficulty and Code Naturalness on Program Comprehension

Context: Developers spend most of their time comprehending source code d...
research
05/10/2023

Do code refactorings influence the merge effort?

In collaborative software development, multiple contributors frequently ...
research
07/15/2020

On the Generation, Structure, and Semantics of Grammar Patterns in Source Code Identifiers

Identifiers make up a majority of the text in code. They are one of the ...
research
06/06/2020

Replacements and Replaceables: Making the Case for Code Variants

There are often multiple ways to implement the same requirement in sourc...
research
07/28/2023

Exploring Moral Principles Exhibited in OSS: A Case Study on GitHub Heated Issues

To foster collaboration and inclusivity in Open Source Software (OSS) pr...

Please sign up or login with your details

Forgot password? Click here to reset