The University of Texas at Austin
Reliable software testing with language models and program analysis
Abstract
dc:description.abstractRegression testing is an essential part of software development, but it is in- creasingly undermined by flaky tests. Flaky tests are tests that non-deterministically pass or fail on the same version of code. When a flaky test fails, developers cannot tell whether their change introduced a fault or the test simply failed by chance, wast- ing developers debugging time for a nonexistent problems. This dissertation shows that automated techniques that leverage large language models (LLMs) and program analysis can improve the reliability of software testing by advancing the classification, repair, and debugging of flaky tests in regression testing. This dissertation makes three major contributions. First, this dissertation constructs FlakeBench, a dataset of 280 flaky and 8294 non-flaky tests from 97 open- source Java projects that reflects the real-world class imbalance of flaky tests, and proposes FlakyLens, a class-imbalance-aware model fine-tuning strategy for predict- ing the root causes of flaky tests. FlakyLens improves classification F1-score by at least 9.17 percentage points (pp) over prior flaky test classifiers. This dis- sertation further shows that FlakyLens relies primarily on syntactic features rather than a deeper semantic understanding of test code, using Integrated Gradients and semantics-preserving code perturbations, with perturbations using important tokens reducing its F1-score by up to 18.37pp. Second, this dissertation proposes FlakeSync, a technique for automatically repairing async flaky tests, the most prevalent category of flaky tests, which fail due to improper synchronization between concurrently executing code. Rather than the common but unreliable practice of adding sleep-based wait times, FlakeSync iden- tifies the critical point in the code that must execute before concurrent code (i.e., barrier point) proceeds and the corresponding barrier point that must wait for it, then synthesizes a synchronization-based repair. In an evaluation on 176 known flaky tests from a public dataset of Java projects [3], FlakeSync repairs 83.75% of the 80 true async flaky tests, with a median runtime overhead that is essentially the same as the original test’s runtime. We submitted 10 pull requests incorporating FlakeSync’s repairs to open-source projects; 3 have been accepted and none rejected. Third, this dissertation proposes RankF, a framework for ranking candidate tests by their likelihood of being relevant to a given order-dependent (OD) flaky test, another prevalent root cause of test flakiness. Debugging and repairing an OD flaky test requires first finding the relevant test whose relative order causes the failure, but existing approaches must run many candidate tests before finding it. RankF provides two complementary approaches: RankF uses an LLM to rank candidate tests based on source code, while RankF uses historical test-order execution results without code analysis. In an evaluation on 155 known OD tests from 24 open-source Java projects, RankF finds a relevant test faster than all baselines for most subjects, substantially reducing the manual effort needed to debug and repair OD flaky tests. Together, these contributions demonstrate that automated techniques leveraging language models and program analysis can provide effective solutions across the full lifecycle of flaky tests, advancing the reliability of regression testing.
Degree
thesis:*- Name thesis:degree_name
- Doctor of Philosophy
- Level thesis:degree_level
- DOCTORAL
- Discipline thesis:degree_discipline
- Software Engineering
- Department thesis:degree_department
- Electrical and Computer Engineering
- Grantor
- The University of Texas at Austin
- Year dc:date.issued
- 2026
Author and committee
dc:creator, dc:contributor.*- Author dc:creator
-
- Rahman, Shanto
- Advisor dc:contributor.advisor
-
- Shi, August
- Committee members dc:contributor.committeemember
-
- Lam, Wing
- Misailovic, Sasa
- Khurshid, Sarfraz
- Gligoric, Milos
- ORCID person:identifier.orcid
Subjects
dc:subject × 3Rights
- Language dc:language.iso
- English
Identifiers
dc:identifier.*- Identifier URI
- https://hdl.handle.net/2152/137587