首页> 外文期刊>The Journal of Systems and Software >SpongeBugs: Automatically generating fix suggestions in response to static code analysis warnings
【24h】

SpongeBugs: Automatically generating fix suggestions in response to static code analysis warnings

机译:海绵宝宝:以响应静态代码分析警告自动生成修复建议

获取原文
获取原文并翻译 | 示例
       

摘要

Static code analysis tools such as FindBugs and SonarQube are widely used on open-source and industrial projects to detect a variety of issues that may negatively affect the quality of software. Despite these tools' popularity and high level of automation, several empirical studies report that developers normally fix only a small fraction (typically, less than 10% (Marcilio et al., 2019) of the reported issues-so-called "warnings". If these analysis tools could also automatically provide suggestions on how to fix the issues that trigger some of the warnings, their feedback would become more actionable and more directly useful to developers. In this work, we investigate whether it is feasible to automatically generate fix suggestions for common warnings issued by static code analysis tools, and to what extent developers are willing to accept such suggestions into the codebases they are maintaining. To this end, we implemented SpongeBugs, a Java program transformation technique that fixes 11 distinct rules checked by two well-known static code analysis tools (SonarQube and SpotBugs). Fix suggestions are generated automatically based on templates, which are instantiated in a way that removes the source of the warnings; templates for some rules are even capable of producing multi-line patches. Based on the suggestions provided by SpongeBugs, we submitted 38 pull requests, including 946 fixes generated automatically by our technique for various open-source Java projects, including Eclipse UI - a core component of the Eclipse IDE - and both SonarQube and SpotBugs. Project maintainers accepted 87% of our fix suggestions (97% of them without any modifications). We further evaluated the applicability of our technique on software written by students and on a curated collection of bugs. All results indicate that our approach to generating fix suggestions is feasible, flexible, and can help increase the applicability of static code analysis tools.
机译:静态代码分析工具,如FindBugs和Sonarqube广泛使用开源和工业项目,以检测可能对软件质量产生负面影响的各种问题。尽管有这些工具的流行度和高水平的自动化,但若干实证研究报告称,开发人员通常只修复一小部分(通常,少于10%(Marcilio等,2019)的报告的问题 - 所谓的“警告”。如果这些分析工具也可以自动提供关于如何解决触发一些警告的问题的建议,他们的反馈将变得更加可操作,对开发人员更有用。在这项工作中,我们调查自动生成修复建议是否是可行的对于静态代码分析工具发出的共同警告,并且开发人员愿意接受他们维护的码布中的此类建议。为此,我们实施了海绵曲面,一个Java程序转换技术,修复了两个井检查的11个不同的规则 - 已知静态代码分析工具(Sonarqube和Spotbugs)。修复建议是基于模板自动生成的,该模板在某种程度上实例化删除警告的来源;某些规则的模板甚至能够产生多线补丁。根据海绵宝宝提供的建议,我们提交了38个拉动请求,包括我们的技术自动生成的946个修复,用于各种开源Java项目,包括Eclipse UI - Eclipse IDE的核心组件 - 以及Sonarqube和Spotbugs。项目维护者接受了我们修复建议的87%(其中97%,没有任何修改)。我们进一步评估了我们对学生编写的软件和策划的错误集合的适用性。所有结果表明,我们的生成修复建议的方法是可行的,灵活,有助于提高静态代码分析工具的适用性。

著录项

相似文献

  • 外文文献
  • 中文文献
  • 专利
获取原文

客服邮箱:kefu@zhangqiaokeyan.com

京公网安备:11010802029741号 ICP备案号:京ICP备15016152号-6 六维联合信息科技 (北京) 有限公司©版权所有
  • 客服微信

  • 服务号