Test-based Patch Clustering for Automatically-Generated Patches Assessment

Presenter: Maria Kechagia, UoA
Date: 07 February 2025

Abstract

Previous studies have shown that Automated Program Repair (APR) techniques suffer from the overfitting problem. Overfitting happens when a patch is run and the test suite does not reveal any error, but the patch actually does not fix the underlying bug or it introduces a new defect that is not covered by the test suite. Therefore, the patches generated by APR tools need to be validated by human programmers, which can be very costly, and prevents APR tool adoption in practice. Our work aims to minimize the number of plausible patches that programmers have to review, thereby reducing the time required to find a correct patch. We introduce a novel light-weight test-based patch clustering approach called xTestCluster, which clusters patches based on their dynamic behavior. xTestCluster is applied after the patch generation phase in order to analyze the generated patches from one or more repair tools and to provide more information about those patches or facilitating patch assessment. The novelty of xTestCluster lies in using information from execution of newly generated test cases to cluster patches generated by multiple APR approaches. A cluster is formed of patches that fail on the same generated test cases. The output from xTestCluster gives developers a) a way of reducing the number of patches to analyze, as they can focus on analyzing a sample of patches from each cluster, b) additional information (new test cases and their results) attached to each patch. After analyzing 902 plausible patches from 21 Java APR tools, our results show that xTestCluster is able to reduce the number of patches to review and analyze with a median of 50%. xTestCluster can save a significant amount of time for developers that have to review the multitude of patches generated by APR tools, and provides them with new test cases that expose the differences in behavior between generated patches. Moreover, xTestCluster can complement other patch assessment techniques that help detect patch misclassification

URL: https://link.springer.com/article/10.1007/s10664-024-10503-2

Preprint: https://arxiv.org/pdf/2207.11082

Biography

Dr Maria Kechagia is an Assistant Professor in Software Engineering at the National and Kapodistrian University of Athens within the Department of Business Administration. From May 2019 to November 2014, she was a research fellow at University College London, in the UK. Previously, she was a postdoctoral researcher at the Delft University of Technology, in the Netherlands. She obtained a PhD degree from the Athens University of Economics and Business and an MSc degree from Imperial College London. Her research interests include software verification (static and dynamic analysis), automated program repair, software analytics, and software optimisation (energy efficiency and runtime performance). She has been a programme committee member of the research track of top software engineering venues including ICSE, FSE, ASE, ISSTA, MSR, ICSME, ESEM, and SANER, and a reviewer for top software engineering journals including TSE, TOSEM, EMSE, and JSS. She is a member of the editorial board of TSE.