Projects‎ > ‎


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*:
  • Brain Class 
  • Brain Method 
  • Data Class 
  • Disperse Coupling 
  • Feature Envy 
  • God Class 
  • Intensive Coupling 
  • Refused Parent Bequest 
  • Shotgun Surgery 
  • Tradition Breaker

    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:

  • Smells within a component. This grouping pattern identifies code smells that are implemented by the same architectural component. Specifically, we look for one single component with: (i) code smells that are syntactically related, or (ii) code elements infected by the same type of code smell. Two classes are syntactically related if at least one of them references the other one.
  • Smells in a hierarchy. This grouping pattern identifies code smells that occur across the same inheri- tance tree involving one or more components. We only consider hierarchies exhibiting the same type of code smell. The rationale is that a recurring introduction of the same smell in different code elements might represent a bigger problem in the hierarchy. 

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. 

  1.     Click in the gear icon (icon) of the "JSpIRIT View"
  2.     Select the kind of ranking
  3.     Configure the criteria of the ranking

Presentation SATURN 2016


Related Publications

  • 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:
    • Automatic refactoring of code smells
    • Identification of code smells for performance