Solving bad smells

Last week I took some time to checkout the JDeodorant Eclipse plugin. The plugin was introduced to me at CSMR 2009 by Nikolaos Tsantalis. The demo he gave me already showed some potential, and playing around with the plugin confirmed this first impression.

Installing the plugin was easy, I just followed the installation instructions on the website. At first I used the tool on one of our smaller projects to find refactorings for long methods. After some minutes the results showed a long list of refactor-candidates. Unfortunately, this lists also contained many propositions to move, for example, all statements of a method to a new method. Even though it is a theoretically correct proposition it does not really make sense in general.

Since I did not feel like analyzing the complete list I tried a different approach. I first used checkstyle to find potential candidate methods and let JDeodorant analyze these files one at a time. This does not only speed up the process of finding the candidates, it also provides a list that is way easier to handle. Using this approach I found some new ideas for a several smaller refactorings in just a few minutes.

In the end I think that, even though it still has some rough edges, this plugin can be very useful. Anyway, the plugin is definitely put onto my watch list.


Mário Marinato said...


I just heard about jDeodorant and while searching some info about it I came to this post.

Have you been using jDeodorant recently? I'd like to know if the rough edges you cited are gone.

Best regards,

Eric Bouwers said...

Unfortunately I have not used jDeodorant lately, so you have to try it out yourself to see whether the rough edges are gone. Please share your results!

Mário Marinato said...

I'll sure do.