Mind Code
Brought to you by:
areichel-fc
Limitations: -Comments are included in loc changed -repos file large files take a very long time to clone. This is a restriction of jgit: http://dev.eclipse.org/mhonarc/lists/jgit-dev/msg00689.html Lessons learned: - Sonar Web Api for Timemachine does not provide the historical data in a file-specific base. That means that the data has to be collected after each sonar run. - Development of Sonar Java Api will not be continued thats why we should use Web Api -Resources set in two different versions differ -Sonar Webapi cannot list all rules of a language so we have to specify all rulerepositories in a configfile -Renjin does not provide Calculation of rank Conditions: -Versions in Sonar have the same name as the branch in git -it is assumed that the versions have direct successors Tasks: -Make everything open source. -diff should compare on line level -FILTER LOCTOUCHED=0 done -use spaerman -COMMENT EVERYTHING Key Decisions: Question: In what frequency is the software being used criteria: execution time options: Running it as part of continuous integration Running it once to get the priority of rules rational: Because the software is used to prioritize the rules over a large timespan it is not necessary to run it in each building cycle thats why it is chosen to design it as a run-once application. Question: From where to I get the information to what version a bug is related? criteria: reliability of data;well-kept comments in scm and issuetracker options: reading it from git; reading it from redmine rational: because redmine already has a column that specifies the version where this defect was found it is easy to use it to correlate the version to the bug Question: What framework to use for calculating the spearman rank? criteria: pluginablility with java; Simplicity options: R with RServe; R with Renjin; R with RCaller; Apache Muhaud rational: RServe is client server based and a overcill. Renjin is a reimplementation of R in Java but does not provide rank at this time. Apache Muhaud is very easy to understand and would do the job but it is not in R and we need R because of the enhancementness. RCaller is a simple scriptapi that connects java with the RScript.execution So we chose RCaller Variables: Number of defects: number of defects is the number of redmine issues that have a version specified. if the issueid is included in a commit message of git, all the affected files in this commit will be related to this bug. Size: The size of the file locTouched: Number of lines touched between two versions of the same file. between time 0 and first version this figur is not defined. numberdefects: number of defects that are related to the class. related means in a git revision a bug was fixed. HOW TO FIND A REFERENCE PROJECT: The reference project was found by looking for open source projects that are using redmine and then it has to be checked if its in github and after that it is checked if the data is given (git commit messages with reference to redmine issues) then it is checked if the sourcecode is in a language that is provided by sonar.