Automatically Fixing Static Analysis Tools Violations

Autor: Diego Marcilio, Rodrigo Bonifácio
Rok vydání: 2020
Předmět:
Zdroj: Anais Estendidos do XI Congresso Brasileiro de Software: Teoria e Prática (CBSoft 2020).
DOI: 10.5753/cbsoft_estendido.2020.14625
Popis: Static analysis tools analyze source code to find deviations, or violations, from recommended programming practices defined as rules. A warning is raised when a piece of code violates any rule. Even though these tools can help to identify defects, developers still face several barriers when using them. Among the challenges are the significant number of reported warnings, often caused by false-positives, and the need to devise fixes, a repetitive and error-prone process. In this work, we addressed these two difficulties in two stages: 1) we identified which kind of rules are mostly fixed by Java developers when using SonarQube (a widely used static analysis tools); 2) we implemented a tool that provides automatic fixes for a subset of the previously commonly fixed found rules. The results obtained indicate that providing automatic fixes for commonly fixed warnings is feasible and welcomed by developers.
Databáze: OpenAIRE