Sorald: Automatic Patch Suggestions for SonarQube Static Analysis Violations
Not on the map. Why?
Abstract (arXiv)
Previous work has shown that early resolution of issues detected by static code analyzers can prevent major costs later on. However, developers often ignore such issues for two main reasons. First, many issues should be interpreted to determine if they correspond to actual flaws in the program. Second, static analyzers often do not present the issues in a way that is actionable. To address these problems, we present Sorald: a novel system that devise metaprogramming templates to transform the abstract syntax trees of programs and suggest fixes for static analysis warnings. Thus, the burden on the developer is reduced from interpreting and fixing static issues, to inspecting and approving full fledged solutions. Sorald fixes violations of 10 rules from SonarJava, one of the most widely used static analyzers for Java. We evaluate Sorald on a dataset of 161 popular repositories on Github. Our analysis shows the effectiveness of Sorald as it fixes 65% (852/1,307) of the violations that meets the repair preconditions. Overall, our experiments show it is possible to automatically fix notable violations of the static analysis rules produced by the state-of-the-art static analyzer SonarJava.
Key facts. Cited by 4 papers in the map (data through 7 Oct 2026). First posted on arXiv 22 Mar 2021.
Builds on
No reference list yet.
Built on by
Citing papers per year: 2023: 1; 2024: 1; 2025: 2.
4 papers.
- 2024DeepCode AI Fix: Fixing Security Vulnerabilities with Large Language Modelscited by 7
- 2023Frustrated with Code Quality Issues? LLMs can Help!cited by 5
- 2025Augmenting Large Language Models with Static Code Analysis for Automated Code Quality Improvementscited by 2
- 2025WALL: A Web Application for Automated Quality Assurance using Large Language Modelscited by 0
- 2025WALL: A Web Application for Automated Quality Assurance using Large Language Models12 Sep 2025
- 2025Augmenting Large Language Models with Static Code Analysis for Automated Code Quality Improvements12 Jun 2025
- 2024DeepCode AI Fix: Fixing Security Vulnerabilities with Large Language Models19 Feb 2024
- 2023Frustrated with Code Quality Issues? LLMs can Help!22 Sep 2023