Authors:
Nils Baumgartner
;
Firas Adleh
and
Elke Pulvermüller
Affiliation:
Research Group Software Engineering, Institute of Computer Science, Department of Mathematics and Computer Science, University of Osnabrück, Osnabrueck, Germany
Keyword(s):
Code Smell, Data Clumps, Refactoring, Integrated Development Environment.
Abstract:
Code smells in software systems create maintenance and extension challenges for developers. While many tools detect code smells, few provide refactoring suggestions. Some of the tools support live detection in an integrated development environment. We present a tool for the live detection of data clumps in Java with generated suggestions and semi-automatic refactoring. To achieve this, our research examines projects and their associated abstract syntax trees and analyzes types of variables. Thereby, we aim to detect data clumps, a type of code smells, and generate suggestions to counteract them. We implemented our approach to live data clumps detection as an IntelliJ integrated development environment application plugin. The live detection achieved a median of less than 0.5 s for the ArgoUML software project, which we analyzed as an example. From over 1500 investigated files, our approach detected 125 files with data clumps and that of CBSD (Code Bad Smell Detector) detected 97 files
with data clumps. For both approaches, 92 of the files found were the same. We combined the manual steps for refactoring, resulting in a semi-automatic elimination of data clumps.
(More)