JSpIRIT (Java Smart Identification of Refactoring opportunITies) is a plugin for the Eclipse IDE that assists the developer in identifying and prioritizing code smells.
Code Smells Identification and Prioritization
JSpIRIT supports the identification of 10 code smells following the detection strategies presented by Lanza and Marinescu*:
To prioritize the code smells JSpIRIT provides several kind of rankings that use different criteria such as the history of the application, the relevance of the kind of code smell, or modifiability scenarios.
*Michele Lanza and Radu Marinescu. Object-Oriented Metrics in Practice - Using Software Metrics to Characterize, Evaluate, and Improve the Design of Object-Oriented Systems. Springer, 2006.
Agglomerations Identification and Prioritization
JSpIRIT also supports the identification of agglomerations of code smells. Agglomerations are groups of inter-related code smells (e.g., syntactically-related code smells within a component) that likely indicate together the presence of an architectural problem. Currently, JSpIRIT supports 2 kind of agglomerations:
Getting Started with JSpIRIT
This section has brief instructions for getting started with JSpIRIT.
How to install
You can download a jar file containing the plugin from here (Agglomeration version). Download it into the Eclipse dropins folder and restart Eclipse.
JSpIRIT has been tested in Eclipse Kepler (v4.3.2) with Java 1.7.
How to find and rank code smells
To identify and rank code smells, right click on the project to analyze and from the popup menu select "JSpIRIT->Find Code Smells". The "JSpIRIT View" will indicate the progress of the smells identification. When it's all done, the "JSpIRIT View" will list the smells and their ranking values.
How to configure the ranking
Once the code smells are identified, you can select the way in which the ranking is calculated.
Presentation SATURN 2016
Slides
Video:
Related Publications
Journals
Santiago Vidal, Claudia Marcos, and Andrés Díaz-Pace. An approach to prioritize code smells for refactoring. Automated Software Engineering (2014): 1-32.
Conferences
Santiago Vidal, Everton Guimaraes, William Oizumi, Alessandro Garcia, Andrés Díaz-Pace, Claudia Marcos. On the Criteria for Prioritizing Code Anomalies to Identify Architectural Problems in Proceedings of the 31st Annual ACM Symposium on Applied Computing (SAC '16), ACM, Pisa, Italy, 2016.
Santiago Vidal, Hernán Vazquez, Andrés Díaz-Pace, Claudia Marcos, Alessandro Garcia, William Oizumi. JSpIRIT: a flexible tool for the analysis of code smells in 2015 34th International Conference of the Chilean Computer Science Society (SCCC), IEEE, Santiago, Chile, November, 2015.
Future Improvements
Currently, we are working in new features for JSpIRIT. Some of them involve: