This free Eclipse plugin seems quite intersting. I think I remember some other approaches in this direction, but none went so far. According to their front page the following features are supported:
- Search and Navigate code – search semantic properties of code (both source and bytecode), and define customized tree-views.
- Find bugs – use SemmleCode’s standard library to detect common bugs; adjust existing code queries to search for bug patterns that are specific to your projects and frameworks.
- Compute metrics – do change impact analysis, spot bad code smells and explore dependencies, all with the library of metrics queries.
- Enforce coding conventions – introduce your own checks with intuitive custom queries; show violations as errors or warnings in Eclipse.
- Generate charts and graphs – view analysis results in no less than seven different ways, including charts and graphs; navigation is further simplified as each view is linked back to the source code.
You can read more here. I really hope to have the time to try it out.