FlakyFix: Using Large Language Models for Predicting Flaky Test Fix Categories and Test Code Repair
Sakina Fatima, Hadi Hemmati, Lionel Briand

TL;DR
This paper introduces FlakyFix, a framework that predicts fix categories for flaky tests and uses large language models to generate repairs, significantly improving automated flaky test fixing.
Contribution
It proposes a novel approach combining fix category prediction with LLM-guided repair, enhancing automated flaky test repair accuracy.
Findings
Most predicted fix categories are correct.
GPT-3.5 Turbo repairs between 51% and 83% of flaky tests successfully.
Repaired tests require minimal further changes to pass.
Abstract
Flaky tests are problematic because they non-deterministically pass or fail for the same software version under test, causing confusion and wasting development effort. While machine learning models have been used to predict flakiness and its root causes, there is much less work on providing support to fix the problem. To address this gap, in this paper, we focus on predicting the type of fix that is required to remove flakiness and then repair the test code on that basis. We do this for a subset of flaky tests where the root cause of flakiness is in the test itself and not in the production code. One key idea is to guide the repair process with additional knowledge about the test's flakiness in the form of its predicted fix category. Thus, we first propose a framework that automatically generates labeled datasets for 13 fix categories and trains models to predict the fix category of a…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsNatural Language Processing Techniques
MethodsAttention Is All You Need · Cosine Annealing · Linear Layer · Linear Warmup With Cosine Annealing · Weight Decay · Dropout · Refunds@Expedia|||How do I get a full refund from Expedia? · Attention Dropout · Layer Normalization · Multi-Head Attention
