Leveraging Static Analysis for Bug Repair

04/20/2023
by   Ruba Mutasim, et al.
0

We propose a method combining machine learning with a static analysis tool (i.e. Infer) to automatically repair source code. Machine Learning methods perform well for producing idiomatic source code. However, their output is sometimes difficult to trust as language models can output incorrect code with high confidence. Static analysis tools are trustable, but also less flexible and produce non-idiomatic code. In this paper, we propose to fix resource leak bugs in IR space, and to use a sequence-to-sequence model to propose fix in source code space. We also study several decoding strategies, and use Infer to filter the output of the model. On a dataset of CodeNet submissions with potential resource leak bugs, our method is able to find a function with the same semantics that does not raise a warning with around 97 recall.

READ FULL TEXT
research
12/24/2018

SequenceR: Sequence-to-Sequence Learning for End-to-End Program Repair

This paper presents a novel end-to-end approach to program repair based ...
research
10/30/2017

Semantic Code Repair using Neuro-Symbolic Transformation Networks

We study the problem of semantic code repair, which can be broadly defin...
research
07/27/2023

Targeted Static Analysis for OCaml C Stubs: eliminating gremlins from the code

Migration to OCaml 5 requires updating a lot of C bindings due to the re...
research
07/12/2018

IntRepair: Informed Fixing of Integer Overflows

Integer overflows have threatened software applications for decades. Thu...
research
10/31/2022

Unsafe's Betrayal: Abusing Unsafe Rust in Binary Reverse Engineering via Machine Learning

Memory-safety bugs introduce critical software-security issues. Rust pro...
research
04/20/2023

Novice programmers strategies for online resource use and their impact on source code

Websites are frequently used by programmers to support the development p...
research
08/29/2018

Towards security defect prediction with AI

In this study, we investigate the limits of the current state of the art...

Please sign up or login with your details

Forgot password? Click here to reset