Using Distributed Representation of Code for Bug Detection

11/28/2019
by   Jón Arnar Briem, et al.
0

Recent advances in neural modeling for bug detection have been very promising. More specifically, using snippets of code to create continuous vectors or embeddings has been shown to be very good at method name prediction and claimed to be efficient at other tasks, such as bug detection. However, to this end, the method has not been empirically tested for the latter. In this work, we use the Code2Vec model of Alon et al. to evaluate it for detecting off-by-one errors in Java source code. We define bug detection as a binary classification problem and train our model on a large Java file corpus containing likely correct code. In order to properly classify incorrect code, the model needs to be trained on false examples as well. To achieve this, we create likely incorrect code by making simple mutations to the original corpus. Our quantitative and qualitative evaluations show that an attention-based model that uses a structural representation of code can be indeed successfully used for other tasks than method naming.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
04/30/2018

DeepBugs: A Learning Approach to Name-based Bug Detection

Natural language elements in source code, e.g., the names of variables a...
research
05/27/2023

WELL: Applying Bug Detectors to Bug Localization via Weakly Supervised Learning

Bug localization, which is used to help programmers identify the locatio...
research
11/06/2020

DRAST – A Deep Learning and AST Based Approach for Bug Localization

Context: Given a bug report and source code of the project, bug localiza...
research
04/03/2020

A "Final" Security Bug

This article discusses a fixed critical security bug in Google Tink's Ed...
research
02/07/2019

How Different Are Different diff Algorithms in Git? Use --histogram for Code Changes

Automatic identification of the differences between two versions of a fi...
research
12/15/2021

XCheck: a Simple, Effective and Extensible Bug Finder using micro-grammar

We propose a simple and effective bug finder, XCheck, which is a proof o...
research
07/29/2021

Learning how to listen: Automatically finding bug patterns in event-driven JavaScript APIs

Event-driven programming is widely practiced in the JavaScript community...

Please sign up or login with your details

Forgot password? Click here to reset