How do you detect the code smell of 'code not used anymore'? I recently removed five unused subroutines which called each other from a large project. Orphan subroutines are 'smellier' than little orphaned groups. When orphaned subroutines call each other the smell is still there, but is less pungent.
I suspect the solution here is to employ the same logic as that used to identify WalledGardens in Wiki. By examining the call tree of the code, you ought to be able to produce a report of all code which is referenced, directly or indirectly, from the root of the program's call tree. If you employ dynamically loaded modules, this gets more complex, because now you need to examine configuration scripts too. Automation may not yield a 100% accuracy, but it can definitely help immensely.
How do you detect the code smell of ParallelInheritanceHierarchies? If the naming is sufficiently dissimilar, you may not smell that smell. Someone who goes through renaming one of the hierarchies may be removing your ability to smell the smell.