/SmellDetectorMerger

An Eclipse plug-in that detects and displays code smells in a Java project by using exisiting code smell detectors

Primary LanguageJava

SmellDetectorMerger

SmellDetectorMerger is an Eclipse plugin which integrates a number of code smell detectors, some of which are products of research work. It provides aggregate detection results (from the different detectors) which are displayed to the end user inside a View in a table format. For each detected smell, the user can see its type, the affected element, as well as a list of names which correspond to the detectors that found it.

Features

  • Filtering of the results in order to only keep those that were detected by >=2 or >50% of the tools
  • Import/export of the results from/to a csv file
  • Calculate accuracy and precision of the detectors based on internally created gold standard sets
  • Preference page which allows the user to select the detectors that will be used during execution

Available detectors

Supported code smells

  • God Class (CheckStyle, PMD, JDeodorant, JSpIRIT, Organic)
  • Long Method (CheckStyle, PMD, JDeodorant, JSpIRIT, Organic)
  • Long Parameter List (CheckStyle, PMD, Organic)
  • Feature Envy (JDeodorant, JSpIRIT, Organic)
  • Duplicate Code (DuDe, PMD)
  • Brain Class (JSpIRIT, Organic)
  • Brain Method (JSpIRIT, Organic)
  • Data Class (JSpIRIT, Organic)
  • Dispersed Coupling (JSpIRIT, Organic)
  • Intensive Coupling (JSpIRIT, Organic)
  • Refused Parent Bequest (JSpIRIT, Organic)
  • Shotgun Surgery (JSpIRIT, Organic)
  • Tradition Breaker (JSpIRIT)
  • Type Checking (JDeodorant)
  • Class Data Should Be Private (Organic)
  • Complex Class (Organic)
  • Lazy Class (Organic)
  • Message Chain (Organic)
  • Speculative Generality (Organic)
  • Spaghetti Code (Organic)

Installation

In order to install the tool in Eclipse, follow the steps below:

  1. Download the jar file of the tool from the latest release here
  2. Close Eclipse (in case there is an instance open)
  3. Copy the downloaded jar file and paste it in the dropins folder (it is located in the installation directory of Eclipse)
  4. Open Eclipse and select File -> Restart from the menu to make sure it's refreshed

After completing the previous steps, the tool can run by right-clicking the root folder of the desired project and selecting SmellDetectorMerger followed by the desired smell to be detected.

TechDebt 2022

A paper was written to showcase the plugin, comparing the detection results of the underlying tools. This was accepted, among other papers, for presentation in the TechDebt 2022 conference, an international conference related to Technical Debt. The paper can be found here.