Here is my own attempt at solving this with a 'brute' solution:
- Write a script that makes a copy of your source code and removes all assertions from it
- Inspect that assert less copy as you would inspect the original
- Manually remove variables used only in asserts from the original source code
Note that there is a similar problem with JavaDoc linked variables... if a variable is mentioned in the JavaDoc it will be considered as used (by Eclipse and maybe other IDE).