Unnecessary Code Detector

Add this URL to your Eclipse Installation to reach this solution's update site.

Oxygen (4.7)
Neon (4.6)
Mars (4.5)
Luna (4.4)
Kepler (4.3)
Juno (4.2, 3.8)
Previous to Juno (<=4.1)


Learn more...

Details Group Tabs

bbollisetty's picture

After successfully installation i am not able to see any "UCDetector" link in my context menu after right click on the package.

tletien's picture

I have to work on a Eclipse RCP project which contains full of copy-paste, dead code. This plugin helps me a lot during refactoring time.

troberts1hx's picture

After I install it, all I can see in Eclipse is a blank screen. Even uninstalling it does not restore the work space. I cannot even see my code. The only way to fix it is to go to Window, Reset Perspective. I have confirmed that this plug-in is the problem. I have uninstalled it and reinstalled it, and the same thing happens.

jspieler's picture

Hi Tharpa,

if you have any stack traces from:
WORKSPACE/.metadata/.log
or
Eclipse Error Log View
please add a bug here: https://sourceforge.net/p/ucdetector/bugs/

Thanks
Jörg

mmisingname3um's picture

I cannot work without this tool anymore.
It helps you tidy up the code and removing methods/fields/classes that are never called anywhere.
It also suggests reducing methods/fields/classes visibility which is key to maintain the code.
Lastly it suggests fields that could be final. It sometimes takes a of work to get there, but you won't regret it.
Be careful when applying the changes if your code uses reflection.

I give it a 5/5 mark and wished it could do even more!
Thanks Jörg Spieler for this very useful tool!

irodriguez7i8's picture

This plugin helps you get rid of the dead code in your project. This means that your code-base will be reduced and the maintenance will be easier. Thanks to this plugin I removed 20.000 lines of code from a project of 130.000 without changing any behavior.

Anyway it is not perfect, and you'll find that you have more dead code than the one this plugin detects, but it will mark about 70-80% of it, so it is a great option.

nwaisbrot128's picture

I've found this very useful with the large code-base at my office. It does a great job of finding the dead code. Nice extras are that it will mark things as only used in unit tests and it finds when the access specifier is too general.

mmarinato's picture

After a few hours trying out different solutions, you may end up having methods from your first tries forgotten throughout your code. UCDetector helps spotting them.

smisingnameop8's picture

Good work - thank you very much