Implementing bug-free concurrent programs is a challenging task in modern software development. State-of-the-art static analyses find hundreds of concurrency bugs in production code, scaling to large codebases. Yet, fixing these bugs in constantly changing codebases represents a daunting effort for programmers, particularly because a fix in the concurrent code can introduce other bugs in a subtle way. In this work, we show how to harness compositional static analysis for concurrency bug detection, to enable a new Automated Program Repair (APR) technique for data races in large concurrent Java codebases. The key innovation of our work is an algorithm that translates procedure summaries inferred by the analysis tool for the purpose of bug reporting, into small local patches that fix concurrency bugs (without introducing new ones). This synergy makes it possible to extend the virtues of compositional static concurrency analysis to APR, making our approach effective (it can detect and fix many more bugs than existing tools for data race repair), scalable (it takes seconds to analyse and suggest fixes for sizeable codebases), and usable (generally, it does not require annotations from the users and can perform continuous automated repair). Our study conducted on popular open-source projects has confirmed that our tool automatically produces concurrency fixes similar to those proposed by the developers in the past.
翻译:在现代软件开发中,实施无错误同步程序是一项具有挑战性的任务。 最先进的静态分析在生产代码中发现数百种计算错误, 并推广到大代码库。 然而, 在不断变化的代码库中修正这些错误对于程序员来说是一项艰巨的努力, 特别是因为同时代码中的一项修正可以以微妙的方式引入其他错误。 在这项工作中, 我们展示了如何利用合成静态分析来检测同值错误, 以便能够在大型同时存在 Java 代码库中进行数据竞赛的新的自动程序维修技术。 我们工作的关键创新是将分析工具为错误报告目的推断的程序摘要转换成小的本地补丁( 不引入新选项 ) 。 这种协同效应使得有可能将合成静态同值分析的优点扩展到 RA, 使我们的方法有效( 它能够检测和修复比现有数据竞赛修复工具更多的许多错误 ), 可扩缩( 需要几秒钟来分析和建议对大代码库进行修正), 以及可用性( 一般来说, 它不需要用户对程序进行解释, 程序摘要进行解释, 并且可以进行连续的自动修正。