SysRepoAnalysis: A tool to analyze and identify critical areas of source code repositories

  • Armando Sousa UFPI
  • Gisele Ribeiro UFPI
  • Guilherme Avelino UFPI
  • Lincoln Rocha UFC
  • Ricardo Britto Ericsson

Resumo


SysRepoAnalysis is an open-source, multi-user web tool that allows online analysis of git repositories by extracting historical information from source code files over time, using mining software repository techniques. Such data can be useful for the development team to find critical areas of the code repository that have a high maintenance effort over time. The main metrics used are cyclomatic complexity, accumulation of LOC modifications (based on code-churn), and frequency of occurrence of files in commits over time. In addition, we use the composition of these metrics to find very complex source code files that are frequently modified and have many LOCs changed over time. Besides, to calculate these metrics, the tool allows the generation and display of a treemap of the repository’s directory and file structure and the rendering of a heatmap based on the metric chosen to be analyzed. Such features can be useful in helping the development team to find critical source code files or areas that contain such files. In this way, it can help the development team to make decisions regarding the choice of candidate files for refactorings that can generate a high maintenance effort. Among the main features of SysRepoAnalysis, we can highlight: control of user authentication and authorization, cloning and asynchronous analysis of user repositories (via message broker using producers and consumers), historical analysis and export of modified commits and files, calculation and export of results of the analyzed metrics and treemap generation of the repository’s directory and file structure, as well as the rendering of heatmap based on the metric chosen to be analyzed. The source code tool is published in GitHub repository1 and there is a presentation about the tool in Video2 3

Palavras-chave: Code Metrics, Software Maintenance and Evolution, Code Change Analysis, Mining Software Repositories, Large-scale Software Systems
Publicado
03/10/2022
SOUSA, Armando; RIBEIRO, Gisele; AVELINO, Guilherme; ROCHA, Lincoln; BRITTO, Ricardo. SysRepoAnalysis: A tool to analyze and identify critical areas of source code repositories. In: SIMPÓSIO BRASILEIRO DE ENGENHARIA DE SOFTWARE (SBES), 36. , 2022, Uberlândia. Anais [...]. Porto Alegre: Sociedade Brasileira de Computação, 2022 . p. 376–381.