Unnecessary Code Detector

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

2020-03 (4.15), 2019-12 (4.14), 2019-09 (4.13), 2019-06 (4.12), 2019-03 (4.11), 2018-12 (4.10), 2018-09 (4.9), Photon (4.8), 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), 2020-06 (4.16), 2020-09 (4.17), 2020-12 (4.18), 2021-03 (4.19)


Learn more...
Solution Description

UCDetector (Unnecessary Code Detector) is a eclipse PlugIn tool to find unnecessary (dead) public java code. For example public classes, methods or fields which have no references.

Additional Details

Eclipse Versions: 2020-03 (4.15), 2019-12 (4.14), 2019-09 (4.13), 2019-06 (4.12), 2019-03 (4.11), 2018-12 (4.10), 2018-09 (4.9), Photon (4.8), 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), 2020-06 (4.16), 2020-09 (4.17), 2020-12 (4.18), 2021-03 (4.19)

Platform Support: Windows, Mac, Linux/GTK

Organization Name: Jörg Spieler

Development Status: Production/Stable

Date Created: Thursday, March 13, 2008 - 10:12

License: EPL

Date Updated: Wednesday, December 14, 2022 - 09:46

Submitted by: Joerg Spieler

Subscribe to Unnecessary Code Detector RSS-feed

Date Ranking Installs Clickthroughs
July 2024 130/645 131 8
June 2024 123/681 232 19
May 2024 149/682 205 11
April 2024 143/687 224 17
March 2024 144/694 239 13
February 2024 140/687 211 24
January 2024 153/691 202 16
December 2023 151/671 206 5
November 2023 153/686 236 13
October 2023 136/673 281 15
September 2023 125/663 294 9
August 2023 136/673 256 16
View Data for all Listings

Unsuccessful Installs

Unsuccessful Installs in the last 7 Days: 0

Download last 500 errors (CSV)

Marketplace Drag to Install Button

By adding the following code below to your website you will be able to add an install button for Unnecessary Code Detector.

HTML Code:

Markdown Syntax:


Drag to your running Eclipse* workspace. *Requires Eclipse Marketplace Client

Reviews Add new review

Within Spring projects, almost all @Bean or @Component annotated Methods / Classe are listed as "without reference" which is totally ok due to the Spring architecture.

So, making things "private" or deleteing beans based on the UCD findings is not always recommended.

This is great!  I am converting a rather large and old Spring 3 project to Spring Boot and there are a ton of unsed classes.  This is going to help weed out the useless crap.

thanks for the plugin, but there's an issue that seriously limits its usability for me:

plugin checks also text files (or even more?) in the whole worksprace instead of limiting itself to the current project.

given Eclipse's long-standing an annoying failure to keep its idea of files' states up-to-date, I get a long list of

Resource is out of sync with the file system: ...

which is plain nonsense (files have not changed for a long time _and_ I've run refresh several times) and on top of it about files that have nothing to do with the project to be checked.

additionally, a check run takes unnecessarily long.


After installing, my Eclipse Mars installation no longer identifies classes with compiler errors in Project Explorer view and no longer rebuilds automatically

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.

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.

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!

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.

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.

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.