Fault Localization with Code Coverage Representation Learning

02/27/2021
by   Yi Li, et al.
0

In this paper, we propose DeepRL4FL, a deep learning fault localization (FL) approach that locates the buggy code at the statement and method levels by treating FL as an image pattern recognition problem. DeepRL4FL does so via novel code coverage representation learning (RL) and data dependencies RL for program statements. Those two types of RL on the dynamic information in a code coverage matrix are also combined with the code representation learning on the static information of the usual suspicious source code. This combination is inspired by crime scene investigation in which investigators analyze the crime scene (failed test cases and statements) and related persons (statements with dependencies), and at the same time, examine the usual suspects who have committed a similar crime in the past (similar buggy code in the training data). For the code coverage information, DeepRL4FL first orders the test cases and marks error-exhibiting code statements, expecting that a model can recognize the patterns discriminating between faulty and non-faulty statements/methods. For dependencies among statements, the suspiciousness of a statement is seen taking into account the data dependencies to other statements in execution and data flows, in addition to the statement by itself. Finally, the vector representations for code coverage matrix, data dependencies among statements, and source code are combined and used as the input of a classifier built from a Convolution Neural Network to detect buggy statements/methods. Our empirical evaluation shows that DeepRL4FL improves the top-1 results over the state-of-the-art statement-level FL baselines from 173.1 improves the top-1 results over the existing method-level FL baselines from 15.0

READ FULL TEXT

page 2

page 3

page 5

page 6

page 7

page 8

page 11

page 12

research
08/18/2019

Incorporating fault-proneness estimations into coverage-based test case prioritization methods

Context: During the development process of a software program, regressio...
research
09/21/2021

A Variability Fault Localization Approach for Software Product Lines

Software fault localization is one of the most expensive, tedious, and t...
research
07/20/2021

A Hybrid Approach to Fine-grained Automated Fault Localization

Fault localization is to identify faulty source code. It could be done o...
research
11/08/2022

Focused Dynamic Slicing for Large Applications using an Abstract Memory-Model

Dynamic slicing techniques compute program dependencies to find all stat...
research
12/09/2017

FPA-FL: Incorporating Static Fault-proneness Analysis into Statistical Fault Localization

Despite the proven applicability of the statistical methods in automatic...
research
08/18/2021

Restats: A Test Coverage Tool for RESTful APIs

Test coverage is a standard measure used to evaluate the completeness of...
research
08/11/2021

Hybrid Multi-level Crossover for Unit Test Case Generation

State-of-the-art search-based approaches for test case generation work a...

Please sign up or login with your details

Forgot password? Click here to reset