Pith. sign in

REVIEW 3 cited by

FlakyFix: Using Large Language Models for Predicting Flaky Test Fix Categories and Test Code Repair

Not yet reviewed by Pith; the record is open.

This paper has not been read by Pith yet. Machine review is queued; the pith claim, tier, and objections will appear here once it completes.

SPECIMEN: schema-true, not a live event

T0 review · schema-true

One-sentence machine reading of the paper's core claim.

pith:XXXXXXXX · record.json · timestamp

arxiv 2307.00012 v4 pith:OAKUYPPT submitted 2023-06-21 cs.SE cs.AIcs.LG

classification cs.SEcs.AIcs.LG
keywords testcodeflakyflakinesstestscategorymodelsrepair
verification ladder T0 review T1 audit T2 compute T3 formal

Signed reviews

No signed human review yet.

0 comments
read the original 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 flaky test by analyzing the test code only. Our experimental results using code models and few-shot learning show that we can correctly predict most of the fix categories. To show the usefulness of such fix category labels for automatically repairing flakiness, we augment the prompts of GPT-3.5 Turbo, a Large Language Model (LLM), with such extra knowledge to request repair suggestions. The results show that our suggested fix category labels, complemented with in-context learning, significantly enhance the capability of GPT-3.5 Turbo in generating fixes for flaky tests. Based on the execution and analysis of a sample of GPT-repaired flaky tests, we estimate that a large percentage of such repairs (roughly between 51% and 83%) can be expected to pass. For the failing repaired tests, on average, 16% of the test code needs to be further changed for them to pass.

Discussion (0). Continue with ORCID to comment.

Forward citations

Cited by 3 Pith papers

Reviewed papers in the Pith corpus that reference this work. Sorted by Pith novelty score. Full citation record

  1. Detecting and Evaluating Order-Dependent Flaky Tests in JavaScript

    cs.SE 2025-01 conditional novelty 6.0 of 10

    Reordering tests in 81 Jest projects uncovered 55 order-dependent tests, with shared mocking state reported as a newly identified cause.

  2. On the Diagnosis of Flaky Job Failures: Understanding and Prioritizing Failure Categories

    cs.SE 2025-01 conditional novelty 6.0 of 10

    An industrial study that builds a 46-category taxonomy of flaky job failures and uses RFM clustering to select 14 priority categories for automated diagnosis.

  3. A Large Language Model Approach to Identify Flakiness in C++ Projects

    cs.SE 2024-12 reject novelty 4.0 of 10

    Fine-tuned Mistral-7b, Llama2-7b, and CodeLlama-7b classify flaky test root causes in C++ and Java, with Mistral-7b reporting perfect scores on a small augmented C++ dataset.

Pith tools