arrow
Return

Using code reviews to automatically configure static analysis tools

delete2021-12-11
delete9
PRE
AI
F
Fiorella Zampetti *
S
Saghan Mudbhari
V
Venera Arnaoudova
M
Massimiliano Di Penta
S
Sebastiano Panichella
G
Giuliano Antoniol
DOI:10.1007/s10664-021-10076-4delete
deleteOriginal
deleteOriginal request for help
deleteShare
deleteSave
Abstract

Abstract

En 中文
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 approximate to 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.
Keywords:
Static analysis tools
Code reviews
Automated tool configuration

Journal

Empirical Software Engineering cover
Empirical Software Engineering
IF:
3.6
Papers:
2.0K
Citations:
5.3K

Organization

University of Sannio cover
University of Sannio
Scholars:
2.3K
Papers: 2.2K
Citations: 2.3K
U
universite de montreal
Scholars:
4.6W
Papers: 3.8W
Citations: 46
Z
Zurich University of Applied Sciences
Scholars:
2.2K
Papers: 1.6K
Citations: 2
W
washington state university
Scholars:
1.8W
Papers: 1.6W
Citations: 114
researcher View more organizations