Friday, January 30, 2009

Source Code Analysis and Metrics

While researching tools, I stumbled upon a tool, Understand 2.0 http://www.scitools.com/products/understand/ which provides an impressive set of capabilities and source code visualizations, is multi-lingual and multi-platform.

The required critical capabilities are

Driving Factors

  • The tasks of static and dynamic code analysis, architecture recovery and visualization (from the code), code structural analysis, extracting other metrics (cyclomatic complexity, maintainability, other measurements defined by SEI) is an important part of a lot of projects.
  • Frequently one tool would not cover all needs (and languages) and we normally deal with a combination of several tools both commercial and free/opensource

List of tools that researched (not an exhaustive list, just a compilation after about a day's worth of researching)

Commercial

  • Coverity (multi-lingual))
  • JHawk (Java)
  • Lattix (.NET)
  • NDepend (.NET)
  • PC-Lint
  • Rational Software Architect (multi-lingual) -built-in capabilities. (Eclipse based)
  • Understand (multi-lingual)
  • Visual Studio (multi-lingual) - built-in capabilities, plugins.

Free/Open source

The bottom line is that source code analysis/metrics tools are plentiful in both the commerical and open source markets. You have to define what your requirements are, do the necessary research to devise a solution set of tools and techniques, and then resolve your problem.