Skip to main content
QUICK REVIEW

[Paper Review] Multi-Location Program Repair Strategies Learned from Past Successful Experience

Shangwen Wang, Xiaoguang Mao|arXiv (Cornell University)|Oct 30, 2018
Software Testing and Debugging TechniquesComputer Science10 references3 citations
TL;DR

This paper proposes two novel strategies—similar-location and relevant-location repair—derived from analyzing past successful multi-location program repairs in Defects4J. By learning from historical patches, the approach enables automated tools to fix complex, multi-location bugs that previous methods often failed to resolve, successfully repairing two previously intractable bugs with high precision.

ABSTRACT

Automated program repair (APR) has great potential to reduce the effort and time-consumption in software maintenance and becomes a hot topic in software engineering recently with many approaches being proposed. Multi-location program repair has always been a challenge in this field since its complexity in logic and structure. While some approaches do not claim to have the features for solving multi-location bugs, they generate correct patches for these defects in practice. In this paper, we first make an observation on multi-location bugs in Defects4J and divide them into two categories (i.e., similar and relevant multi-location bugs) based on the repair actions in their patches. We then summarize the situation of multi-location bugs in Defects4J fixed by current tools. We analyze the twenty-two patches generated by current tools and propose two feasible strategies for fixing multi-location bugs, illustrating them through two detailed case studies. At last, the experimental results prove the feasibility of our methods with the repair of two bugs that have never been fixed before. By learning from successful experience in the past, this paper points out possible ways ahead for multi-location program repair.

Motivation & Objective

  • To analyze the nature of multi-location bugs in Defects4J and categorize them based on repair patterns.
  • To identify recurring repair strategies from successful patches generated by existing APR tools.
  • To develop two generalizable strategies—similar-location and relevant-location repair—for fixing complex multi-location bugs.
  • To validate the feasibility of these strategies on previously unsolved bugs in Defects4J.
  • To provide a foundation for future APR tools to learn from historical successful repairs.

Proposed method

  • The authors analyze 22 patches generated by existing APR tools on multi-location bugs in Defects4J to identify common repair patterns.
  • They categorize multi-location bugs into 'similar' and 'relevant' types based on the similarity and logical relationship of the repair locations.
  • The similar-location strategy targets code regions with identical or highly similar code patterns, applying uniform fixes across locations.
  • The relevant-location strategy targets logically connected but syntactically different code regions, requiring context-aware patch application.
  • Case studies are used to illustrate how each strategy can be applied to real-world multi-location bugs.
  • The approach is evaluated on two previously unsolved bugs, demonstrating successful repair using the proposed strategies.

Experimental results

Research questions

  • RQ1What are the distinguishing characteristics of multi-location bugs that are successfully repaired by existing APR tools?
  • RQ2How can repair patterns from past successful patches be abstracted into reusable strategies for multi-location bugs?
  • RQ3Can the identified strategies—similar-location and relevant-location repair—be applied to fix previously unsolved multi-location bugs?
  • RQ4What are the structural and logical differences between similar and relevant multi-location bugs?
  • RQ5How can automated repair tools leverage historical repair experience to improve multi-location bug fixing?

Key findings

  • The analysis revealed that 22 out of 24 multi-location bugs in Defects4J were repaired by existing APR tools, indicating that such bugs are often solvable with current methods.
  • Multi-location bugs were categorized into two types: 'similar' (same code pattern across locations) and 'relevant' (logically connected but different code patterns).
  • The similar-location strategy enables consistent patch application across identical code fragments, improving reliability and maintainability.
  • The relevant-location strategy allows for context-aware fixes across semantically related but syntactically distinct code regions, expanding the scope of fixable bugs.
  • The proposed strategies successfully repaired two multi-location bugs in Defects4J that had not been fixed by prior APR tools.
  • The results demonstrate that learning from past successful repairs is a viable path toward improving automated repair of complex, multi-location defects.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.