CISPA
Browse

File(s) not publicly available

SampleFix: Learning to Generate Functionally Diverse Fixes

conference contribution
posted on 2023-11-29, 18:18 authored by Hossein HajipourHossein Hajipour, Apratim Bhattacharyya, Cristian-Alexandru StaicuCristian-Alexandru Staicu, Mario FritzMario Fritz
Automatic program repair holds the potential of dramatically improving the productivity of programmers during the software development process and correctness of software in general. Recent advances in machine learning, deep learning, and NLP have rekindled the hope to eventually fully automate the process of repairing programs. However, previous approaches that aim to predict a single fix are prone to fail due to uncertainty about the true intend of the programmer. Therefore, we propose a generative model that learns a distribution over potential fixes. Our model is formulated as a deep conditional variational autoencoder that can efficiently sample fixes for a given erroneous program. In order to ensure diverse solutions, we propose a novel regularizer that encourages diversity over a semantic embedding space. Our evaluations on common programming errors show for the first time the generation of diverse fixes and strong improvements over the state-of-the-art approaches by fixing up to 45% of the erroneous programs. We additionally show that for the 65% of the repaired programs, our approach was able to generate multiple programs with diverse functionalities.

History

Preferred Citation

Hossein Hajipour, Apratim Bhattacharyya, Cristian-Alexandru Staicu and Mario Fritz. SampleFix: Learning to Generate Functionally Diverse Fixes. In: International Workshop on Machine Learning in Software Engineering in conjuncture with ECML PKDD (). 2021.

Primary Research Area

  • Trustworthy Information Processing

Name of Conference

International Workshop on Machine Learning in Software Engineering in conjuncture with ECML PKDD ()

Legacy Posted Date

2021-12-06

Open Access Type

  • Unknown

BibTeX

@inproceedings{cispa_all_3527, title = "SampleFix: Learning to Generate Functionally Diverse Fixes", author = "Hajipour, Hossein and Bhattacharyya, Apratim and Staicu, Cristian-Alexandru and Fritz, Mario", booktitle="{International Workshop on Machine Learning in Software Engineering in conjuncture with ECML PKDD ()}", year="2021", }

Usage metrics

    Categories

    No categories selected

    Exports

    RefWorks
    BibTeX
    Ref. manager
    Endnote
    DataCite
    NLM
    DC