<  Retour au portail Polytechnique Montréal

Using code reviews to automatically configure static analysis tools

Fiorella Zampetti, Saghan Mudbhari, Venera Arnaoudova, Massimiliano Di Penta, Sebastiano Panichella et Giuliano Antoniol

Article de revue (2021)

Un lien externe est disponible pour ce document
Afficher le résumé
Cacher le résumé

Abstract

Developers often use Static Code Analysis Tools (SCAT) to automatically detect different kinds of quality flaws in their source code. Since many warnings raised by SCATs may be irrelevant for a project/organization, it can be possible to leverage information from the project development history, to automatically configure which warnings a SCAT should raise, and which not. In this paper, we propose an automated approach (Auto-SCAT) to leverage (statement-level) code review comments for recommending SCAT warnings, or warning categories, to be enabled. To this aim, we trace code review comments onto SCAT warnings by leveraging their descriptions and messages, as well as review comments made in other different projects. We apply Auto-SCAT to study how CheckStyle, a well-known SCAT, can be configured in the context of six Java open source projects, all using Gerrit for handling code reviews. Our results show that, Auto-SCAT is able to classify code review comments into CheckStyle checks with a precision of 61% and a recall of 52%. While considering also the code review comments not related to CheckStyle warnings Auto-SCAT has a precision and a recall of ≈ 75%. Furthermore, Auto-SCAT can configuring CheckStyle with a precision of 72.7% at checks level and a precision of 96.3% at category level. Finally, our findings highlight that Auto-SCAT outperforms state-of-art baselines based on default CheckStyle configurations, or leveraging the history of previously-removed warnings.

Mots clés

Matériel d'accompagnement:
Département: Département de génie informatique et génie logiciel
URL de PolyPublie: https://publications.polymtl.ca/50563/
Titre de la revue: Empirical Software Engineering (vol. 27, no 1)
Maison d'édition: Springer
DOI: 10.1007/s10664-021-10076-4
URL officielle: https://doi.org/10.1007/s10664-021-10076-4
Date du dépôt: 18 avr. 2023 14:59
Dernière modification: 08 janv. 2026 11:49
Citer en APA 7: Zampetti, F., Mudbhari, S., Arnaoudova, V., Di Penta, M., Panichella, S., & Antoniol, G. (2021). Using code reviews to automatically configure static analysis tools. Empirical Software Engineering, 27(1), 30 pages. https://doi.org/10.1007/s10664-021-10076-4

Statistiques

Dimensions

Actions réservées au personnel

Afficher document Afficher document