smontanari / code-forensics

A toolset for code analysis and report visualisation
384 stars 45 forks source link

code ownership blank #18

Closed jdevoo closed 6 years ago

jdevoo commented 6 years ago

I am still using alfresco-repository as repo and main-dev-coupling-data.json remains empty although code-ownership-report.json has 4000+ entries for the range 2017-06-01 to 2017-11-01. Under what conditions would a 'code ownership' result in no data? TIA

smontanari commented 6 years ago

There are several code-maat command line options that determine the granularity of an analysis. The options -m and -n in particular can drastically change the result of a coupling analysis. My suggestion is to run the analysis in debug mode (setting the env variable COMMAND_DEBUG) and detect the code-maat command that is used to extract the coupling data, then execute that command yourself to see what the output is and maybe play with the code-maat options to see if you can fetch better/different results. If you find a set of options that returns meaningful data then you can add them to code-forensics either through the command line or through the .code-forensics configuration file.

In this case I suspect that the temporal coupling analysis returns no results, therefore even if you have file ownership information code-forensics cannot find any coupling between any two files, hence it cannot find any coupling between any two developers. Try and tweak the options m and n, specifically to a lower number than the default (5) and I'm sure you will start seeing some data.

Be aware though that those default values have a meaning, i.e. if you lower m and n to the minimum possible value (1) you could be induced to think there are significant couplings between developers when in fact the number of those occurrences could be irrelevant.

jdevoo commented 6 years ago

Thank you Silvio - lowering m and n to 4 yielded the graph below. Any specific reason for not using the radial layout with splines?

coupling-analysis

smontanari commented 6 years ago

The bubble chart gives me the ability to size the circles based on the number of authors and tune the colour based on the number of revisions, which helps to highlight the files with higher churn and more contributors, where coupling issues may represent bigger risks. I wasn't sure how to tweak the spline chart to achieve a similar outcome.

jdevoo commented 6 years ago

Thank you again Silvio!!!