Tools
to compute quality metrics
gprof allows you to learn where your program spent its time and which functions called which other functions while it was executing. This information can show you which pieces of your program are slower than you expected, and might be candidates for rewriting to make your program execute faster. It can also tell you which functions are being called more or less often than you expected. This may help you spot bugs that had otherwise been unnoticed. link
SourceMeter is a free command line tool that calculates more than 60 metrics (including afferent and efferent coupling) from Java source code. It has a SonarQube plug-in as well so the results can be explored in it ( the online demo: link)