Memory and Resource Leak Defects and their Repairs in Java Projects

09/28/2018
by   Mohammadreza Ghanavati, et al.
0

Despite huge software engineering efforts and programming language support, resource and memory leaks are still a troublesome issue, even in memory-managed languages such as Java. Understanding the properties of leak-inducing defects, how the leaks manifest, and how they are repaired is an essential prerequisite for designing better approaches for avoidance, diagnosis, and repair of leak-related bugs. We conduct a detailed empirical study on 452 issues from 10 large open-source Java projects. The study proposes taxonomies for the leak types, for the defects causing them, and for the repair actions. We investigate, under several aspects, the distributions within each taxonomy and the relationships between them. We find that manual code inspection and manual runtime detection are still the main methods for leak detection. We find that most of the errors manifest on error-free execution paths, and developers repair the leak defects in a shorter time than non-leak defects. We also identify 13 recurring code transformations in the repair patches. Based on our findings, we draw a variety of implications on how developers can avoid, detect, isolate and repair leak-related bugs.

READ FULL TEXT
research
05/30/2019

How Often Do Single-Statement Bugs Occur? The ManySStuBs4J Dataset

Program repair is an important but difficult software engineering proble...
research
05/28/2019

Empirical Review of Java Program Repair Tools: A Large-Scale Experiment on 2,141 Bugs and 23,551 Repair Attempts

In the past decade, research on test-suite-based automatic program repai...
research
08/16/2023

LeakPair: Proactive Repairing of Memory Leaks in Single Page Web Applications

Modern web applications often resort to application development framewor...
research
10/11/2021

User-driven Design and Evaluation of Liquid Types in Java

Bugs that are detected earlier during the development lifecycle are easi...
research
03/22/2021

Applying CodeBERT for Automated Program Repair of Java Simple Bugs

Software debugging, and program repair are among the most time-consuming...
research
02/09/2018

Astor: Exploring the Design Space of Generate-and-Validate Program Repair beyond GenProg

During last years, researches have proposed novel repair approaches that...
research
05/10/2021

Why Aren't Regular Expressions a Lingua Franca? An Empirical Study on the Re-use and Portability of Regular Expressions

This paper explores the extent to which regular expressions (regexes) ar...

Please sign up or login with your details

Forgot password? Click here to reset